summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/project_settings.cpp76
-rw-r--r--core/project_settings.h3
-rw-r--r--doc/classes/@GDScript.xml10
-rw-r--r--doc/classes/@GlobalScope.xml2
-rw-r--r--doc/classes/@NativeScript.xml2
-rw-r--r--doc/classes/@VisualScript.xml2
-rw-r--r--doc/classes/AABB.xml2
-rw-r--r--doc/classes/ARVRAnchor.xml2
-rw-r--r--doc/classes/ARVRCamera.xml2
-rw-r--r--doc/classes/ARVRController.xml2
-rw-r--r--doc/classes/ARVRInterface.xml2
-rw-r--r--doc/classes/ARVROrigin.xml2
-rw-r--r--doc/classes/ARVRPositionalTracker.xml2
-rw-r--r--doc/classes/ARVRServer.xml2
-rw-r--r--doc/classes/AStar.xml2
-rw-r--r--doc/classes/AcceptDialog.xml2
-rw-r--r--doc/classes/AnimatedSprite.xml2
-rw-r--r--doc/classes/AnimatedSprite3D.xml2
-rw-r--r--doc/classes/Animation.xml2
-rw-r--r--doc/classes/AnimationPlayer.xml2
-rw-r--r--doc/classes/AnimationTreePlayer.xml2
-rw-r--r--doc/classes/Area.xml2
-rw-r--r--doc/classes/Area2D.xml2
-rw-r--r--doc/classes/Array.xml2
-rw-r--r--doc/classes/ArrayMesh.xml12
-rw-r--r--doc/classes/AtlasTexture.xml2
-rw-r--r--doc/classes/AudioBusLayout.xml2
-rw-r--r--doc/classes/AudioEffect.xml2
-rw-r--r--doc/classes/AudioEffectAmplify.xml2
-rw-r--r--doc/classes/AudioEffectBandLimitFilter.xml2
-rw-r--r--doc/classes/AudioEffectBandPassFilter.xml2
-rw-r--r--doc/classes/AudioEffectChorus.xml2
-rw-r--r--doc/classes/AudioEffectCompressor.xml2
-rw-r--r--doc/classes/AudioEffectDelay.xml2
-rw-r--r--doc/classes/AudioEffectDistortion.xml2
-rw-r--r--doc/classes/AudioEffectEQ.xml2
-rw-r--r--doc/classes/AudioEffectEQ10.xml2
-rw-r--r--doc/classes/AudioEffectEQ21.xml2
-rw-r--r--doc/classes/AudioEffectEQ6.xml2
-rw-r--r--doc/classes/AudioEffectFilter.xml2
-rw-r--r--doc/classes/AudioEffectHighPassFilter.xml2
-rw-r--r--doc/classes/AudioEffectHighShelfFilter.xml2
-rw-r--r--doc/classes/AudioEffectLimiter.xml2
-rw-r--r--doc/classes/AudioEffectLowPassFilter.xml2
-rw-r--r--doc/classes/AudioEffectLowShelfFilter.xml2
-rw-r--r--doc/classes/AudioEffectNotchFilter.xml2
-rw-r--r--doc/classes/AudioEffectPanner.xml2
-rw-r--r--doc/classes/AudioEffectPhaser.xml2
-rw-r--r--doc/classes/AudioEffectPitchShift.xml2
-rw-r--r--doc/classes/AudioEffectReverb.xml2
-rw-r--r--doc/classes/AudioEffectStereoEnhance.xml2
-rw-r--r--doc/classes/AudioServer.xml2
-rw-r--r--doc/classes/AudioStream.xml8
-rw-r--r--doc/classes/AudioStreamPlayback.xml2
-rw-r--r--doc/classes/AudioStreamPlayer.xml4
-rw-r--r--doc/classes/AudioStreamPlayer2D.xml4
-rw-r--r--doc/classes/AudioStreamPlayer3D.xml4
-rw-r--r--doc/classes/AudioStreamRandomPitch.xml2
-rw-r--r--doc/classes/AudioStreamSample.xml2
-rw-r--r--doc/classes/BackBufferCopy.xml2
-rw-r--r--doc/classes/BakedLightmap.xml2
-rw-r--r--doc/classes/BakedLightmapData.xml2
-rw-r--r--doc/classes/BaseButton.xml2
-rw-r--r--doc/classes/Basis.xml2
-rw-r--r--doc/classes/BitMap.xml2
-rw-r--r--doc/classes/BitmapFont.xml2
-rw-r--r--doc/classes/BoneAttachment.xml2
-rw-r--r--doc/classes/BoxContainer.xml2
-rw-r--r--doc/classes/BoxShape.xml2
-rw-r--r--doc/classes/Button.xml2
-rw-r--r--doc/classes/ButtonGroup.xml2
-rw-r--r--doc/classes/Camera.xml2
-rw-r--r--doc/classes/Camera2D.xml2
-rw-r--r--doc/classes/CanvasItem.xml2
-rw-r--r--doc/classes/CanvasItemMaterial.xml2
-rw-r--r--doc/classes/CanvasLayer.xml2
-rw-r--r--doc/classes/CanvasModulate.xml2
-rw-r--r--doc/classes/CapsuleMesh.xml2
-rw-r--r--doc/classes/CapsuleShape.xml2
-rw-r--r--doc/classes/CapsuleShape2D.xml2
-rw-r--r--doc/classes/CenterContainer.xml2
-rw-r--r--doc/classes/CheckBox.xml2
-rw-r--r--doc/classes/CheckButton.xml2
-rw-r--r--doc/classes/CircleShape2D.xml2
-rw-r--r--doc/classes/ClassDB.xml2
-rw-r--r--doc/classes/CollisionObject.xml2
-rw-r--r--doc/classes/CollisionObject2D.xml2
-rw-r--r--doc/classes/CollisionPolygon.xml2
-rw-r--r--doc/classes/CollisionPolygon2D.xml2
-rw-r--r--doc/classes/CollisionShape.xml2
-rw-r--r--doc/classes/CollisionShape2D.xml2
-rw-r--r--doc/classes/Color.xml2
-rw-r--r--doc/classes/ColorPicker.xml2
-rw-r--r--doc/classes/ColorPickerButton.xml2
-rw-r--r--doc/classes/ColorRect.xml2
-rw-r--r--doc/classes/ConcavePolygonShape.xml2
-rw-r--r--doc/classes/ConcavePolygonShape2D.xml2
-rw-r--r--doc/classes/ConeTwistJoint.xml2
-rw-r--r--doc/classes/ConfigFile.xml2
-rw-r--r--doc/classes/ConfirmationDialog.xml2
-rw-r--r--doc/classes/Container.xml2
-rw-r--r--doc/classes/Control.xml2
-rw-r--r--doc/classes/ConvexPolygonShape.xml2
-rw-r--r--doc/classes/ConvexPolygonShape2D.xml2
-rw-r--r--doc/classes/CubeMap.xml2
-rw-r--r--doc/classes/CubeMesh.xml2
-rw-r--r--doc/classes/Curve.xml2
-rw-r--r--doc/classes/Curve2D.xml2
-rw-r--r--doc/classes/Curve3D.xml2
-rw-r--r--doc/classes/CurveTexture.xml2
-rw-r--r--doc/classes/CylinderMesh.xml2
-rw-r--r--doc/classes/DampedSpringJoint2D.xml2
-rw-r--r--doc/classes/Dictionary.xml2
-rw-r--r--doc/classes/DirectionalLight.xml2
-rw-r--r--doc/classes/Directory.xml2
-rw-r--r--doc/classes/DynamicFont.xml2
-rw-r--r--doc/classes/DynamicFontData.xml2
-rw-r--r--doc/classes/EditorExportPlugin.xml2
-rw-r--r--doc/classes/EditorFileDialog.xml2
-rw-r--r--doc/classes/EditorFileSystem.xml2
-rw-r--r--doc/classes/EditorFileSystemDirectory.xml2
-rw-r--r--doc/classes/EditorImportPlugin.xml2
-rw-r--r--doc/classes/EditorInterface.xml2
-rw-r--r--doc/classes/EditorPlugin.xml2
-rw-r--r--doc/classes/EditorResourceConversionPlugin.xml2
-rw-r--r--doc/classes/EditorResourcePreview.xml2
-rw-r--r--doc/classes/EditorResourcePreviewGenerator.xml2
-rw-r--r--doc/classes/EditorSceneImporter.xml2
-rw-r--r--doc/classes/EditorScenePostImport.xml2
-rw-r--r--doc/classes/EditorScript.xml2
-rw-r--r--doc/classes/EditorSelection.xml2
-rw-r--r--doc/classes/EditorSettings.xml2
-rw-r--r--doc/classes/EditorSpatialGizmo.xml2
-rw-r--r--doc/classes/EncodedObjectAsID.xml2
-rw-r--r--doc/classes/Engine.xml2
-rw-r--r--doc/classes/Environment.xml2
-rw-r--r--doc/classes/File.xml2
-rw-r--r--doc/classes/FileDialog.xml2
-rw-r--r--doc/classes/Font.xml2
-rw-r--r--doc/classes/FuncRef.xml2
-rw-r--r--doc/classes/GIProbe.xml2
-rw-r--r--doc/classes/GIProbeData.xml2
-rw-r--r--doc/classes/Generic6DOFJoint.xml2
-rw-r--r--doc/classes/Geometry.xml2
-rw-r--r--doc/classes/GeometryInstance.xml2
-rw-r--r--doc/classes/Gradient.xml2
-rw-r--r--doc/classes/GradientTexture.xml2
-rw-r--r--doc/classes/GraphEdit.xml2
-rw-r--r--doc/classes/GraphNode.xml2
-rw-r--r--doc/classes/GridContainer.xml2
-rw-r--r--doc/classes/GrooveJoint2D.xml2
-rw-r--r--doc/classes/HBoxContainer.xml2
-rw-r--r--doc/classes/HScrollBar.xml2
-rw-r--r--doc/classes/HSeparator.xml2
-rw-r--r--doc/classes/HSlider.xml2
-rw-r--r--doc/classes/HSplitContainer.xml2
-rw-r--r--doc/classes/HTTPClient.xml2
-rw-r--r--doc/classes/HTTPRequest.xml2
-rw-r--r--doc/classes/HingeJoint.xml2
-rw-r--r--doc/classes/IP.xml2
-rw-r--r--doc/classes/IP_Unix.xml2
-rw-r--r--doc/classes/Image.xml2
-rw-r--r--doc/classes/ImageTexture.xml2
-rw-r--r--doc/classes/ImmediateGeometry.xml2
-rw-r--r--doc/classes/Input.xml2
-rw-r--r--doc/classes/InputDefault.xml2
-rw-r--r--doc/classes/InputEvent.xml2
-rw-r--r--doc/classes/InputEventAction.xml2
-rw-r--r--doc/classes/InputEventGesture.xml2
-rw-r--r--doc/classes/InputEventJoypadButton.xml2
-rw-r--r--doc/classes/InputEventJoypadMotion.xml2
-rw-r--r--doc/classes/InputEventKey.xml2
-rw-r--r--doc/classes/InputEventMagnifyGesture.xml2
-rw-r--r--doc/classes/InputEventMouse.xml2
-rw-r--r--doc/classes/InputEventMouseButton.xml2
-rw-r--r--doc/classes/InputEventMouseMotion.xml2
-rw-r--r--doc/classes/InputEventPanGesture.xml2
-rw-r--r--doc/classes/InputEventScreenDrag.xml2
-rw-r--r--doc/classes/InputEventScreenTouch.xml2
-rw-r--r--doc/classes/InputEventWithModifiers.xml2
-rw-r--r--doc/classes/InputMap.xml2
-rw-r--r--doc/classes/InstancePlaceholder.xml2
-rw-r--r--doc/classes/InterpolatedCamera.xml2
-rw-r--r--doc/classes/ItemList.xml2
-rw-r--r--doc/classes/JSON.xml2
-rw-r--r--doc/classes/JSONParseResult.xml2
-rw-r--r--doc/classes/JavaScript.xml2
-rw-r--r--doc/classes/Joint.xml2
-rw-r--r--doc/classes/Joint2D.xml2
-rw-r--r--doc/classes/KinematicBody.xml2
-rw-r--r--doc/classes/KinematicBody2D.xml2
-rw-r--r--doc/classes/KinematicCollision.xml2
-rw-r--r--doc/classes/KinematicCollision2D.xml2
-rw-r--r--doc/classes/Label.xml2
-rw-r--r--doc/classes/LargeTexture.xml2
-rw-r--r--doc/classes/Light.xml2
-rw-r--r--doc/classes/Light2D.xml2
-rw-r--r--doc/classes/LightOccluder2D.xml2
-rw-r--r--doc/classes/Line2D.xml2
-rw-r--r--doc/classes/LineEdit.xml2
-rw-r--r--doc/classes/LineShape2D.xml2
-rw-r--r--doc/classes/LinkButton.xml2
-rw-r--r--doc/classes/Listener.xml2
-rw-r--r--doc/classes/MainLoop.xml2
-rw-r--r--doc/classes/MarginContainer.xml2
-rw-r--r--doc/classes/Marshalls.xml2
-rw-r--r--doc/classes/Material.xml2
-rw-r--r--doc/classes/MenuButton.xml2
-rw-r--r--doc/classes/Mesh.xml2
-rw-r--r--doc/classes/MeshDataTool.xml2
-rw-r--r--doc/classes/MeshInstance.xml2
-rw-r--r--doc/classes/MeshLibrary.xml2
-rw-r--r--doc/classes/MultiMesh.xml2
-rw-r--r--doc/classes/MultiMeshInstance.xml2
-rw-r--r--doc/classes/Mutex.xml2
-rw-r--r--doc/classes/Navigation.xml2
-rw-r--r--doc/classes/Navigation2D.xml2
-rw-r--r--doc/classes/NavigationMesh.xml2
-rw-r--r--doc/classes/NavigationMeshInstance.xml2
-rw-r--r--doc/classes/NavigationPolygon.xml2
-rw-r--r--doc/classes/NavigationPolygonInstance.xml2
-rw-r--r--doc/classes/NetworkedMultiplayerPeer.xml2
-rw-r--r--doc/classes/Nil.xml2
-rw-r--r--doc/classes/NinePatchRect.xml2
-rw-r--r--doc/classes/Node.xml2
-rw-r--r--doc/classes/Node2D.xml2
-rw-r--r--doc/classes/NodePath.xml2
-rw-r--r--doc/classes/OS.xml28
-rw-r--r--doc/classes/Object.xml2
-rw-r--r--doc/classes/OccluderPolygon2D.xml2
-rw-r--r--doc/classes/OmniLight.xml2
-rw-r--r--doc/classes/OptionButton.xml2
-rw-r--r--doc/classes/PCKPacker.xml2
-rw-r--r--doc/classes/PHashTranslation.xml2
-rw-r--r--doc/classes/PackedDataContainer.xml2
-rw-r--r--doc/classes/PackedDataContainerRef.xml2
-rw-r--r--doc/classes/PackedScene.xml2
-rw-r--r--doc/classes/PacketPeer.xml2
-rw-r--r--doc/classes/PacketPeerStream.xml2
-rw-r--r--doc/classes/PacketPeerUDP.xml2
-rw-r--r--doc/classes/Panel.xml2
-rw-r--r--doc/classes/PanelContainer.xml2
-rw-r--r--doc/classes/PanoramaSky.xml2
-rw-r--r--doc/classes/ParallaxBackground.xml2
-rw-r--r--doc/classes/ParallaxLayer.xml2
-rw-r--r--doc/classes/Particles.xml2
-rw-r--r--doc/classes/Particles2D.xml2
-rw-r--r--doc/classes/ParticlesMaterial.xml2
-rw-r--r--doc/classes/Path.xml2
-rw-r--r--doc/classes/Path2D.xml2
-rw-r--r--doc/classes/PathFollow.xml2
-rw-r--r--doc/classes/PathFollow2D.xml2
-rw-r--r--doc/classes/Performance.xml2
-rw-r--r--doc/classes/Physics2DDirectBodyState.xml2
-rw-r--r--doc/classes/Physics2DDirectBodyStateSW.xml2
-rw-r--r--doc/classes/Physics2DDirectSpaceState.xml2
-rw-r--r--doc/classes/Physics2DServer.xml2
-rw-r--r--doc/classes/Physics2DServerSW.xml2
-rw-r--r--doc/classes/Physics2DShapeQueryParameters.xml2
-rw-r--r--doc/classes/Physics2DShapeQueryResult.xml2
-rw-r--r--doc/classes/Physics2DTestMotionResult.xml2
-rw-r--r--doc/classes/PhysicsBody.xml2
-rw-r--r--doc/classes/PhysicsBody2D.xml2
-rw-r--r--doc/classes/PhysicsDirectBodyState.xml2
-rw-r--r--doc/classes/PhysicsDirectSpaceState.xml2
-rw-r--r--doc/classes/PhysicsServer.xml2
-rw-r--r--doc/classes/PhysicsShapeQueryParameters.xml2
-rw-r--r--doc/classes/PhysicsShapeQueryResult.xml2
-rw-r--r--doc/classes/PinJoint.xml2
-rw-r--r--doc/classes/PinJoint2D.xml2
-rw-r--r--doc/classes/Plane.xml2
-rw-r--r--doc/classes/PlaneMesh.xml2
-rw-r--r--doc/classes/PlaneShape.xml2
-rw-r--r--doc/classes/Polygon2D.xml2
-rw-r--r--doc/classes/PolygonPathFinder.xml2
-rw-r--r--doc/classes/PoolByteArray.xml2
-rw-r--r--doc/classes/PoolColorArray.xml2
-rw-r--r--doc/classes/PoolIntArray.xml2
-rw-r--r--doc/classes/PoolRealArray.xml2
-rw-r--r--doc/classes/PoolStringArray.xml2
-rw-r--r--doc/classes/PoolVector2Array.xml2
-rw-r--r--doc/classes/PoolVector3Array.xml2
-rw-r--r--doc/classes/Popup.xml2
-rw-r--r--doc/classes/PopupDialog.xml2
-rw-r--r--doc/classes/PopupMenu.xml2
-rw-r--r--doc/classes/PopupPanel.xml2
-rw-r--r--doc/classes/Position2D.xml2
-rw-r--r--doc/classes/Position3D.xml2
-rw-r--r--doc/classes/PrimitiveMesh.xml2
-rw-r--r--doc/classes/PrismMesh.xml2
-rw-r--r--doc/classes/ProceduralSky.xml2
-rw-r--r--doc/classes/ProgressBar.xml2
-rw-r--r--doc/classes/ProjectSettings.xml2
-rw-r--r--doc/classes/ProximityGroup.xml2
-rw-r--r--doc/classes/ProxyTexture.xml2
-rw-r--r--doc/classes/QuadMesh.xml2
-rw-r--r--doc/classes/Quat.xml2
-rw-r--r--doc/classes/RID.xml2
-rw-r--r--doc/classes/Range.xml2
-rw-r--r--doc/classes/RayCast.xml2
-rw-r--r--doc/classes/RayCast2D.xml2
-rw-r--r--doc/classes/RayShape.xml2
-rw-r--r--doc/classes/RayShape2D.xml2
-rw-r--r--doc/classes/Rect2.xml2
-rw-r--r--doc/classes/RectangleShape2D.xml2
-rw-r--r--doc/classes/Reference.xml2
-rw-r--r--doc/classes/ReferenceRect.xml2
-rw-r--r--doc/classes/ReflectionProbe.xml2
-rw-r--r--doc/classes/RemoteTransform.xml2
-rw-r--r--doc/classes/RemoteTransform2D.xml2
-rw-r--r--doc/classes/Resource.xml2
-rw-r--r--doc/classes/ResourceImporter.xml2
-rw-r--r--doc/classes/ResourceInteractiveLoader.xml2
-rw-r--r--doc/classes/ResourceLoader.xml2
-rw-r--r--doc/classes/ResourcePreloader.xml2
-rw-r--r--doc/classes/ResourceSaver.xml2
-rw-r--r--doc/classes/RichTextLabel.xml2
-rw-r--r--doc/classes/RigidBody.xml9
-rw-r--r--doc/classes/RigidBody2D.xml8
-rw-r--r--doc/classes/SceneState.xml2
-rw-r--r--doc/classes/SceneTree.xml2
-rw-r--r--doc/classes/SceneTreeTimer.xml2
-rw-r--r--doc/classes/Script.xml2
-rw-r--r--doc/classes/ScriptEditor.xml2
-rw-r--r--doc/classes/ScrollBar.xml2
-rw-r--r--doc/classes/ScrollContainer.xml2
-rw-r--r--doc/classes/SegmentShape2D.xml2
-rw-r--r--doc/classes/Semaphore.xml2
-rw-r--r--doc/classes/Separator.xml2
-rw-r--r--doc/classes/Shader.xml2
-rw-r--r--doc/classes/ShaderMaterial.xml2
-rw-r--r--doc/classes/Shape.xml2
-rw-r--r--doc/classes/Shape2D.xml2
-rw-r--r--doc/classes/ShortCut.xml2
-rw-r--r--doc/classes/Skeleton.xml2
-rw-r--r--doc/classes/Sky.xml2
-rw-r--r--doc/classes/Slider.xml2
-rw-r--r--doc/classes/SliderJoint.xml2
-rw-r--r--doc/classes/Spatial.xml2
-rw-r--r--doc/classes/SpatialGizmo.xml2
-rw-r--r--doc/classes/SpatialMaterial.xml2
-rw-r--r--doc/classes/SpatialVelocityTracker.xml2
-rw-r--r--doc/classes/SphereMesh.xml2
-rw-r--r--doc/classes/SphereShape.xml2
-rw-r--r--doc/classes/SpinBox.xml2
-rw-r--r--doc/classes/SplitContainer.xml2
-rw-r--r--doc/classes/SpotLight.xml2
-rw-r--r--doc/classes/Sprite.xml2
-rw-r--r--doc/classes/Sprite3D.xml2
-rw-r--r--doc/classes/SpriteBase3D.xml2
-rw-r--r--doc/classes/SpriteFrames.xml2
-rw-r--r--doc/classes/StaticBody.xml2
-rw-r--r--doc/classes/StaticBody2D.xml2
-rw-r--r--doc/classes/StreamPeer.xml2
-rw-r--r--doc/classes/StreamPeerBuffer.xml2
-rw-r--r--doc/classes/StreamPeerSSL.xml2
-rw-r--r--doc/classes/StreamPeerTCP.xml22
-rw-r--r--doc/classes/StreamTexture.xml2
-rw-r--r--doc/classes/String.xml2
-rw-r--r--doc/classes/StyleBox.xml2
-rw-r--r--doc/classes/StyleBoxEmpty.xml2
-rw-r--r--doc/classes/StyleBoxFlat.xml2
-rw-r--r--doc/classes/StyleBoxLine.xml2
-rw-r--r--doc/classes/StyleBoxTexture.xml2
-rw-r--r--doc/classes/SurfaceTool.xml2
-rw-r--r--doc/classes/TCP_Server.xml2
-rw-r--r--doc/classes/TabContainer.xml2
-rw-r--r--doc/classes/Tabs.xml2
-rw-r--r--doc/classes/TextEdit.xml2
-rw-r--r--doc/classes/Texture.xml2
-rw-r--r--doc/classes/TextureButton.xml2
-rw-r--r--doc/classes/TextureProgress.xml2
-rw-r--r--doc/classes/TextureRect.xml2
-rw-r--r--doc/classes/Theme.xml2
-rw-r--r--doc/classes/Thread.xml2
-rw-r--r--doc/classes/TileMap.xml2
-rw-r--r--doc/classes/TileSet.xml2
-rw-r--r--doc/classes/Timer.xml2
-rw-r--r--doc/classes/ToolButton.xml2
-rw-r--r--doc/classes/TouchScreenButton.xml2
-rw-r--r--doc/classes/Transform.xml2
-rw-r--r--doc/classes/Transform2D.xml2
-rw-r--r--doc/classes/Translation.xml2
-rw-r--r--doc/classes/TranslationServer.xml2
-rw-r--r--doc/classes/Tree.xml2
-rw-r--r--doc/classes/TreeItem.xml2
-rw-r--r--doc/classes/TriangleMesh.xml2
-rw-r--r--doc/classes/Tween.xml2
-rw-r--r--doc/classes/UndoRedo.xml2
-rw-r--r--doc/classes/VBoxContainer.xml2
-rw-r--r--doc/classes/VScrollBar.xml2
-rw-r--r--doc/classes/VSeparator.xml2
-rw-r--r--doc/classes/VSlider.xml2
-rw-r--r--doc/classes/VSplitContainer.xml2
-rw-r--r--doc/classes/Variant.xml2
-rw-r--r--doc/classes/Vector2.xml2
-rw-r--r--doc/classes/Vector3.xml2
-rw-r--r--doc/classes/VehicleBody.xml2
-rw-r--r--doc/classes/VehicleWheel.xml2
-rw-r--r--doc/classes/VideoPlayer.xml2
-rw-r--r--doc/classes/VideoStream.xml2
-rw-r--r--doc/classes/Viewport.xml4
-rw-r--r--doc/classes/ViewportContainer.xml2
-rw-r--r--doc/classes/ViewportTexture.xml2
-rw-r--r--doc/classes/VisibilityEnabler.xml2
-rw-r--r--doc/classes/VisibilityEnabler2D.xml2
-rw-r--r--doc/classes/VisibilityNotifier.xml2
-rw-r--r--doc/classes/VisibilityNotifier2D.xml2
-rw-r--r--doc/classes/VisualInstance.xml2
-rw-r--r--doc/classes/VisualServer.xml1852
-rw-r--r--doc/classes/WeakRef.xml2
-rw-r--r--doc/classes/WebSocketClient.xml53
-rw-r--r--doc/classes/WebSocketMultiplayerPeer.xml31
-rw-r--r--doc/classes/WebSocketPeer.xml51
-rw-r--r--doc/classes/WebSocketServer.xml69
-rw-r--r--doc/classes/WindowDialog.xml2
-rw-r--r--doc/classes/World.xml2
-rw-r--r--doc/classes/World2D.xml2
-rw-r--r--doc/classes/WorldEnvironment.xml2
-rw-r--r--doc/classes/XMLParser.xml2
-rw-r--r--doc/classes/YSort.xml2
-rw-r--r--doc/classes/bool.xml2
-rw-r--r--doc/classes/float.xml2
-rw-r--r--doc/classes/int.xml2
-rw-r--r--doc/tools/makemd.py21
-rw-r--r--editor/icons/SCsub8
-rw-r--r--editor/import/editor_import_plugin.cpp4
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp3276
-rw-r--r--editor/plugins/canvas_item_editor_plugin.h125
-rw-r--r--editor/plugins/script_editor_plugin.cpp5
-rw-r--r--editor/plugins/script_editor_plugin.h1
-rw-r--r--editor/plugins/script_text_editor.cpp26
-rw-r--r--editor/project_manager.cpp10
-rw-r--r--editor/scene_tree_editor.cpp51
-rw-r--r--editor/scene_tree_editor.h3
-rw-r--r--main/main.cpp56
-rw-r--r--main/main.h1
-rw-r--r--modules/bullet/doc_classes/BulletPhysicsDirectBodyState.xml2
-rw-r--r--modules/bullet/doc_classes/BulletPhysicsServer.xml2
-rw-r--r--modules/bullet/rigid_body_bullet.cpp8
-rw-r--r--modules/bullet/rigid_body_bullet.h2
-rw-r--r--modules/enet/doc_classes/NetworkedMultiplayerENet.xml2
-rw-r--r--modules/gdnative/doc_classes/ARVRInterfaceGDNative.xml2
-rw-r--r--modules/gdnative/doc_classes/GDNative.xml2
-rw-r--r--modules/gdnative/doc_classes/GDNativeLibrary.xml2
-rw-r--r--modules/gdnative/doc_classes/PluginScript.xml2
-rw-r--r--modules/gdscript/doc_classes/GDScript.xml2
-rw-r--r--modules/gdscript/doc_classes/GDScriptFunctionState.xml2
-rw-r--r--modules/gdscript/doc_classes/GDScriptNativeClass.xml2
-rw-r--r--modules/gridmap/doc_classes/GridMap.xml2
-rw-r--r--modules/gridmap/grid_map_editor_plugin.cpp20
-rw-r--r--modules/gridmap/grid_map_editor_plugin.h1
-rw-r--r--modules/mobile_vr/doc_classes/MobileVRInterface.xml2
-rw-r--r--modules/mono/doc_classes/@C#.xml2
-rw-r--r--modules/mono/doc_classes/CSharpScript.xml2
-rw-r--r--modules/mono/doc_classes/GodotSharp.xml2
-rw-r--r--modules/mono/editor/bindings_generator.cpp5
-rw-r--r--modules/mono/glue/cs_files/Basis.cs6
-rw-r--r--modules/mono/mono_gd/gd_mono.cpp18
-rw-r--r--modules/mono/mono_gd/gd_mono_marshal.h6
-rw-r--r--modules/regex/doc_classes/RegEx.xml2
-rw-r--r--modules/regex/doc_classes/RegExMatch.xml2
-rw-r--r--modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml2
-rw-r--r--modules/stb_vorbis/doc_classes/ResourceImporterOGGVorbis.xml2
-rw-r--r--modules/theora/doc_classes/ResourceImporterTheora.xml2
-rw-r--r--modules/theora/doc_classes/VideoStreamTheora.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScript.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptClassConstant.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptComment.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptCondition.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptConstant.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptConstructor.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptCustomNode.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptDeconstruct.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptEditor.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptEmitSignal.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptEngineSingleton.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptExpression.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptFunction.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptFunctionCall.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptFunctionState.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptGlobalConstant.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptIndexGet.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptIndexSet.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptInputAction.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptIterator.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptLocalVar.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptMathConstant.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptNode.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptOperator.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptPreload.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptPropertyGet.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptPropertySet.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptResourcePath.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptReturn.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSceneNode.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSceneTree.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSelect.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSelf.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSequence.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSubCall.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSwitch.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptTypeCast.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptVariableGet.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptVariableSet.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptWhile.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptYield.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptYieldSignal.xml2
-rw-r--r--modules/webm/doc_classes/ResourceImporterWebm.xml2
-rw-r--r--modules/webm/doc_classes/VideoStreamWebm.xml2
-rw-r--r--platform/android/audio_driver_jandroid.cpp24
-rw-r--r--platform/android/audio_driver_opensl.cpp2
-rw-r--r--platform/android/dir_access_jandroid.cpp15
-rw-r--r--platform/android/file_access_jandroid.cpp27
-rw-r--r--platform/android/godot_android.cpp16
-rw-r--r--platform/android/java/src/org/godotengine/godot/Godot.java48
-rw-r--r--platform/android/java_class_wrapper.cpp8
-rw-r--r--platform/android/java_glue.cpp68
-rw-r--r--platform/osx/SCsub6
-rw-r--r--platform/osx/crash_handler_osx.mm12
-rw-r--r--platform/osx/detect.py26
-rw-r--r--platform/osx/export/export.cpp16
-rw-r--r--platform/windows/SCsub6
-rw-r--r--platform/x11/SCsub6
-rw-r--r--platform/x11/os_x11.cpp10
-rw-r--r--scene/2d/animated_sprite.cpp83
-rw-r--r--scene/2d/animated_sprite.h6
-rw-r--r--scene/2d/canvas_item.h2
-rw-r--r--scene/2d/light_2d.cpp36
-rw-r--r--scene/2d/light_2d.h3
-rw-r--r--scene/2d/node_2d.cpp9
-rw-r--r--scene/2d/polygon_2d.cpp42
-rw-r--r--scene/2d/polygon_2d.h19
-rw-r--r--scene/2d/sprite.cpp20
-rw-r--r--scene/2d/sprite.h3
-rw-r--r--scene/3d/baked_lightmap.cpp2
-rw-r--r--scene/gui/base_button.cpp2
-rw-r--r--scene/gui/control.cpp50
-rw-r--r--scene/gui/option_button.cpp3
-rw-r--r--servers/physics/body_sw.h11
-rw-r--r--servers/physics_2d/collision_object_2d_sw.cpp1
-rw-r--r--servers/physics_server.cpp2
-rw-r--r--servers/physics_server.h2
-rw-r--r--servers/visual/shader_language.cpp38
-rw-r--r--servers/visual_server.cpp6
548 files changed, 4610 insertions, 2869 deletions
diff --git a/core/project_settings.cpp b/core/project_settings.cpp
index 0991c0df68..b7fd6d7318 100644
--- a/core/project_settings.cpp
+++ b/core/project_settings.cpp
@@ -268,12 +268,12 @@ Error ProjectSettings::setup(const String &p_path, const String &p_main_pack, bo
if (FileAccessNetworkClient::get_singleton()) {
- if (_load_settings("res://project.godot") == OK || _load_settings_binary("res://project.binary") == OK) {
-
- _load_settings("res://override.cfg");
+ Error err = _load_settings_text_or_binary("res://project.godot", "res://project.binary");
+ if (err == OK) {
+ // Optional, we don't mind if it fails
+ _load_settings_text("res://override.cfg");
}
-
- return OK;
+ return err;
}
String exec_path = OS::get_singleton()->get_executable_path();
@@ -285,12 +285,13 @@ Error ProjectSettings::setup(const String &p_path, const String &p_main_pack, bo
bool ok = _load_resource_pack(p_main_pack);
ERR_FAIL_COND_V(!ok, ERR_CANT_OPEN);
- if (_load_settings("res://project.godot") == OK || _load_settings_binary("res://project.binary") == OK) {
- //load override from location of the main pack
- _load_settings(p_main_pack.get_base_dir().plus_file("override.cfg"));
+ Error err = _load_settings_text_or_binary("res://project.godot", "res://project.binary");
+ if (err == OK) {
+ // Load override from location of the main pack
+ // Optional, we don't mind if it fails
+ _load_settings_text(p_main_pack.get_base_dir().plus_file("override.cfg"));
}
-
- return OK;
+ return err;
}
//Attempt with execname.pck
@@ -313,12 +314,13 @@ Error ProjectSettings::setup(const String &p_path, const String &p_main_pack, bo
// if we opened our package, try and load our project...
if (found) {
- if (_load_settings("res://project.godot") == OK || _load_settings_binary("res://project.binary") == OK) {
- // load override from location of executable
- _load_settings(exec_path.get_base_dir().plus_file("override.cfg"));
+ Error err = _load_settings_text_or_binary("res://project.godot", "res://project.binary");
+ if (err == OK) {
+ // Load override from location of executable
+ // Optional, we don't mind if it fails
+ _load_settings_text(exec_path.get_base_dir().plus_file("override.cfg"));
}
-
- return OK;
+ return err;
}
}
@@ -334,11 +336,13 @@ Error ProjectSettings::setup(const String &p_path, const String &p_main_pack, bo
// data.pck and data.zip are deprecated and no longer supported, apologies.
// make sure this is loaded from the resource path
- if (_load_settings("res://project.godot") == OK || _load_settings_binary("res://project.binary") == OK) {
- _load_settings("res://override.cfg");
+ Error err = _load_settings_text_or_binary("res://project.godot", "res://project.binary");
+ if (err == OK) {
+ // Optional, we don't mind if it fails
+ _load_settings_text("res://override.cfg");
}
- return OK;
+ return err;
}
//Nothing was found, try to find a project.godot somewhere!
@@ -350,20 +354,23 @@ Error ProjectSettings::setup(const String &p_path, const String &p_main_pack, bo
String candidate = d->get_current_dir();
String current_dir = d->get_current_dir();
+
bool found = false;
+ Error err;
while (true) {
- //try to load settings in ascending through dirs shape!
-
- if (_load_settings(current_dir + "/project.godot") == OK || _load_settings_binary(current_dir + "/project.binary") == OK) {
- _load_settings(current_dir + "/override.cfg");
+ err = _load_settings_text_or_binary(current_dir.plus_file("project.godot"), current_dir.plus_file("project.binary"));
+ if (err == OK) {
+ // Optional, we don't mind if it fails
+ _load_settings_text(current_dir.plus_file("override.cfg"));
candidate = current_dir;
found = true;
break;
}
if (p_upwards) {
+ // Try to load settings ascending through dirs shape!
d->change_dir("..");
if (d->get_current_dir() == current_dir)
break; //not doing anything useful
@@ -378,7 +385,7 @@ Error ProjectSettings::setup(const String &p_path, const String &p_main_pack, bo
memdelete(d);
if (!found)
- return ERR_FILE_NOT_FOUND;
+ return err;
if (resource_path.length() && resource_path[resource_path.length() - 1] == '/')
resource_path = resource_path.substr(0, resource_path.length() - 1); // chop end
@@ -440,7 +447,8 @@ Error ProjectSettings::_load_settings_binary(const String p_path) {
return OK;
}
-Error ProjectSettings::_load_settings(const String p_path) {
+
+Error ProjectSettings::_load_settings_text(const String p_path) {
Error err;
FileAccess *f = FileAccess::open(p_path, FileAccess::READ, &err);
@@ -471,7 +479,7 @@ Error ProjectSettings::_load_settings(const String p_path) {
memdelete(f);
return OK;
} else if (err != OK) {
- ERR_PRINTS("ProjectSettings::load - " + p_path + ":" + itos(lines) + " error: " + error_text);
+ ERR_PRINTS("Error parsing " + p_path + " at line " + itos(lines) + ": " + error_text + " File might be corrupted.");
memdelete(f);
return err;
}
@@ -497,6 +505,22 @@ Error ProjectSettings::_load_settings(const String p_path) {
return OK;
}
+Error ProjectSettings::_load_settings_text_or_binary(const String p_text_path, const String p_bin_path) {
+
+ // Attempt first to load the text-based project.godot file
+ Error err_text = _load_settings_text(p_text_path);
+ if (err_text == OK) {
+ return OK;
+ } else if (err_text != ERR_FILE_NOT_FOUND) {
+ // If the text-based file exists but can't be loaded, we want to know it
+ return err_text;
+ }
+
+ // Fallback to binary project.binary file if text-based was not found
+ Error err_bin = _load_settings_binary(p_bin_path);
+ return err_bin;
+}
+
int ProjectSettings::get_order(const String &p_name) const {
ERR_FAIL_COND_V(!props.has(p_name), -1);
@@ -525,7 +549,7 @@ void ProjectSettings::clear(const String &p_name) {
Error ProjectSettings::save() {
- return save_custom(get_resource_path() + "/project.godot");
+ return save_custom(get_resource_path().plus_file("project.godot"));
}
Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<String, List<String> > &props, const CustomMap &p_custom, const String &p_custom_features) {
diff --git a/core/project_settings.h b/core/project_settings.h
index eba53441cf..9b51bc3ac3 100644
--- a/core/project_settings.h
+++ b/core/project_settings.h
@@ -93,8 +93,9 @@ protected:
static ProjectSettings *singleton;
- Error _load_settings(const String p_path);
+ Error _load_settings_text(const String p_path);
Error _load_settings_binary(const String p_path);
+ Error _load_settings_text_or_binary(const String p_text_path, const String p_bin_path);
Error _save_settings_text(const String &p_file, const Map<String, List<String> > &props, const CustomMap &p_custom = CustomMap(), const String &p_custom_features = String());
Error _save_settings_binary(const String &p_file, const Map<String, List<String> > &props, const CustomMap &p_custom = CustomMap(), const String &p_custom_features = String());
diff --git a/doc/classes/@GDScript.xml b/doc/classes/@GDScript.xml
index 4e9a6a5fc0..2444dc4cba 100644
--- a/doc/classes/@GDScript.xml
+++ b/doc/classes/@GDScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="@GDScript" category="Core" version="3.0-stable">
+<class name="@GDScript" category="Core" version="3.1-dev">
<brief_description>
Built-in GDScript functions.
</brief_description>
@@ -20,7 +20,7 @@
</argument>
<argument index="2" name="b8" type="int">
</argument>
- <argument index="3" name="a8" type="int">
+ <argument index="3" name="a8" type="int" default="255">
</argument>
<description>
Returns a 32 bit color with red, green, blue and alpha channels. Each channel has 8 bits of information ranging from 0 to 255.
@@ -38,7 +38,7 @@
</return>
<argument index="0" name="name" type="String">
</argument>
- <argument index="1" name="alpha" type="float">
+ <argument index="1" name="alpha" type="float" default="1.0">
</argument>
<description>
Returns a color according to the standardised [code]name[/code] with [code]alpha[/code] ranging from 0 to 1.
@@ -1131,9 +1131,9 @@
<method name="yield">
<return type="GDScriptFunctionState">
</return>
- <argument index="0" name="object" type="Object">
+ <argument index="0" name="object" type="Object" default="null">
</argument>
- <argument index="1" name="signal" type="String">
+ <argument index="1" name="signal" type="String" default="&quot;&quot;">
</argument>
<description>
Stops the function execution and returns the current state. Call [method GDScriptFunctionState.resume] on the state to resume execution. This invalidates the state.
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index 1f6256f8c9..a434c68a4f 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="@GlobalScope" category="Core" version="3.0-stable">
+<class name="@GlobalScope" category="Core" version="3.1-dev">
<brief_description>
Global scope constants and variables.
</brief_description>
diff --git a/doc/classes/@NativeScript.xml b/doc/classes/@NativeScript.xml
index 8fde9e3dc3..cc4e97314e 100644
--- a/doc/classes/@NativeScript.xml
+++ b/doc/classes/@NativeScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="@NativeScript" category="Core" version="3.0-stable">
+<class name="@NativeScript" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/@VisualScript.xml b/doc/classes/@VisualScript.xml
index 4867a5a22b..f3a951f722 100644
--- a/doc/classes/@VisualScript.xml
+++ b/doc/classes/@VisualScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="@VisualScript" category="Core" version="3.0-stable">
+<class name="@VisualScript" category="Core" version="3.1-dev">
<brief_description>
Built-in visual script functions.
</brief_description>
diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml
index f253d49dc0..c0eb8cb417 100644
--- a/doc/classes/AABB.xml
+++ b/doc/classes/AABB.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AABB" category="Built-In Types" version="3.0-stable">
+<class name="AABB" category="Built-In Types" version="3.1-dev">
<brief_description>
Axis-Aligned Bounding Box.
</brief_description>
diff --git a/doc/classes/ARVRAnchor.xml b/doc/classes/ARVRAnchor.xml
index cc9370e8fe..735b1a8e8f 100644
--- a/doc/classes/ARVRAnchor.xml
+++ b/doc/classes/ARVRAnchor.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ARVRAnchor" inherits="Spatial" category="Core" version="3.0-stable">
+<class name="ARVRAnchor" inherits="Spatial" category="Core" version="3.1-dev">
<brief_description>
Anchor point in AR Space
</brief_description>
diff --git a/doc/classes/ARVRCamera.xml b/doc/classes/ARVRCamera.xml
index b603a69337..e8cf433e2b 100644
--- a/doc/classes/ARVRCamera.xml
+++ b/doc/classes/ARVRCamera.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ARVRCamera" inherits="Camera" category="Core" version="3.0-stable">
+<class name="ARVRCamera" inherits="Camera" category="Core" version="3.1-dev">
<brief_description>
A camera node with a few overrules for AR/VR applied such as location tracking.
</brief_description>
diff --git a/doc/classes/ARVRController.xml b/doc/classes/ARVRController.xml
index 07692f5ab2..e9d8f9d568 100644
--- a/doc/classes/ARVRController.xml
+++ b/doc/classes/ARVRController.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ARVRController" inherits="Spatial" category="Core" version="3.0-stable">
+<class name="ARVRController" inherits="Spatial" category="Core" version="3.1-dev">
<brief_description>
A spatial node representing a spatially tracked controller.
</brief_description>
diff --git a/doc/classes/ARVRInterface.xml b/doc/classes/ARVRInterface.xml
index bf9dde7706..ed59b4329b 100644
--- a/doc/classes/ARVRInterface.xml
+++ b/doc/classes/ARVRInterface.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ARVRInterface" inherits="Reference" category="Core" version="3.0-stable">
+<class name="ARVRInterface" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
Base class for ARVR interface implementation.
</brief_description>
diff --git a/doc/classes/ARVROrigin.xml b/doc/classes/ARVROrigin.xml
index ec9b79bf84..1b998815aa 100644
--- a/doc/classes/ARVROrigin.xml
+++ b/doc/classes/ARVROrigin.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ARVROrigin" inherits="Spatial" category="Core" version="3.0-stable">
+<class name="ARVROrigin" inherits="Spatial" category="Core" version="3.1-dev">
<brief_description>
Our origin point in AR/VR.
</brief_description>
diff --git a/doc/classes/ARVRPositionalTracker.xml b/doc/classes/ARVRPositionalTracker.xml
index ea2139406b..2d1e85e4c4 100644
--- a/doc/classes/ARVRPositionalTracker.xml
+++ b/doc/classes/ARVRPositionalTracker.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ARVRPositionalTracker" inherits="Object" category="Core" version="3.0-stable">
+<class name="ARVRPositionalTracker" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
A tracked object
</brief_description>
diff --git a/doc/classes/ARVRServer.xml b/doc/classes/ARVRServer.xml
index 29d217d1d3..8e5dc146ad 100644
--- a/doc/classes/ARVRServer.xml
+++ b/doc/classes/ARVRServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ARVRServer" inherits="Object" category="Core" version="3.0-stable">
+<class name="ARVRServer" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
This is our AR/VR Server.
</brief_description>
diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml
index 0573e4edf0..1a192f861b 100644
--- a/doc/classes/AStar.xml
+++ b/doc/classes/AStar.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AStar" inherits="Reference" category="Core" version="3.0-stable">
+<class name="AStar" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
AStar class representation that uses vectors as edges.
</brief_description>
diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml
index a6cc40238b..614e2e9430 100644
--- a/doc/classes/AcceptDialog.xml
+++ b/doc/classes/AcceptDialog.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AcceptDialog" inherits="WindowDialog" category="Core" version="3.0-stable">
+<class name="AcceptDialog" inherits="WindowDialog" category="Core" version="3.1-dev">
<brief_description>
Base dialog for user notification.
</brief_description>
diff --git a/doc/classes/AnimatedSprite.xml b/doc/classes/AnimatedSprite.xml
index 3e67fd6840..a4892a4c71 100644
--- a/doc/classes/AnimatedSprite.xml
+++ b/doc/classes/AnimatedSprite.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimatedSprite" inherits="Node2D" category="Core" version="3.0-stable">
+<class name="AnimatedSprite" inherits="Node2D" category="Core" version="3.1-dev">
<brief_description>
Sprite node that can use multiple textures for animation.
</brief_description>
diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml
index f72211776e..358524d761 100644
--- a/doc/classes/AnimatedSprite3D.xml
+++ b/doc/classes/AnimatedSprite3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimatedSprite3D" inherits="SpriteBase3D" category="Core" version="3.0-stable">
+<class name="AnimatedSprite3D" inherits="SpriteBase3D" category="Core" version="3.1-dev">
<brief_description>
2D sprite node in 3D world, that can use multiple 2D textures for animation.
</brief_description>
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
index f8c94dd12d..96e78bae9d 100644
--- a/doc/classes/Animation.xml
+++ b/doc/classes/Animation.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Animation" inherits="Resource" category="Core" version="3.0-stable">
+<class name="Animation" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
Contains data used to animate everything in the engine.
</brief_description>
diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml
index b15f0ec732..d791cd88dd 100644
--- a/doc/classes/AnimationPlayer.xml
+++ b/doc/classes/AnimationPlayer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationPlayer" inherits="Node" category="Core" version="3.0-stable">
+<class name="AnimationPlayer" inherits="Node" category="Core" version="3.1-dev">
<brief_description>
Container and player of [Animation] resources.
</brief_description>
diff --git a/doc/classes/AnimationTreePlayer.xml b/doc/classes/AnimationTreePlayer.xml
index c09121857e..ca743bfb29 100644
--- a/doc/classes/AnimationTreePlayer.xml
+++ b/doc/classes/AnimationTreePlayer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationTreePlayer" inherits="Node" category="Core" version="3.0-stable">
+<class name="AnimationTreePlayer" inherits="Node" category="Core" version="3.1-dev">
<brief_description>
Animation Player that uses a node graph for blending Animations.
</brief_description>
diff --git a/doc/classes/Area.xml b/doc/classes/Area.xml
index 2853159c0e..3c8a6a9269 100644
--- a/doc/classes/Area.xml
+++ b/doc/classes/Area.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Area" inherits="CollisionObject" category="Core" version="3.0-stable">
+<class name="Area" inherits="CollisionObject" category="Core" version="3.1-dev">
<brief_description>
General purpose area node for detection and 3D physics influence.
</brief_description>
diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml
index 8e8382d5de..3cfabee27f 100644
--- a/doc/classes/Area2D.xml
+++ b/doc/classes/Area2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Area2D" inherits="CollisionObject2D" category="Core" version="3.0-stable">
+<class name="Area2D" inherits="CollisionObject2D" category="Core" version="3.1-dev">
<brief_description>
2D area for detection and 2D physics influence.
</brief_description>
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index 4d282761fe..9734a175b8 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Array" category="Built-In Types" version="3.0-stable">
+<class name="Array" category="Built-In Types" version="3.1-dev">
<brief_description>
Generic array datatype.
</brief_description>
diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml
index 7b74b678bd..9ea76e2702 100644
--- a/doc/classes/ArrayMesh.xml
+++ b/doc/classes/ArrayMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ArrayMesh" inherits="Mesh" category="Core" version="3.0-stable">
+<class name="ArrayMesh" inherits="Mesh" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
@@ -66,6 +66,16 @@
Return the amount of surfaces that the [code]ArrayMesh[/code] holds.
</description>
</method>
+ <method name="lightmap_unwrap">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="arg0" type="Transform">
+ </argument>
+ <argument index="1" name="arg1" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="regen_normalmaps">
<return type="void">
</return>
diff --git a/doc/classes/AtlasTexture.xml b/doc/classes/AtlasTexture.xml
index 87cd072d99..77ddbb3343 100644
--- a/doc/classes/AtlasTexture.xml
+++ b/doc/classes/AtlasTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AtlasTexture" inherits="Texture" category="Core" version="3.0-stable">
+<class name="AtlasTexture" inherits="Texture" category="Core" version="3.1-dev">
<brief_description>
Packs multiple small textures in a single, bigger one. Helps to optimize video memory costs and render calls.
</brief_description>
diff --git a/doc/classes/AudioBusLayout.xml b/doc/classes/AudioBusLayout.xml
index d960093fc6..c4e111a792 100644
--- a/doc/classes/AudioBusLayout.xml
+++ b/doc/classes/AudioBusLayout.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioBusLayout" inherits="Resource" category="Core" version="3.0-stable">
+<class name="AudioBusLayout" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
Stores information about the audiobusses.
</brief_description>
diff --git a/doc/classes/AudioEffect.xml b/doc/classes/AudioEffect.xml
index 81c72e34b2..4d33b458a0 100644
--- a/doc/classes/AudioEffect.xml
+++ b/doc/classes/AudioEffect.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffect" inherits="Resource" category="Core" version="3.0-stable">
+<class name="AudioEffect" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
Audio Effect For Audio.
</brief_description>
diff --git a/doc/classes/AudioEffectAmplify.xml b/doc/classes/AudioEffectAmplify.xml
index 7a031f7f47..2c0cbff8b4 100644
--- a/doc/classes/AudioEffectAmplify.xml
+++ b/doc/classes/AudioEffectAmplify.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectAmplify" inherits="AudioEffect" category="Core" version="3.0-stable">
+<class name="AudioEffectAmplify" inherits="AudioEffect" category="Core" version="3.1-dev">
<brief_description>
Adds a Amplify audio effect to an Audio bus.
Increases or decreases the volume of the selected audio bus.
diff --git a/doc/classes/AudioEffectBandLimitFilter.xml b/doc/classes/AudioEffectBandLimitFilter.xml
index 592735e098..c9e9520dfe 100644
--- a/doc/classes/AudioEffectBandLimitFilter.xml
+++ b/doc/classes/AudioEffectBandLimitFilter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectBandLimitFilter" inherits="AudioEffectFilter" category="Core" version="3.0-stable">
+<class name="AudioEffectBandLimitFilter" inherits="AudioEffectFilter" category="Core" version="3.1-dev">
<brief_description>
Adds a band limit filter to the Audio Bus.
</brief_description>
diff --git a/doc/classes/AudioEffectBandPassFilter.xml b/doc/classes/AudioEffectBandPassFilter.xml
index 3705590c83..cc8e351586 100644
--- a/doc/classes/AudioEffectBandPassFilter.xml
+++ b/doc/classes/AudioEffectBandPassFilter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectBandPassFilter" inherits="AudioEffectFilter" category="Core" version="3.0-stable">
+<class name="AudioEffectBandPassFilter" inherits="AudioEffectFilter" category="Core" version="3.1-dev">
<brief_description>
Adds a band pass filter to the Audio Bus.
</brief_description>
diff --git a/doc/classes/AudioEffectChorus.xml b/doc/classes/AudioEffectChorus.xml
index 4bcd0e2552..6890fc92d9 100644
--- a/doc/classes/AudioEffectChorus.xml
+++ b/doc/classes/AudioEffectChorus.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectChorus" inherits="AudioEffect" category="Core" version="3.0-stable">
+<class name="AudioEffectChorus" inherits="AudioEffect" category="Core" version="3.1-dev">
<brief_description>
Adds a chorus audio effect.
</brief_description>
diff --git a/doc/classes/AudioEffectCompressor.xml b/doc/classes/AudioEffectCompressor.xml
index 4fd28326a2..33225a64ab 100644
--- a/doc/classes/AudioEffectCompressor.xml
+++ b/doc/classes/AudioEffectCompressor.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectCompressor" inherits="AudioEffect" category="Core" version="3.0-stable">
+<class name="AudioEffectCompressor" inherits="AudioEffect" category="Core" version="3.1-dev">
<brief_description>
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.
diff --git a/doc/classes/AudioEffectDelay.xml b/doc/classes/AudioEffectDelay.xml
index d253ffab96..1c5757eca3 100644
--- a/doc/classes/AudioEffectDelay.xml
+++ b/doc/classes/AudioEffectDelay.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectDelay" inherits="AudioEffect" category="Core" version="3.0-stable">
+<class name="AudioEffectDelay" inherits="AudioEffect" category="Core" version="3.1-dev">
<brief_description>
Adds a Delay audio effect to an Audio bus. Plays input signal back after a period of time.
Two tap delay and feedback options.
diff --git a/doc/classes/AudioEffectDistortion.xml b/doc/classes/AudioEffectDistortion.xml
index 91a1961b30..c33dced31e 100644
--- a/doc/classes/AudioEffectDistortion.xml
+++ b/doc/classes/AudioEffectDistortion.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectDistortion" inherits="AudioEffect" category="Core" version="3.0-stable">
+<class name="AudioEffectDistortion" inherits="AudioEffect" category="Core" version="3.1-dev">
<brief_description>
Adds a Distortion audio effect to an Audio bus.
Modify the sound to make it dirty.
diff --git a/doc/classes/AudioEffectEQ.xml b/doc/classes/AudioEffectEQ.xml
index 667982d529..f6f44f2cb6 100644
--- a/doc/classes/AudioEffectEQ.xml
+++ b/doc/classes/AudioEffectEQ.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectEQ" inherits="AudioEffect" category="Core" version="3.0-stable">
+<class name="AudioEffectEQ" inherits="AudioEffect" category="Core" version="3.1-dev">
<brief_description>
Base class for audio equalizers. Gives you control over frequencies.
Use it to create a custom equalizer if [AudioEffectEQ6], [AudioEffectEQ10] or [AudioEffectEQ21] don't fit your needs.
diff --git a/doc/classes/AudioEffectEQ10.xml b/doc/classes/AudioEffectEQ10.xml
index 9e5303a266..201a26843c 100644
--- a/doc/classes/AudioEffectEQ10.xml
+++ b/doc/classes/AudioEffectEQ10.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectEQ10" inherits="AudioEffectEQ" category="Core" version="3.0-stable">
+<class name="AudioEffectEQ10" inherits="AudioEffectEQ" category="Core" version="3.1-dev">
<brief_description>
Adds a 10-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 31 Hz to 16000 Hz.
Each frequency can be modulated between -60/+24 dB.
diff --git a/doc/classes/AudioEffectEQ21.xml b/doc/classes/AudioEffectEQ21.xml
index ec0db8bbbe..df0a536157 100644
--- a/doc/classes/AudioEffectEQ21.xml
+++ b/doc/classes/AudioEffectEQ21.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectEQ21" inherits="AudioEffectEQ" category="Core" version="3.0-stable">
+<class name="AudioEffectEQ21" inherits="AudioEffectEQ" category="Core" version="3.1-dev">
<brief_description>
Adds a 21-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 22 Hz to 22000 Hz.
Each frequency can be modulated between -60/+24 dB.
diff --git a/doc/classes/AudioEffectEQ6.xml b/doc/classes/AudioEffectEQ6.xml
index f5748f0a36..fe17a35d64 100644
--- a/doc/classes/AudioEffectEQ6.xml
+++ b/doc/classes/AudioEffectEQ6.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectEQ6" inherits="AudioEffectEQ" category="Core" version="3.0-stable">
+<class name="AudioEffectEQ6" inherits="AudioEffectEQ" category="Core" version="3.1-dev">
<brief_description>
Adds a 6-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 32 Hz to 10000 Hz.
Each frequency can be modulated between -60/+24 dB.
diff --git a/doc/classes/AudioEffectFilter.xml b/doc/classes/AudioEffectFilter.xml
index 9c0eb38612..75dc9b292d 100644
--- a/doc/classes/AudioEffectFilter.xml
+++ b/doc/classes/AudioEffectFilter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectFilter" inherits="AudioEffect" category="Core" version="3.0-stable">
+<class name="AudioEffectFilter" inherits="AudioEffect" category="Core" version="3.1-dev">
<brief_description>
Adds a filter to the Audio Bus.
</brief_description>
diff --git a/doc/classes/AudioEffectHighPassFilter.xml b/doc/classes/AudioEffectHighPassFilter.xml
index 451c65a228..148ab83cb6 100644
--- a/doc/classes/AudioEffectHighPassFilter.xml
+++ b/doc/classes/AudioEffectHighPassFilter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectHighPassFilter" inherits="AudioEffectFilter" category="Core" version="3.0-stable">
+<class name="AudioEffectHighPassFilter" inherits="AudioEffectFilter" category="Core" version="3.1-dev">
<brief_description>
Adds a high pass filter to the Audio Bus.
</brief_description>
diff --git a/doc/classes/AudioEffectHighShelfFilter.xml b/doc/classes/AudioEffectHighShelfFilter.xml
index a26d4a4e6b..e52578dc3a 100644
--- a/doc/classes/AudioEffectHighShelfFilter.xml
+++ b/doc/classes/AudioEffectHighShelfFilter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectHighShelfFilter" inherits="AudioEffectFilter" category="Core" version="3.0-stable">
+<class name="AudioEffectHighShelfFilter" inherits="AudioEffectFilter" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/AudioEffectLimiter.xml b/doc/classes/AudioEffectLimiter.xml
index b6fe7b74e5..6c61300e34 100644
--- a/doc/classes/AudioEffectLimiter.xml
+++ b/doc/classes/AudioEffectLimiter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectLimiter" inherits="AudioEffect" category="Core" version="3.0-stable">
+<class name="AudioEffectLimiter" inherits="AudioEffect" category="Core" version="3.1-dev">
<brief_description>
Adds a soft clip Limiter audio effect to an Audio bus.
</brief_description>
diff --git a/doc/classes/AudioEffectLowPassFilter.xml b/doc/classes/AudioEffectLowPassFilter.xml
index 25c80e2ea0..cc357ae9ee 100644
--- a/doc/classes/AudioEffectLowPassFilter.xml
+++ b/doc/classes/AudioEffectLowPassFilter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectLowPassFilter" inherits="AudioEffectFilter" category="Core" version="3.0-stable">
+<class name="AudioEffectLowPassFilter" inherits="AudioEffectFilter" category="Core" version="3.1-dev">
<brief_description>
Adds a low pass filter to the Audio Bus.
</brief_description>
diff --git a/doc/classes/AudioEffectLowShelfFilter.xml b/doc/classes/AudioEffectLowShelfFilter.xml
index f60429ca15..be9bde1b69 100644
--- a/doc/classes/AudioEffectLowShelfFilter.xml
+++ b/doc/classes/AudioEffectLowShelfFilter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectLowShelfFilter" inherits="AudioEffectFilter" category="Core" version="3.0-stable">
+<class name="AudioEffectLowShelfFilter" inherits="AudioEffectFilter" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/AudioEffectNotchFilter.xml b/doc/classes/AudioEffectNotchFilter.xml
index ac78d9c3e5..7aec435bfa 100644
--- a/doc/classes/AudioEffectNotchFilter.xml
+++ b/doc/classes/AudioEffectNotchFilter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectNotchFilter" inherits="AudioEffectFilter" category="Core" version="3.0-stable">
+<class name="AudioEffectNotchFilter" inherits="AudioEffectFilter" category="Core" version="3.1-dev">
<brief_description>
Adds a notch filter to the Audio Bus.
</brief_description>
diff --git a/doc/classes/AudioEffectPanner.xml b/doc/classes/AudioEffectPanner.xml
index 493e83393a..a75918958e 100644
--- a/doc/classes/AudioEffectPanner.xml
+++ b/doc/classes/AudioEffectPanner.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectPanner" inherits="AudioEffect" category="Core" version="3.0-stable">
+<class name="AudioEffectPanner" inherits="AudioEffect" category="Core" version="3.1-dev">
<brief_description>
Adds a Panner audio effect to an Audio bus. Pans sound left or right.
</brief_description>
diff --git a/doc/classes/AudioEffectPhaser.xml b/doc/classes/AudioEffectPhaser.xml
index 3cc89e73f8..e276ed14b6 100644
--- a/doc/classes/AudioEffectPhaser.xml
+++ b/doc/classes/AudioEffectPhaser.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectPhaser" inherits="AudioEffect" category="Core" version="3.0-stable">
+<class name="AudioEffectPhaser" inherits="AudioEffect" category="Core" version="3.1-dev">
<brief_description>
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.
diff --git a/doc/classes/AudioEffectPitchShift.xml b/doc/classes/AudioEffectPitchShift.xml
index b0e7dbc049..4e4658580a 100644
--- a/doc/classes/AudioEffectPitchShift.xml
+++ b/doc/classes/AudioEffectPitchShift.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectPitchShift" inherits="AudioEffect" category="Core" version="3.0-stable">
+<class name="AudioEffectPitchShift" inherits="AudioEffect" category="Core" version="3.1-dev">
<brief_description>
Adds a Pitch shift audio effect to an Audio bus.
Raises or lowers the pitch of original sound.
diff --git a/doc/classes/AudioEffectReverb.xml b/doc/classes/AudioEffectReverb.xml
index 46d1866ff0..8453e4b11b 100644
--- a/doc/classes/AudioEffectReverb.xml
+++ b/doc/classes/AudioEffectReverb.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectReverb" inherits="AudioEffect" category="Core" version="3.0-stable">
+<class name="AudioEffectReverb" inherits="AudioEffect" category="Core" version="3.1-dev">
<brief_description>
Adds a Reverb audio effect to an Audio bus.
Simulates the sound of acoustic environments such as rooms, concert halls, caverns, or an open spaces.
diff --git a/doc/classes/AudioEffectStereoEnhance.xml b/doc/classes/AudioEffectStereoEnhance.xml
index 6e6e9af5c6..508dc96fb0 100644
--- a/doc/classes/AudioEffectStereoEnhance.xml
+++ b/doc/classes/AudioEffectStereoEnhance.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioEffectStereoEnhance" inherits="AudioEffect" category="Core" version="3.0-stable">
+<class name="AudioEffectStereoEnhance" inherits="AudioEffect" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml
index a6352bca1e..9618f0b066 100644
--- a/doc/classes/AudioServer.xml
+++ b/doc/classes/AudioServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioServer" inherits="Object" category="Core" version="3.0-stable">
+<class name="AudioServer" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
Server interface for low level audio access.
</brief_description>
diff --git a/doc/classes/AudioStream.xml b/doc/classes/AudioStream.xml
index f06ca0f901..cbb16c3198 100644
--- a/doc/classes/AudioStream.xml
+++ b/doc/classes/AudioStream.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStream" inherits="Resource" category="Core" version="3.0-stable">
+<class name="AudioStream" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
Base class for audio streams.
</brief_description>
@@ -12,6 +12,12 @@
<demos>
</demos>
<methods>
+ <method name="get_length" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
</methods>
<constants>
</constants>
diff --git a/doc/classes/AudioStreamPlayback.xml b/doc/classes/AudioStreamPlayback.xml
index 3babff52d1..a27ab1d3a2 100644
--- a/doc/classes/AudioStreamPlayback.xml
+++ b/doc/classes/AudioStreamPlayback.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamPlayback" inherits="Reference" category="Core" version="3.0-stable">
+<class name="AudioStreamPlayback" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
Meta class for playing back audio.
</brief_description>
diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml
index e2cb442c36..f7c8f76182 100644
--- a/doc/classes/AudioStreamPlayer.xml
+++ b/doc/classes/AudioStreamPlayer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamPlayer" inherits="Node" category="Core" version="3.0-stable">
+<class name="AudioStreamPlayer" inherits="Node" category="Core" version="3.1-dev">
<brief_description>
Plays back audio.
</brief_description>
@@ -56,6 +56,8 @@
<member name="mix_target" type="int" setter="set_mix_target" getter="get_mix_target" enum="AudioStreamPlayer.MixTarget">
If the audio configuration has more than two speakers, this sets the target channels. See [code]MIX_TARGET_*[/code] constants.
</member>
+ <member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale">
+ </member>
<member name="playing" type="bool" setter="_set_playing" getter="is_playing">
If [code]true[/code] audio is playing.
</member>
diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml
index 2abb86472b..6594c9c8b9 100644
--- a/doc/classes/AudioStreamPlayer2D.xml
+++ b/doc/classes/AudioStreamPlayer2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamPlayer2D" inherits="Node2D" category="Core" version="3.0-stable">
+<class name="AudioStreamPlayer2D" inherits="Node2D" category="Core" version="3.1-dev">
<brief_description>
Plays audio in 2D.
</brief_description>
@@ -62,6 +62,8 @@
<member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance">
Maximum distance from which audio is still hearable.
</member>
+ <member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale">
+ </member>
<member name="playing" type="bool" setter="_set_playing" getter="is_playing">
If [code]true[/code] audio is playing.
</member>
diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml
index a40a6b4f96..7eb1ff2b91 100644
--- a/doc/classes/AudioStreamPlayer3D.xml
+++ b/doc/classes/AudioStreamPlayer3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamPlayer3D" inherits="Spatial" category="Core" version="3.0-stable">
+<class name="AudioStreamPlayer3D" inherits="Spatial" category="Core" version="3.1-dev">
<brief_description>
Plays 3D sound in 3D space
</brief_description>
@@ -86,6 +86,8 @@
<member name="out_of_range_mode" type="int" setter="set_out_of_range_mode" getter="get_out_of_range_mode" enum="AudioStreamPlayer3D.OutOfRangeMode">
Decides if audio should pause when source is outside of 'max_distance' range.
</member>
+ <member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale">
+ </member>
<member name="playing" type="bool" setter="_set_playing" getter="is_playing">
If [code]true[/code], audio is playing.
</member>
diff --git a/doc/classes/AudioStreamRandomPitch.xml b/doc/classes/AudioStreamRandomPitch.xml
index a78c412f26..362504d00d 100644
--- a/doc/classes/AudioStreamRandomPitch.xml
+++ b/doc/classes/AudioStreamRandomPitch.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamRandomPitch" inherits="AudioStream" category="Core" version="3.0-stable">
+<class name="AudioStreamRandomPitch" inherits="AudioStream" category="Core" version="3.1-dev">
<brief_description>
Plays audio with random pitch tweaking.
</brief_description>
diff --git a/doc/classes/AudioStreamSample.xml b/doc/classes/AudioStreamSample.xml
index 8e11a870ca..224d1802dd 100644
--- a/doc/classes/AudioStreamSample.xml
+++ b/doc/classes/AudioStreamSample.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamSample" inherits="AudioStream" category="Core" version="3.0-stable">
+<class name="AudioStreamSample" inherits="AudioStream" category="Core" version="3.1-dev">
<brief_description>
Plays audio.
</brief_description>
diff --git a/doc/classes/BackBufferCopy.xml b/doc/classes/BackBufferCopy.xml
index e11b55a6a0..05a10da3ac 100644
--- a/doc/classes/BackBufferCopy.xml
+++ b/doc/classes/BackBufferCopy.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BackBufferCopy" inherits="Node2D" category="Core" version="3.0-stable">
+<class name="BackBufferCopy" inherits="Node2D" category="Core" version="3.1-dev">
<brief_description>
Copies a region of the screen (or the whole screen) to a buffer so it can be accessed with the texscreen() shader instruction.
</brief_description>
diff --git a/doc/classes/BakedLightmap.xml b/doc/classes/BakedLightmap.xml
index a9033906dc..98ba28adeb 100644
--- a/doc/classes/BakedLightmap.xml
+++ b/doc/classes/BakedLightmap.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BakedLightmap" inherits="VisualInstance" category="Core" version="3.0-stable">
+<class name="BakedLightmap" inherits="VisualInstance" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/BakedLightmapData.xml b/doc/classes/BakedLightmapData.xml
index 0fcd984c5e..49f09dc32b 100644
--- a/doc/classes/BakedLightmapData.xml
+++ b/doc/classes/BakedLightmapData.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BakedLightmapData" inherits="Resource" category="Core" version="3.0-stable">
+<class name="BakedLightmapData" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml
index 6d7ee544e4..0af7b6993c 100644
--- a/doc/classes/BaseButton.xml
+++ b/doc/classes/BaseButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BaseButton" inherits="Control" category="Core" version="3.0-stable">
+<class name="BaseButton" inherits="Control" category="Core" version="3.1-dev">
<brief_description>
Base class for different kinds of buttons.
</brief_description>
diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml
index c90dfeea27..2bca7d7c1b 100644
--- a/doc/classes/Basis.xml
+++ b/doc/classes/Basis.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Basis" category="Built-In Types" version="3.0-stable">
+<class name="Basis" category="Built-In Types" version="3.1-dev">
<brief_description>
3x3 matrix datatype.
</brief_description>
diff --git a/doc/classes/BitMap.xml b/doc/classes/BitMap.xml
index f85c538456..1d2fc950f0 100644
--- a/doc/classes/BitMap.xml
+++ b/doc/classes/BitMap.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BitMap" inherits="Resource" category="Core" version="3.0-stable">
+<class name="BitMap" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
Boolean matrix.
</brief_description>
diff --git a/doc/classes/BitmapFont.xml b/doc/classes/BitmapFont.xml
index 77c1e0949c..cff8951a4c 100644
--- a/doc/classes/BitmapFont.xml
+++ b/doc/classes/BitmapFont.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BitmapFont" inherits="Font" category="Core" version="3.0-stable">
+<class name="BitmapFont" inherits="Font" category="Core" version="3.1-dev">
<brief_description>
Renders text using [code]*.fnt[/code] fonts.
</brief_description>
diff --git a/doc/classes/BoneAttachment.xml b/doc/classes/BoneAttachment.xml
index 77c8bd603e..3b7cd3fff2 100644
--- a/doc/classes/BoneAttachment.xml
+++ b/doc/classes/BoneAttachment.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BoneAttachment" inherits="Spatial" category="Core" version="3.0-stable">
+<class name="BoneAttachment" inherits="Spatial" category="Core" version="3.1-dev">
<brief_description>
A node that will attach to a bone.
</brief_description>
diff --git a/doc/classes/BoxContainer.xml b/doc/classes/BoxContainer.xml
index b509e83985..542703bae7 100644
--- a/doc/classes/BoxContainer.xml
+++ b/doc/classes/BoxContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BoxContainer" inherits="Container" category="Core" version="3.0-stable">
+<class name="BoxContainer" inherits="Container" category="Core" version="3.1-dev">
<brief_description>
Base class for box containers.
</brief_description>
diff --git a/doc/classes/BoxShape.xml b/doc/classes/BoxShape.xml
index 00b4b6bdbb..33ba197bec 100644
--- a/doc/classes/BoxShape.xml
+++ b/doc/classes/BoxShape.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BoxShape" inherits="Shape" category="Core" version="3.0-stable">
+<class name="BoxShape" inherits="Shape" category="Core" version="3.1-dev">
<brief_description>
Box shape resource.
</brief_description>
diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml
index bc1608baf8..7783951cf9 100644
--- a/doc/classes/Button.xml
+++ b/doc/classes/Button.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Button" inherits="BaseButton" category="Core" version="3.0-stable">
+<class name="Button" inherits="BaseButton" category="Core" version="3.1-dev">
<brief_description>
Standard themed Button.
</brief_description>
diff --git a/doc/classes/ButtonGroup.xml b/doc/classes/ButtonGroup.xml
index 19a75843e1..850a7366bc 100644
--- a/doc/classes/ButtonGroup.xml
+++ b/doc/classes/ButtonGroup.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ButtonGroup" inherits="Resource" category="Core" version="3.0-stable">
+<class name="ButtonGroup" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
Group of Buttons.
</brief_description>
diff --git a/doc/classes/Camera.xml b/doc/classes/Camera.xml
index e481799c5c..226277d178 100644
--- a/doc/classes/Camera.xml
+++ b/doc/classes/Camera.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Camera" inherits="Spatial" category="Core" version="3.0-stable">
+<class name="Camera" inherits="Spatial" category="Core" version="3.1-dev">
<brief_description>
Camera node, displays from a point of view.
</brief_description>
diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml
index f3825019a2..9ab1c63c1f 100644
--- a/doc/classes/Camera2D.xml
+++ b/doc/classes/Camera2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Camera2D" inherits="Node2D" category="Core" version="3.0-stable">
+<class name="Camera2D" inherits="Node2D" category="Core" version="3.1-dev">
<brief_description>
Camera node for 2D scenes.
</brief_description>
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index bb3d4938b8..e3bf2b9577 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CanvasItem" inherits="Node" category="Core" version="3.0-stable">
+<class name="CanvasItem" inherits="Node" category="Core" version="3.1-dev">
<brief_description>
Base class of anything 2D.
</brief_description>
diff --git a/doc/classes/CanvasItemMaterial.xml b/doc/classes/CanvasItemMaterial.xml
index 5ec32bc63d..1a2c61000e 100644
--- a/doc/classes/CanvasItemMaterial.xml
+++ b/doc/classes/CanvasItemMaterial.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CanvasItemMaterial" inherits="Material" category="Core" version="3.0-stable">
+<class name="CanvasItemMaterial" inherits="Material" category="Core" version="3.1-dev">
<brief_description>
A material for [CanvasItem]s.
</brief_description>
diff --git a/doc/classes/CanvasLayer.xml b/doc/classes/CanvasLayer.xml
index 3b7ba5b1ad..d66ea5acdb 100644
--- a/doc/classes/CanvasLayer.xml
+++ b/doc/classes/CanvasLayer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CanvasLayer" inherits="Node" category="Core" version="3.0-stable">
+<class name="CanvasLayer" inherits="Node" category="Core" version="3.1-dev">
<brief_description>
Canvas drawing layer.
</brief_description>
diff --git a/doc/classes/CanvasModulate.xml b/doc/classes/CanvasModulate.xml
index 827502d6c0..1595b90ca5 100644
--- a/doc/classes/CanvasModulate.xml
+++ b/doc/classes/CanvasModulate.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CanvasModulate" inherits="Node2D" category="Core" version="3.0-stable">
+<class name="CanvasModulate" inherits="Node2D" category="Core" version="3.1-dev">
<brief_description>
Tint the entire canvas.
</brief_description>
diff --git a/doc/classes/CapsuleMesh.xml b/doc/classes/CapsuleMesh.xml
index 3a291128c7..988c500d52 100644
--- a/doc/classes/CapsuleMesh.xml
+++ b/doc/classes/CapsuleMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CapsuleMesh" inherits="PrimitiveMesh" category="Core" version="3.0-stable">
+<class name="CapsuleMesh" inherits="PrimitiveMesh" category="Core" version="3.1-dev">
<brief_description>
Class representing a capsule-shaped [PrimitiveMesh].
</brief_description>
diff --git a/doc/classes/CapsuleShape.xml b/doc/classes/CapsuleShape.xml
index 1ff4f5aa00..c0c5e4e1f2 100644
--- a/doc/classes/CapsuleShape.xml
+++ b/doc/classes/CapsuleShape.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CapsuleShape" inherits="Shape" category="Core" version="3.0-stable">
+<class name="CapsuleShape" inherits="Shape" category="Core" version="3.1-dev">
<brief_description>
Capsule shape for collisions.
</brief_description>
diff --git a/doc/classes/CapsuleShape2D.xml b/doc/classes/CapsuleShape2D.xml
index 0b306643b9..eaa7eef8cc 100644
--- a/doc/classes/CapsuleShape2D.xml
+++ b/doc/classes/CapsuleShape2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CapsuleShape2D" inherits="Shape2D" category="Core" version="3.0-stable">
+<class name="CapsuleShape2D" inherits="Shape2D" category="Core" version="3.1-dev">
<brief_description>
Capsule shape for 2D collisions.
</brief_description>
diff --git a/doc/classes/CenterContainer.xml b/doc/classes/CenterContainer.xml
index a4e17bf0b6..fd2d8ee9e7 100644
--- a/doc/classes/CenterContainer.xml
+++ b/doc/classes/CenterContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CenterContainer" inherits="Container" category="Core" version="3.0-stable">
+<class name="CenterContainer" inherits="Container" category="Core" version="3.1-dev">
<brief_description>
Keeps children controls centered.
</brief_description>
diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml
index 25340ed284..f2aae0a674 100644
--- a/doc/classes/CheckBox.xml
+++ b/doc/classes/CheckBox.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CheckBox" inherits="Button" category="Core" version="3.0-stable">
+<class name="CheckBox" inherits="Button" category="Core" version="3.1-dev">
<brief_description>
Binary choice user interface widget
</brief_description>
diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml
index ec214fc498..1ad7f9cc68 100644
--- a/doc/classes/CheckButton.xml
+++ b/doc/classes/CheckButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CheckButton" inherits="Button" category="Core" version="3.0-stable">
+<class name="CheckButton" inherits="Button" category="Core" version="3.1-dev">
<brief_description>
Checkable button.
</brief_description>
diff --git a/doc/classes/CircleShape2D.xml b/doc/classes/CircleShape2D.xml
index 0c8b2088b3..8736cd47e5 100644
--- a/doc/classes/CircleShape2D.xml
+++ b/doc/classes/CircleShape2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CircleShape2D" inherits="Shape2D" category="Core" version="3.0-stable">
+<class name="CircleShape2D" inherits="Shape2D" category="Core" version="3.1-dev">
<brief_description>
Circular shape for 2D collisions.
</brief_description>
diff --git a/doc/classes/ClassDB.xml b/doc/classes/ClassDB.xml
index e90a84f07c..05f2f6472e 100644
--- a/doc/classes/ClassDB.xml
+++ b/doc/classes/ClassDB.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ClassDB" inherits="Object" category="Core" version="3.0-stable">
+<class name="ClassDB" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
Class information repository.
</brief_description>
diff --git a/doc/classes/CollisionObject.xml b/doc/classes/CollisionObject.xml
index 8b397f3227..8529c68b11 100644
--- a/doc/classes/CollisionObject.xml
+++ b/doc/classes/CollisionObject.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CollisionObject" inherits="Spatial" category="Core" version="3.0-stable">
+<class name="CollisionObject" inherits="Spatial" category="Core" version="3.1-dev">
<brief_description>
Base node for collision objects.
</brief_description>
diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml
index 5b4ab46fd9..2e361b5ac1 100644
--- a/doc/classes/CollisionObject2D.xml
+++ b/doc/classes/CollisionObject2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CollisionObject2D" inherits="Node2D" category="Core" version="3.0-stable">
+<class name="CollisionObject2D" inherits="Node2D" category="Core" version="3.1-dev">
<brief_description>
Base node for 2D collision objects.
</brief_description>
diff --git a/doc/classes/CollisionPolygon.xml b/doc/classes/CollisionPolygon.xml
index 79c41e632e..b0f1142ac5 100644
--- a/doc/classes/CollisionPolygon.xml
+++ b/doc/classes/CollisionPolygon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CollisionPolygon" inherits="Spatial" category="Core" version="3.0-stable">
+<class name="CollisionPolygon" inherits="Spatial" category="Core" version="3.1-dev">
<brief_description>
Editor-only class for defining a collision polygon in 3D space.
</brief_description>
diff --git a/doc/classes/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml
index 0b17e6d26e..8ef50cb4e0 100644
--- a/doc/classes/CollisionPolygon2D.xml
+++ b/doc/classes/CollisionPolygon2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CollisionPolygon2D" inherits="Node2D" category="Core" version="3.0-stable">
+<class name="CollisionPolygon2D" inherits="Node2D" category="Core" version="3.1-dev">
<brief_description>
Defines a 2D collision polygon.
</brief_description>
diff --git a/doc/classes/CollisionShape.xml b/doc/classes/CollisionShape.xml
index 36a015ce80..7afd455ebd 100644
--- a/doc/classes/CollisionShape.xml
+++ b/doc/classes/CollisionShape.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CollisionShape" inherits="Spatial" category="Core" version="3.0-stable">
+<class name="CollisionShape" inherits="Spatial" category="Core" version="3.1-dev">
<brief_description>
Node that represents collision shape data in 3D space.
</brief_description>
diff --git a/doc/classes/CollisionShape2D.xml b/doc/classes/CollisionShape2D.xml
index ed5a094996..7b3cddf4aa 100644
--- a/doc/classes/CollisionShape2D.xml
+++ b/doc/classes/CollisionShape2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CollisionShape2D" inherits="Node2D" category="Core" version="3.0-stable">
+<class name="CollisionShape2D" inherits="Node2D" category="Core" version="3.1-dev">
<brief_description>
Node that represents collision shape data in 2D space.
</brief_description>
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml
index 11c59531a8..8113ee3415 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Color" category="Built-In Types" version="3.0-stable">
+<class name="Color" category="Built-In Types" version="3.1-dev">
<brief_description>
Color in RGBA format with some support for ARGB format.
</brief_description>
diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml
index c69fc360a8..a2b6e1ae04 100644
--- a/doc/classes/ColorPicker.xml
+++ b/doc/classes/ColorPicker.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ColorPicker" inherits="BoxContainer" category="Core" version="3.0-stable">
+<class name="ColorPicker" inherits="BoxContainer" category="Core" version="3.1-dev">
<brief_description>
Color picker control.
</brief_description>
diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml
index 47fc198638..227d979c64 100644
--- a/doc/classes/ColorPickerButton.xml
+++ b/doc/classes/ColorPickerButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ColorPickerButton" inherits="Button" category="Core" version="3.0-stable">
+<class name="ColorPickerButton" inherits="Button" category="Core" version="3.1-dev">
<brief_description>
Button that pops out a [ColorPicker]
</brief_description>
diff --git a/doc/classes/ColorRect.xml b/doc/classes/ColorRect.xml
index 332d0f573f..468d9b0687 100644
--- a/doc/classes/ColorRect.xml
+++ b/doc/classes/ColorRect.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ColorRect" inherits="Control" category="Core" version="3.0-stable">
+<class name="ColorRect" inherits="Control" category="Core" version="3.1-dev">
<brief_description>
Colored rect for canvas.
</brief_description>
diff --git a/doc/classes/ConcavePolygonShape.xml b/doc/classes/ConcavePolygonShape.xml
index 4700491921..b838e21318 100644
--- a/doc/classes/ConcavePolygonShape.xml
+++ b/doc/classes/ConcavePolygonShape.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ConcavePolygonShape" inherits="Shape" category="Core" version="3.0-stable">
+<class name="ConcavePolygonShape" inherits="Shape" category="Core" version="3.1-dev">
<brief_description>
Concave polygon shape.
</brief_description>
diff --git a/doc/classes/ConcavePolygonShape2D.xml b/doc/classes/ConcavePolygonShape2D.xml
index c339ee65a0..30dc887f3f 100644
--- a/doc/classes/ConcavePolygonShape2D.xml
+++ b/doc/classes/ConcavePolygonShape2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ConcavePolygonShape2D" inherits="Shape2D" category="Core" version="3.0-stable">
+<class name="ConcavePolygonShape2D" inherits="Shape2D" category="Core" version="3.1-dev">
<brief_description>
Concave polygon 2D shape resource for physics.
</brief_description>
diff --git a/doc/classes/ConeTwistJoint.xml b/doc/classes/ConeTwistJoint.xml
index b7a4894ea7..93901dc3c4 100644
--- a/doc/classes/ConeTwistJoint.xml
+++ b/doc/classes/ConeTwistJoint.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ConeTwistJoint" inherits="Joint" category="Core" version="3.0-stable">
+<class name="ConeTwistJoint" inherits="Joint" category="Core" version="3.1-dev">
<brief_description>
A twist joint between two 3D bodies
</brief_description>
diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml
index 17243b2100..da86554380 100644
--- a/doc/classes/ConfigFile.xml
+++ b/doc/classes/ConfigFile.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ConfigFile" inherits="Reference" category="Core" version="3.0-stable">
+<class name="ConfigFile" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
Helper class to handle INI-style files.
</brief_description>
diff --git a/doc/classes/ConfirmationDialog.xml b/doc/classes/ConfirmationDialog.xml
index 2759c1b883..1641b5df6f 100644
--- a/doc/classes/ConfirmationDialog.xml
+++ b/doc/classes/ConfirmationDialog.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ConfirmationDialog" inherits="AcceptDialog" category="Core" version="3.0-stable">
+<class name="ConfirmationDialog" inherits="AcceptDialog" category="Core" version="3.1-dev">
<brief_description>
Dialog for confirmation of actions.
</brief_description>
diff --git a/doc/classes/Container.xml b/doc/classes/Container.xml
index 0447c80887..b6afaa6bac 100644
--- a/doc/classes/Container.xml
+++ b/doc/classes/Container.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Container" inherits="Control" category="Core" version="3.0-stable">
+<class name="Container" inherits="Control" category="Core" version="3.1-dev">
<brief_description>
Base node for containers.
</brief_description>
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index 9db93bb6a9..46b2642b89 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Control" inherits="CanvasItem" category="Core" version="3.0-stable">
+<class name="Control" inherits="CanvasItem" category="Core" version="3.1-dev">
<brief_description>
All User Interface nodes inherit from Control. Features anchors and margins to adapt its position and size to its parent.
</brief_description>
diff --git a/doc/classes/ConvexPolygonShape.xml b/doc/classes/ConvexPolygonShape.xml
index 2b809ca80a..ac25fb8cb6 100644
--- a/doc/classes/ConvexPolygonShape.xml
+++ b/doc/classes/ConvexPolygonShape.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ConvexPolygonShape" inherits="Shape" category="Core" version="3.0-stable">
+<class name="ConvexPolygonShape" inherits="Shape" category="Core" version="3.1-dev">
<brief_description>
Convex polygon shape for 3D physics.
</brief_description>
diff --git a/doc/classes/ConvexPolygonShape2D.xml b/doc/classes/ConvexPolygonShape2D.xml
index b5ce052b4b..3da9d28a8f 100644
--- a/doc/classes/ConvexPolygonShape2D.xml
+++ b/doc/classes/ConvexPolygonShape2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ConvexPolygonShape2D" inherits="Shape2D" category="Core" version="3.0-stable">
+<class name="ConvexPolygonShape2D" inherits="Shape2D" category="Core" version="3.1-dev">
<brief_description>
Convex Polygon Shape for 2D physics.
</brief_description>
diff --git a/doc/classes/CubeMap.xml b/doc/classes/CubeMap.xml
index 26fda49803..edc4a165fc 100644
--- a/doc/classes/CubeMap.xml
+++ b/doc/classes/CubeMap.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CubeMap" inherits="Resource" category="Core" version="3.0-stable">
+<class name="CubeMap" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
A CubeMap is a 6 sided 3D texture.
</brief_description>
diff --git a/doc/classes/CubeMesh.xml b/doc/classes/CubeMesh.xml
index c7ec4d9dfe..e26e73e861 100644
--- a/doc/classes/CubeMesh.xml
+++ b/doc/classes/CubeMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CubeMesh" inherits="PrimitiveMesh" category="Core" version="3.0-stable">
+<class name="CubeMesh" inherits="PrimitiveMesh" category="Core" version="3.1-dev">
<brief_description>
Generate an axis-aligned cuboid [PrimitiveMesh].
</brief_description>
diff --git a/doc/classes/Curve.xml b/doc/classes/Curve.xml
index 388d8ab54f..a430041571 100644
--- a/doc/classes/Curve.xml
+++ b/doc/classes/Curve.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Curve" inherits="Resource" category="Core" version="3.0-stable">
+<class name="Curve" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
A mathematic curve.
</brief_description>
diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml
index 2dbfcbc6ec..c53f07d406 100644
--- a/doc/classes/Curve2D.xml
+++ b/doc/classes/Curve2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Curve2D" inherits="Resource" category="Core" version="3.0-stable">
+<class name="Curve2D" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
Describes a Bezier curve in 2D space.
</brief_description>
diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml
index acb6b0d72f..1afa315465 100644
--- a/doc/classes/Curve3D.xml
+++ b/doc/classes/Curve3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Curve3D" inherits="Resource" category="Core" version="3.0-stable">
+<class name="Curve3D" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
Describes a Bezier curve in 3D space.
</brief_description>
diff --git a/doc/classes/CurveTexture.xml b/doc/classes/CurveTexture.xml
index bc090d623a..67a21957ee 100644
--- a/doc/classes/CurveTexture.xml
+++ b/doc/classes/CurveTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CurveTexture" inherits="Texture" category="Core" version="3.0-stable">
+<class name="CurveTexture" inherits="Texture" category="Core" version="3.1-dev">
<brief_description>
A texture that shows a curve.
</brief_description>
diff --git a/doc/classes/CylinderMesh.xml b/doc/classes/CylinderMesh.xml
index e57ffd2841..997180a17c 100644
--- a/doc/classes/CylinderMesh.xml
+++ b/doc/classes/CylinderMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CylinderMesh" inherits="PrimitiveMesh" category="Core" version="3.0-stable">
+<class name="CylinderMesh" inherits="PrimitiveMesh" category="Core" version="3.1-dev">
<brief_description>
Class representing a cylindrical [PrimitiveMesh].
</brief_description>
diff --git a/doc/classes/DampedSpringJoint2D.xml b/doc/classes/DampedSpringJoint2D.xml
index 950817dc04..55c6914c01 100644
--- a/doc/classes/DampedSpringJoint2D.xml
+++ b/doc/classes/DampedSpringJoint2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="DampedSpringJoint2D" inherits="Joint2D" category="Core" version="3.0-stable">
+<class name="DampedSpringJoint2D" inherits="Joint2D" category="Core" version="3.1-dev">
<brief_description>
Damped spring constraint for 2D physics.
</brief_description>
diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml
index 37845dbae4..c63e440a57 100644
--- a/doc/classes/Dictionary.xml
+++ b/doc/classes/Dictionary.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Dictionary" category="Built-In Types" version="3.0-stable">
+<class name="Dictionary" category="Built-In Types" version="3.1-dev">
<brief_description>
Dictionary type.
</brief_description>
diff --git a/doc/classes/DirectionalLight.xml b/doc/classes/DirectionalLight.xml
index bbb8936a12..d777018ec9 100644
--- a/doc/classes/DirectionalLight.xml
+++ b/doc/classes/DirectionalLight.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="DirectionalLight" inherits="Light" category="Core" version="3.0-stable">
+<class name="DirectionalLight" inherits="Light" category="Core" version="3.1-dev">
<brief_description>
Directional Light, such as the Sun or the Moon.
</brief_description>
diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml
index bfd1e2872d..01590344cf 100644
--- a/doc/classes/Directory.xml
+++ b/doc/classes/Directory.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Directory" inherits="Reference" category="Core" version="3.0-stable">
+<class name="Directory" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
Type used to handle the filesystem.
</brief_description>
diff --git a/doc/classes/DynamicFont.xml b/doc/classes/DynamicFont.xml
index 06291c1e61..a56a08e7f6 100644
--- a/doc/classes/DynamicFont.xml
+++ b/doc/classes/DynamicFont.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="DynamicFont" inherits="Font" category="Core" version="3.0-stable">
+<class name="DynamicFont" inherits="Font" category="Core" version="3.1-dev">
<brief_description>
DynamicFont renders vector font files at runtime.
</brief_description>
diff --git a/doc/classes/DynamicFontData.xml b/doc/classes/DynamicFontData.xml
index 5f4e598f36..6113b0616b 100644
--- a/doc/classes/DynamicFontData.xml
+++ b/doc/classes/DynamicFontData.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="DynamicFontData" inherits="Resource" category="Core" version="3.0-stable">
+<class name="DynamicFontData" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
Used with [DynamicFont] to describe the location of a font file.
</brief_description>
diff --git a/doc/classes/EditorExportPlugin.xml b/doc/classes/EditorExportPlugin.xml
index ede892e7ef..68999c2ae4 100644
--- a/doc/classes/EditorExportPlugin.xml
+++ b/doc/classes/EditorExportPlugin.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorExportPlugin" inherits="Reference" category="Core" version="3.0-stable">
+<class name="EditorExportPlugin" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/EditorFileDialog.xml b/doc/classes/EditorFileDialog.xml
index b3a12dbede..da1dbb9327 100644
--- a/doc/classes/EditorFileDialog.xml
+++ b/doc/classes/EditorFileDialog.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorFileDialog" inherits="ConfirmationDialog" category="Core" version="3.0-stable">
+<class name="EditorFileDialog" inherits="ConfirmationDialog" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/EditorFileSystem.xml b/doc/classes/EditorFileSystem.xml
index 1eda817d33..f5a3bf7eca 100644
--- a/doc/classes/EditorFileSystem.xml
+++ b/doc/classes/EditorFileSystem.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorFileSystem" inherits="Node" category="Core" version="3.0-stable">
+<class name="EditorFileSystem" inherits="Node" category="Core" version="3.1-dev">
<brief_description>
Resource filesystem, as the editor sees it.
</brief_description>
diff --git a/doc/classes/EditorFileSystemDirectory.xml b/doc/classes/EditorFileSystemDirectory.xml
index 005bebaca8..295a4d094f 100644
--- a/doc/classes/EditorFileSystemDirectory.xml
+++ b/doc/classes/EditorFileSystemDirectory.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorFileSystemDirectory" inherits="Object" category="Core" version="3.0-stable">
+<class name="EditorFileSystemDirectory" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
A diretory for the resource filesystem.
</brief_description>
diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml
index 85f3d80607..fa22691a83 100644
--- a/doc/classes/EditorImportPlugin.xml
+++ b/doc/classes/EditorImportPlugin.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorImportPlugin" inherits="Reference" category="Core" version="3.0-stable">
+<class name="EditorImportPlugin" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
Registers a custom resource importer in the editor. Use the class to parse any file and import it as a new resource type.
</brief_description>
diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml
index 61c93becde..0731c332ad 100644
--- a/doc/classes/EditorInterface.xml
+++ b/doc/classes/EditorInterface.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorInterface" inherits="Node" category="Core" version="3.0-stable">
+<class name="EditorInterface" inherits="Node" category="Core" version="3.1-dev">
<brief_description>
Editor interface and main components.
</brief_description>
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index b3aca798a4..b7f7d74f54 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorPlugin" inherits="Node" category="Core" version="3.0-stable">
+<class name="EditorPlugin" inherits="Node" category="Core" version="3.1-dev">
<brief_description>
Used by the editor to extend its functionality.
</brief_description>
diff --git a/doc/classes/EditorResourceConversionPlugin.xml b/doc/classes/EditorResourceConversionPlugin.xml
index 9facba18b0..240d82d5d2 100644
--- a/doc/classes/EditorResourceConversionPlugin.xml
+++ b/doc/classes/EditorResourceConversionPlugin.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorResourceConversionPlugin" inherits="Reference" category="Core" version="3.0-stable">
+<class name="EditorResourceConversionPlugin" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/EditorResourcePreview.xml b/doc/classes/EditorResourcePreview.xml
index 9b14771f0f..6ec7f8a088 100644
--- a/doc/classes/EditorResourcePreview.xml
+++ b/doc/classes/EditorResourcePreview.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorResourcePreview" inherits="Node" category="Core" version="3.0-stable">
+<class name="EditorResourcePreview" inherits="Node" category="Core" version="3.1-dev">
<brief_description>
Helper to generate previews of resources or files.
</brief_description>
diff --git a/doc/classes/EditorResourcePreviewGenerator.xml b/doc/classes/EditorResourcePreviewGenerator.xml
index d116e56cf7..80aa185bb6 100644
--- a/doc/classes/EditorResourcePreviewGenerator.xml
+++ b/doc/classes/EditorResourcePreviewGenerator.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorResourcePreviewGenerator" inherits="Reference" category="Core" version="3.0-stable">
+<class name="EditorResourcePreviewGenerator" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
Custom generator of previews.
</brief_description>
diff --git a/doc/classes/EditorSceneImporter.xml b/doc/classes/EditorSceneImporter.xml
index 31846ed401..340ea30ad0 100644
--- a/doc/classes/EditorSceneImporter.xml
+++ b/doc/classes/EditorSceneImporter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorSceneImporter" inherits="Reference" category="Core" version="3.0-stable">
+<class name="EditorSceneImporter" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/EditorScenePostImport.xml b/doc/classes/EditorScenePostImport.xml
index 4c0709249e..8e7c79db84 100644
--- a/doc/classes/EditorScenePostImport.xml
+++ b/doc/classes/EditorScenePostImport.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorScenePostImport" inherits="Reference" category="Core" version="3.0-stable">
+<class name="EditorScenePostImport" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/EditorScript.xml b/doc/classes/EditorScript.xml
index a3cd12ab50..fa7a74460f 100644
--- a/doc/classes/EditorScript.xml
+++ b/doc/classes/EditorScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorScript" inherits="Reference" category="Core" version="3.0-stable">
+<class name="EditorScript" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
Base script that can be used to add extension functions to the editor.
</brief_description>
diff --git a/doc/classes/EditorSelection.xml b/doc/classes/EditorSelection.xml
index 0424ab5e43..325fae0fe9 100644
--- a/doc/classes/EditorSelection.xml
+++ b/doc/classes/EditorSelection.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorSelection" inherits="Object" category="Core" version="3.0-stable">
+<class name="EditorSelection" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
Manages the SceneTree selection in the editor.
</brief_description>
diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml
index a37ea0fec7..ef50c34792 100644
--- a/doc/classes/EditorSettings.xml
+++ b/doc/classes/EditorSettings.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorSettings" inherits="Resource" category="Core" version="3.0-stable">
+<class name="EditorSettings" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
Object that holds the project-independent editor settings.
</brief_description>
diff --git a/doc/classes/EditorSpatialGizmo.xml b/doc/classes/EditorSpatialGizmo.xml
index ba026166bb..3895f8a2e7 100644
--- a/doc/classes/EditorSpatialGizmo.xml
+++ b/doc/classes/EditorSpatialGizmo.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorSpatialGizmo" inherits="SpatialGizmo" category="Core" version="3.0-stable">
+<class name="EditorSpatialGizmo" inherits="SpatialGizmo" category="Core" version="3.1-dev">
<brief_description>
Custom gizmo for editing Spatial objects.
</brief_description>
diff --git a/doc/classes/EncodedObjectAsID.xml b/doc/classes/EncodedObjectAsID.xml
index 604ce42516..5b1b370fe0 100644
--- a/doc/classes/EncodedObjectAsID.xml
+++ b/doc/classes/EncodedObjectAsID.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EncodedObjectAsID" inherits="Reference" category="Core" version="3.0-stable">
+<class name="EncodedObjectAsID" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml
index ad5e75bad5..d4fb66540b 100644
--- a/doc/classes/Engine.xml
+++ b/doc/classes/Engine.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Engine" inherits="Object" category="Core" version="3.0-stable">
+<class name="Engine" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
Access to basic engine properties.
</brief_description>
diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml
index ea35ef89f3..db87720e30 100644
--- a/doc/classes/Environment.xml
+++ b/doc/classes/Environment.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Environment" inherits="Resource" category="Core" version="3.0-stable">
+<class name="Environment" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
Resource for environment nodes (like [WorldEnvironment]) that define multiple rendering options.
</brief_description>
diff --git a/doc/classes/File.xml b/doc/classes/File.xml
index 3ac2a7e643..baa7045e8c 100644
--- a/doc/classes/File.xml
+++ b/doc/classes/File.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="File" inherits="Reference" category="Core" version="3.0-stable">
+<class name="File" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
Type to handle file reading and writing operations.
</brief_description>
diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml
index cee64b7ade..50deecee72 100644
--- a/doc/classes/FileDialog.xml
+++ b/doc/classes/FileDialog.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="FileDialog" inherits="ConfirmationDialog" category="Core" version="3.0-stable">
+<class name="FileDialog" inherits="ConfirmationDialog" category="Core" version="3.1-dev">
<brief_description>
Dialog for selecting files or directories in the filesystem.
</brief_description>
diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml
index 7190067b09..a6ab2e3a77 100644
--- a/doc/classes/Font.xml
+++ b/doc/classes/Font.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Font" inherits="Resource" category="Core" version="3.0-stable">
+<class name="Font" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
Internationalized font and text drawing support.
</brief_description>
diff --git a/doc/classes/FuncRef.xml b/doc/classes/FuncRef.xml
index 8ad6da9adc..ff37408dcd 100644
--- a/doc/classes/FuncRef.xml
+++ b/doc/classes/FuncRef.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="FuncRef" inherits="Reference" category="Core" version="3.0-stable">
+<class name="FuncRef" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
Reference to a function in an object.
</brief_description>
diff --git a/doc/classes/GIProbe.xml b/doc/classes/GIProbe.xml
index e9f1dfecaf..ffe01c37af 100644
--- a/doc/classes/GIProbe.xml
+++ b/doc/classes/GIProbe.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GIProbe" inherits="VisualInstance" category="Core" version="3.0-stable">
+<class name="GIProbe" inherits="VisualInstance" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/GIProbeData.xml b/doc/classes/GIProbeData.xml
index 32a891e277..97193600aa 100644
--- a/doc/classes/GIProbeData.xml
+++ b/doc/classes/GIProbeData.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GIProbeData" inherits="Resource" category="Core" version="3.0-stable">
+<class name="GIProbeData" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Generic6DOFJoint.xml b/doc/classes/Generic6DOFJoint.xml
index 4be44b3819..ffcc6e2a0c 100644
--- a/doc/classes/Generic6DOFJoint.xml
+++ b/doc/classes/Generic6DOFJoint.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Generic6DOFJoint" inherits="Joint" category="Core" version="3.0-stable">
+<class name="Generic6DOFJoint" inherits="Joint" category="Core" version="3.1-dev">
<brief_description>
The generic 6 degrees of freedom joint can implement a variety of joint-types by locking certain axes' rotation or translation.
</brief_description>
diff --git a/doc/classes/Geometry.xml b/doc/classes/Geometry.xml
index b3f63daf9c..ad30829b5d 100644
--- a/doc/classes/Geometry.xml
+++ b/doc/classes/Geometry.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Geometry" inherits="Object" category="Core" version="3.0-stable">
+<class name="Geometry" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/GeometryInstance.xml b/doc/classes/GeometryInstance.xml
index 8dd3c23ee2..3575754d51 100644
--- a/doc/classes/GeometryInstance.xml
+++ b/doc/classes/GeometryInstance.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GeometryInstance" inherits="VisualInstance" category="Core" version="3.0-stable">
+<class name="GeometryInstance" inherits="VisualInstance" category="Core" version="3.1-dev">
<brief_description>
Base node for geometry based visual instances.
</brief_description>
diff --git a/doc/classes/Gradient.xml b/doc/classes/Gradient.xml
index 8b4bf4d448..2a7e6e1de2 100644
--- a/doc/classes/Gradient.xml
+++ b/doc/classes/Gradient.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Gradient" inherits="Resource" category="Core" version="3.0-stable">
+<class name="Gradient" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
Color interpolator node.
</brief_description>
diff --git a/doc/classes/GradientTexture.xml b/doc/classes/GradientTexture.xml
index 127a6d8204..483dee92b6 100644
--- a/doc/classes/GradientTexture.xml
+++ b/doc/classes/GradientTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GradientTexture" inherits="Texture" category="Core" version="3.0-stable">
+<class name="GradientTexture" inherits="Texture" category="Core" version="3.1-dev">
<brief_description>
Gradient filled texture.
</brief_description>
diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml
index 2090155e85..dde00f85da 100644
--- a/doc/classes/GraphEdit.xml
+++ b/doc/classes/GraphEdit.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GraphEdit" inherits="Control" category="Core" version="3.0-stable">
+<class name="GraphEdit" inherits="Control" category="Core" version="3.1-dev">
<brief_description>
GraphEdit is an area capable of showing various GraphNodes. It manages connection events between them.
</brief_description>
diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml
index ce8cb053ce..6b581771e0 100644
--- a/doc/classes/GraphNode.xml
+++ b/doc/classes/GraphNode.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GraphNode" inherits="Container" category="Core" version="3.0-stable">
+<class name="GraphNode" inherits="Container" category="Core" version="3.1-dev">
<brief_description>
A GraphNode is a container with several input and output slots allowing connections between GraphNodes. Slots can have different, incompatible types.
</brief_description>
diff --git a/doc/classes/GridContainer.xml b/doc/classes/GridContainer.xml
index 8463acc1d4..414b7c27e7 100644
--- a/doc/classes/GridContainer.xml
+++ b/doc/classes/GridContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GridContainer" inherits="Container" category="Core" version="3.0-stable">
+<class name="GridContainer" inherits="Container" category="Core" version="3.1-dev">
<brief_description>
Grid container used to arrange elements in a grid like layout
</brief_description>
diff --git a/doc/classes/GrooveJoint2D.xml b/doc/classes/GrooveJoint2D.xml
index c1aa10026c..30497d243e 100644
--- a/doc/classes/GrooveJoint2D.xml
+++ b/doc/classes/GrooveJoint2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GrooveJoint2D" inherits="Joint2D" category="Core" version="3.0-stable">
+<class name="GrooveJoint2D" inherits="Joint2D" category="Core" version="3.1-dev">
<brief_description>
Groove constraint for 2D physics.
</brief_description>
diff --git a/doc/classes/HBoxContainer.xml b/doc/classes/HBoxContainer.xml
index 3597b4d2d0..7c73583d58 100644
--- a/doc/classes/HBoxContainer.xml
+++ b/doc/classes/HBoxContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HBoxContainer" inherits="BoxContainer" category="Core" version="3.0-stable">
+<class name="HBoxContainer" inherits="BoxContainer" category="Core" version="3.1-dev">
<brief_description>
Horizontal box container.
</brief_description>
diff --git a/doc/classes/HScrollBar.xml b/doc/classes/HScrollBar.xml
index ed0a5ae3ad..20edc86747 100644
--- a/doc/classes/HScrollBar.xml
+++ b/doc/classes/HScrollBar.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HScrollBar" inherits="ScrollBar" category="Core" version="3.0-stable">
+<class name="HScrollBar" inherits="ScrollBar" category="Core" version="3.1-dev">
<brief_description>
Horizontal scroll bar.
</brief_description>
diff --git a/doc/classes/HSeparator.xml b/doc/classes/HSeparator.xml
index ac02f76146..e410aa4d86 100644
--- a/doc/classes/HSeparator.xml
+++ b/doc/classes/HSeparator.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HSeparator" inherits="Separator" category="Core" version="3.0-stable">
+<class name="HSeparator" inherits="Separator" category="Core" version="3.1-dev">
<brief_description>
Horizontal separator.
</brief_description>
diff --git a/doc/classes/HSlider.xml b/doc/classes/HSlider.xml
index 791bc5159b..70070d612b 100644
--- a/doc/classes/HSlider.xml
+++ b/doc/classes/HSlider.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HSlider" inherits="Slider" category="Core" version="3.0-stable">
+<class name="HSlider" inherits="Slider" category="Core" version="3.1-dev">
<brief_description>
Horizontal slider.
</brief_description>
diff --git a/doc/classes/HSplitContainer.xml b/doc/classes/HSplitContainer.xml
index 68a794eb9f..7adf7d9d19 100644
--- a/doc/classes/HSplitContainer.xml
+++ b/doc/classes/HSplitContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HSplitContainer" inherits="SplitContainer" category="Core" version="3.0-stable">
+<class name="HSplitContainer" inherits="SplitContainer" category="Core" version="3.1-dev">
<brief_description>
Horizontal split container.
</brief_description>
diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml
index 3fa780e892..1c518fb6f5 100644
--- a/doc/classes/HTTPClient.xml
+++ b/doc/classes/HTTPClient.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HTTPClient" inherits="Reference" category="Core" version="3.0-stable">
+<class name="HTTPClient" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
Hyper-text transfer protocol client.
</brief_description>
diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml
index 8b8cc6b744..a6fd229ac9 100644
--- a/doc/classes/HTTPRequest.xml
+++ b/doc/classes/HTTPRequest.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HTTPRequest" inherits="Node" category="Core" version="3.0-stable">
+<class name="HTTPRequest" inherits="Node" category="Core" version="3.1-dev">
<brief_description>
A node with the ability to send HTTP requests.
</brief_description>
diff --git a/doc/classes/HingeJoint.xml b/doc/classes/HingeJoint.xml
index 367867dd00..01e88f1de6 100644
--- a/doc/classes/HingeJoint.xml
+++ b/doc/classes/HingeJoint.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="HingeJoint" inherits="Joint" category="Core" version="3.0-stable">
+<class name="HingeJoint" inherits="Joint" category="Core" version="3.1-dev">
<brief_description>
A hinge between two 3D bodies.
</brief_description>
diff --git a/doc/classes/IP.xml b/doc/classes/IP.xml
index d01d88590e..c8f2d3970b 100644
--- a/doc/classes/IP.xml
+++ b/doc/classes/IP.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="IP" inherits="Object" category="Core" version="3.0-stable">
+<class name="IP" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
Internet protocol (IP) support functions like DNS resolution.
</brief_description>
diff --git a/doc/classes/IP_Unix.xml b/doc/classes/IP_Unix.xml
index ba33793d72..7360067ecf 100644
--- a/doc/classes/IP_Unix.xml
+++ b/doc/classes/IP_Unix.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="IP_Unix" inherits="IP" category="Core" version="3.0-stable">
+<class name="IP_Unix" inherits="IP" category="Core" version="3.1-dev">
<brief_description>
Unix IP support. See [IP].
</brief_description>
diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml
index a38bfeb35e..c4e0d55010 100644
--- a/doc/classes/Image.xml
+++ b/doc/classes/Image.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Image" inherits="Resource" category="Core" version="3.0-stable">
+<class name="Image" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
Image datatype.
</brief_description>
diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml
index 96261c8e12..f7f211861d 100644
--- a/doc/classes/ImageTexture.xml
+++ b/doc/classes/ImageTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ImageTexture" inherits="Texture" category="Core" version="3.0-stable">
+<class name="ImageTexture" inherits="Texture" category="Core" version="3.1-dev">
<brief_description>
A [Texture] based on an [Image].
</brief_description>
diff --git a/doc/classes/ImmediateGeometry.xml b/doc/classes/ImmediateGeometry.xml
index 0376854bb6..1cb86bc07f 100644
--- a/doc/classes/ImmediateGeometry.xml
+++ b/doc/classes/ImmediateGeometry.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ImmediateGeometry" inherits="GeometryInstance" category="Core" version="3.0-stable">
+<class name="ImmediateGeometry" inherits="GeometryInstance" category="Core" version="3.1-dev">
<brief_description>
Draws simple geometry from code.
</brief_description>
diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml
index 946b7b9bac..6ec6f08804 100644
--- a/doc/classes/Input.xml
+++ b/doc/classes/Input.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Input" inherits="Object" category="Core" version="3.0-stable">
+<class name="Input" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
A Singleton that deals with inputs.
</brief_description>
diff --git a/doc/classes/InputDefault.xml b/doc/classes/InputDefault.xml
index b804c29cd0..b82904c023 100644
--- a/doc/classes/InputDefault.xml
+++ b/doc/classes/InputDefault.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputDefault" inherits="Input" category="Core" version="3.0-stable">
+<class name="InputDefault" inherits="Input" category="Core" version="3.1-dev">
<brief_description>
Default implementation of the [Input] class.
</brief_description>
diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml
index 07372d382d..41defdcb7f 100644
--- a/doc/classes/InputEvent.xml
+++ b/doc/classes/InputEvent.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEvent" inherits="Resource" category="Core" version="3.0-stable">
+<class name="InputEvent" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
Generic input event
</brief_description>
diff --git a/doc/classes/InputEventAction.xml b/doc/classes/InputEventAction.xml
index 5ef1711e75..f0c6cf59be 100644
--- a/doc/classes/InputEventAction.xml
+++ b/doc/classes/InputEventAction.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventAction" inherits="InputEvent" category="Core" version="3.0-stable">
+<class name="InputEventAction" inherits="InputEvent" category="Core" version="3.1-dev">
<brief_description>
Input event type for actions.
</brief_description>
diff --git a/doc/classes/InputEventGesture.xml b/doc/classes/InputEventGesture.xml
index 4d82363b21..20410a8d5e 100644
--- a/doc/classes/InputEventGesture.xml
+++ b/doc/classes/InputEventGesture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventGesture" inherits="InputEventWithModifiers" category="Core" version="3.0-stable">
+<class name="InputEventGesture" inherits="InputEventWithModifiers" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/InputEventJoypadButton.xml b/doc/classes/InputEventJoypadButton.xml
index 47ba2f08ca..2c7c41d9e0 100644
--- a/doc/classes/InputEventJoypadButton.xml
+++ b/doc/classes/InputEventJoypadButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventJoypadButton" inherits="InputEvent" category="Core" version="3.0-stable">
+<class name="InputEventJoypadButton" inherits="InputEvent" category="Core" version="3.1-dev">
<brief_description>
Input event for gamepad buttons.
</brief_description>
diff --git a/doc/classes/InputEventJoypadMotion.xml b/doc/classes/InputEventJoypadMotion.xml
index 478f0dddfc..cdcab3fcab 100644
--- a/doc/classes/InputEventJoypadMotion.xml
+++ b/doc/classes/InputEventJoypadMotion.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventJoypadMotion" inherits="InputEvent" category="Core" version="3.0-stable">
+<class name="InputEventJoypadMotion" inherits="InputEvent" category="Core" version="3.1-dev">
<brief_description>
Input event type for gamepad joysticks and other motions. For buttons see [code]InputEventJoypadButton[/code].
</brief_description>
diff --git a/doc/classes/InputEventKey.xml b/doc/classes/InputEventKey.xml
index a930491beb..1cd00e1042 100644
--- a/doc/classes/InputEventKey.xml
+++ b/doc/classes/InputEventKey.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventKey" inherits="InputEventWithModifiers" category="Core" version="3.0-stable">
+<class name="InputEventKey" inherits="InputEventWithModifiers" category="Core" version="3.1-dev">
<brief_description>
Input event type for keyboard events.
</brief_description>
diff --git a/doc/classes/InputEventMagnifyGesture.xml b/doc/classes/InputEventMagnifyGesture.xml
index 880da473a6..06beaa84f9 100644
--- a/doc/classes/InputEventMagnifyGesture.xml
+++ b/doc/classes/InputEventMagnifyGesture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventMagnifyGesture" inherits="InputEventGesture" category="Core" version="3.0-stable">
+<class name="InputEventMagnifyGesture" inherits="InputEventGesture" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/InputEventMouse.xml b/doc/classes/InputEventMouse.xml
index ca29c23634..5d50d32d44 100644
--- a/doc/classes/InputEventMouse.xml
+++ b/doc/classes/InputEventMouse.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventMouse" inherits="InputEventWithModifiers" category="Core" version="3.0-stable">
+<class name="InputEventMouse" inherits="InputEventWithModifiers" category="Core" version="3.1-dev">
<brief_description>
Base input event type for mouse events.
</brief_description>
diff --git a/doc/classes/InputEventMouseButton.xml b/doc/classes/InputEventMouseButton.xml
index a8dc087eca..bbdd2aff4e 100644
--- a/doc/classes/InputEventMouseButton.xml
+++ b/doc/classes/InputEventMouseButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventMouseButton" inherits="InputEventMouse" category="Core" version="3.0-stable">
+<class name="InputEventMouseButton" inherits="InputEventMouse" category="Core" version="3.1-dev">
<brief_description>
Input event type for mouse button events.
</brief_description>
diff --git a/doc/classes/InputEventMouseMotion.xml b/doc/classes/InputEventMouseMotion.xml
index 2bd175348b..96160dc699 100644
--- a/doc/classes/InputEventMouseMotion.xml
+++ b/doc/classes/InputEventMouseMotion.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventMouseMotion" inherits="InputEventMouse" category="Core" version="3.0-stable">
+<class name="InputEventMouseMotion" inherits="InputEventMouse" category="Core" version="3.1-dev">
<brief_description>
Input event type for mouse motion events.
</brief_description>
diff --git a/doc/classes/InputEventPanGesture.xml b/doc/classes/InputEventPanGesture.xml
index 1a16c0f385..06edf36d06 100644
--- a/doc/classes/InputEventPanGesture.xml
+++ b/doc/classes/InputEventPanGesture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventPanGesture" inherits="InputEventGesture" category="Core" version="3.0-stable">
+<class name="InputEventPanGesture" inherits="InputEventGesture" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/InputEventScreenDrag.xml b/doc/classes/InputEventScreenDrag.xml
index a9780e280a..fd7ec15acc 100644
--- a/doc/classes/InputEventScreenDrag.xml
+++ b/doc/classes/InputEventScreenDrag.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventScreenDrag" inherits="InputEvent" category="Core" version="3.0-stable">
+<class name="InputEventScreenDrag" inherits="InputEvent" category="Core" version="3.1-dev">
<brief_description>
Input event type for screen drag events.
(only available on mobile devices)
diff --git a/doc/classes/InputEventScreenTouch.xml b/doc/classes/InputEventScreenTouch.xml
index 783c36099b..019332ec26 100644
--- a/doc/classes/InputEventScreenTouch.xml
+++ b/doc/classes/InputEventScreenTouch.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventScreenTouch" inherits="InputEvent" category="Core" version="3.0-stable">
+<class name="InputEventScreenTouch" inherits="InputEvent" category="Core" version="3.1-dev">
<brief_description>
Input event type for screen touch events.
(only available on mobile devices)
diff --git a/doc/classes/InputEventWithModifiers.xml b/doc/classes/InputEventWithModifiers.xml
index a1b1b6523f..a31df65ffb 100644
--- a/doc/classes/InputEventWithModifiers.xml
+++ b/doc/classes/InputEventWithModifiers.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputEventWithModifiers" inherits="InputEvent" category="Core" version="3.0-stable">
+<class name="InputEventWithModifiers" inherits="InputEvent" category="Core" version="3.1-dev">
<brief_description>
Base class for keys events with modifiers.
</brief_description>
diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml
index 4cedd94094..c5326c6211 100644
--- a/doc/classes/InputMap.xml
+++ b/doc/classes/InputMap.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InputMap" inherits="Object" category="Core" version="3.0-stable">
+<class name="InputMap" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
Singleton that manages [InputEventAction].
</brief_description>
diff --git a/doc/classes/InstancePlaceholder.xml b/doc/classes/InstancePlaceholder.xml
index f698551d41..834ad7bb11 100644
--- a/doc/classes/InstancePlaceholder.xml
+++ b/doc/classes/InstancePlaceholder.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InstancePlaceholder" inherits="Node" category="Core" version="3.0-stable">
+<class name="InstancePlaceholder" inherits="Node" category="Core" version="3.1-dev">
<brief_description>
Placeholder for the root [Node] of a [PackedScene].
</brief_description>
diff --git a/doc/classes/InterpolatedCamera.xml b/doc/classes/InterpolatedCamera.xml
index de84a7df6e..19252ca5a8 100644
--- a/doc/classes/InterpolatedCamera.xml
+++ b/doc/classes/InterpolatedCamera.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="InterpolatedCamera" inherits="Camera" category="Core" version="3.0-stable">
+<class name="InterpolatedCamera" inherits="Camera" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml
index b94a06f170..95812ab299 100644
--- a/doc/classes/ItemList.xml
+++ b/doc/classes/ItemList.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ItemList" inherits="Control" category="Core" version="3.0-stable">
+<class name="ItemList" inherits="Control" category="Core" version="3.1-dev">
<brief_description>
Control that provides a list of selectable items (and/or icons) in a single column, or optionally in multiple columns.
</brief_description>
diff --git a/doc/classes/JSON.xml b/doc/classes/JSON.xml
index 078c293fc0..d3c2e7bb2f 100644
--- a/doc/classes/JSON.xml
+++ b/doc/classes/JSON.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="JSON" inherits="Object" category="Core" version="3.0-stable">
+<class name="JSON" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
Helper class for parsing JSON data.
</brief_description>
diff --git a/doc/classes/JSONParseResult.xml b/doc/classes/JSONParseResult.xml
index 18313beaf8..4f9cdc976d 100644
--- a/doc/classes/JSONParseResult.xml
+++ b/doc/classes/JSONParseResult.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="JSONParseResult" inherits="Reference" category="Core" version="3.0-stable">
+<class name="JSONParseResult" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
Data class wrapper for decoded JSON.
</brief_description>
diff --git a/doc/classes/JavaScript.xml b/doc/classes/JavaScript.xml
index 8183b48ece..4f37d75038 100644
--- a/doc/classes/JavaScript.xml
+++ b/doc/classes/JavaScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="JavaScript" inherits="Object" category="Core" version="3.0-stable">
+<class name="JavaScript" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
Singleton that connects the engine with the browser's JavaScript context in HTML5 export.
</brief_description>
diff --git a/doc/classes/Joint.xml b/doc/classes/Joint.xml
index 8ead75d556..bb7ac74556 100644
--- a/doc/classes/Joint.xml
+++ b/doc/classes/Joint.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Joint" inherits="Spatial" category="Core" version="3.0-stable">
+<class name="Joint" inherits="Spatial" category="Core" version="3.1-dev">
<brief_description>
Base class for all 3D joints
</brief_description>
diff --git a/doc/classes/Joint2D.xml b/doc/classes/Joint2D.xml
index 22f267f26f..a005e7994a 100644
--- a/doc/classes/Joint2D.xml
+++ b/doc/classes/Joint2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Joint2D" inherits="Node2D" category="Core" version="3.0-stable">
+<class name="Joint2D" inherits="Node2D" category="Core" version="3.1-dev">
<brief_description>
Base node for all joint constraints in 2D physics.
</brief_description>
diff --git a/doc/classes/KinematicBody.xml b/doc/classes/KinematicBody.xml
index 1735501a47..7ebea43cb9 100644
--- a/doc/classes/KinematicBody.xml
+++ b/doc/classes/KinematicBody.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="KinematicBody" inherits="PhysicsBody" category="Core" version="3.0-stable">
+<class name="KinematicBody" inherits="PhysicsBody" category="Core" version="3.1-dev">
<brief_description>
Kinematic body 3D node.
</brief_description>
diff --git a/doc/classes/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml
index f7303c19c4..da7b34440e 100644
--- a/doc/classes/KinematicBody2D.xml
+++ b/doc/classes/KinematicBody2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="KinematicBody2D" inherits="PhysicsBody2D" category="Core" version="3.0-stable">
+<class name="KinematicBody2D" inherits="PhysicsBody2D" category="Core" version="3.1-dev">
<brief_description>
Kinematic body 2D node.
</brief_description>
diff --git a/doc/classes/KinematicCollision.xml b/doc/classes/KinematicCollision.xml
index 613b135578..29025910f8 100644
--- a/doc/classes/KinematicCollision.xml
+++ b/doc/classes/KinematicCollision.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="KinematicCollision" inherits="Reference" category="Core" version="3.0-stable">
+<class name="KinematicCollision" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
Collision data for KinematicBody collisions.
</brief_description>
diff --git a/doc/classes/KinematicCollision2D.xml b/doc/classes/KinematicCollision2D.xml
index bb949877ad..b133703c65 100644
--- a/doc/classes/KinematicCollision2D.xml
+++ b/doc/classes/KinematicCollision2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="KinematicCollision2D" inherits="Reference" category="Core" version="3.0-stable">
+<class name="KinematicCollision2D" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
Collision data for KinematicBody2D collisions.
</brief_description>
diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml
index bbf83308de..7dd07c0c8e 100644
--- a/doc/classes/Label.xml
+++ b/doc/classes/Label.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Label" inherits="Control" category="Core" version="3.0-stable">
+<class name="Label" inherits="Control" category="Core" version="3.1-dev">
<brief_description>
Displays plain text in a line or wrapped inside a rectangle. For formatted text, use [RichTextLabel].
</brief_description>
diff --git a/doc/classes/LargeTexture.xml b/doc/classes/LargeTexture.xml
index 219943f021..f09f2aa82c 100644
--- a/doc/classes/LargeTexture.xml
+++ b/doc/classes/LargeTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="LargeTexture" inherits="Texture" category="Core" version="3.0-stable">
+<class name="LargeTexture" inherits="Texture" category="Core" version="3.1-dev">
<brief_description>
A Texture capable of storing many smaller Textures with offsets.
</brief_description>
diff --git a/doc/classes/Light.xml b/doc/classes/Light.xml
index 30722919d5..b99908256c 100644
--- a/doc/classes/Light.xml
+++ b/doc/classes/Light.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Light" inherits="VisualInstance" category="Core" version="3.0-stable">
+<class name="Light" inherits="VisualInstance" category="Core" version="3.1-dev">
<brief_description>
Provides a base class for different kinds of light nodes.
</brief_description>
diff --git a/doc/classes/Light2D.xml b/doc/classes/Light2D.xml
index 019bf48082..b12cecacfc 100644
--- a/doc/classes/Light2D.xml
+++ b/doc/classes/Light2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Light2D" inherits="Node2D" category="Core" version="3.0-stable">
+<class name="Light2D" inherits="Node2D" category="Core" version="3.1-dev">
<brief_description>
Casts light in a 2D environment.
</brief_description>
diff --git a/doc/classes/LightOccluder2D.xml b/doc/classes/LightOccluder2D.xml
index 4ea82918e1..becfdd2ff2 100644
--- a/doc/classes/LightOccluder2D.xml
+++ b/doc/classes/LightOccluder2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="LightOccluder2D" inherits="Node2D" category="Core" version="3.0-stable">
+<class name="LightOccluder2D" inherits="Node2D" category="Core" version="3.1-dev">
<brief_description>
Occludes light cast by a Light2D, casting shadows.
</brief_description>
diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml
index a5eadae715..fd45c8a986 100644
--- a/doc/classes/Line2D.xml
+++ b/doc/classes/Line2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Line2D" inherits="Node2D" category="Core" version="3.0-stable">
+<class name="Line2D" inherits="Node2D" category="Core" version="3.1-dev">
<brief_description>
A 2D line.
</brief_description>
diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml
index d82fafd4ec..fa65180d89 100644
--- a/doc/classes/LineEdit.xml
+++ b/doc/classes/LineEdit.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="LineEdit" inherits="Control" category="Core" version="3.0-stable">
+<class name="LineEdit" inherits="Control" category="Core" version="3.1-dev">
<brief_description>
Control that provides single line string editing.
</brief_description>
diff --git a/doc/classes/LineShape2D.xml b/doc/classes/LineShape2D.xml
index a6a1e7eb36..8ff3c71a9c 100644
--- a/doc/classes/LineShape2D.xml
+++ b/doc/classes/LineShape2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="LineShape2D" inherits="Shape2D" category="Core" version="3.0-stable">
+<class name="LineShape2D" inherits="Shape2D" category="Core" version="3.1-dev">
<brief_description>
Line shape for 2D collisions.
</brief_description>
diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml
index 37bfb005ab..b3a5f3fd7c 100644
--- a/doc/classes/LinkButton.xml
+++ b/doc/classes/LinkButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="LinkButton" inherits="BaseButton" category="Core" version="3.0-stable">
+<class name="LinkButton" inherits="BaseButton" category="Core" version="3.1-dev">
<brief_description>
Simple button used to represent a link to some resource
</brief_description>
diff --git a/doc/classes/Listener.xml b/doc/classes/Listener.xml
index 5765e071a4..0783c3ddba 100644
--- a/doc/classes/Listener.xml
+++ b/doc/classes/Listener.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Listener" inherits="Spatial" category="Core" version="3.0-stable">
+<class name="Listener" inherits="Spatial" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/MainLoop.xml b/doc/classes/MainLoop.xml
index 5a49641531..214c2569e9 100644
--- a/doc/classes/MainLoop.xml
+++ b/doc/classes/MainLoop.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MainLoop" inherits="Object" category="Core" version="3.0-stable">
+<class name="MainLoop" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
Main loop is the abstract main loop base class.
</brief_description>
diff --git a/doc/classes/MarginContainer.xml b/doc/classes/MarginContainer.xml
index 25ac7c5668..80554192a0 100644
--- a/doc/classes/MarginContainer.xml
+++ b/doc/classes/MarginContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MarginContainer" inherits="Container" category="Core" version="3.0-stable">
+<class name="MarginContainer" inherits="Container" category="Core" version="3.1-dev">
<brief_description>
Simple margin container.
</brief_description>
diff --git a/doc/classes/Marshalls.xml b/doc/classes/Marshalls.xml
index 554c32c893..44ff094971 100644
--- a/doc/classes/Marshalls.xml
+++ b/doc/classes/Marshalls.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Marshalls" inherits="Reference" category="Core" version="3.0-stable">
+<class name="Marshalls" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
Data transformation (marshalling) and encoding helpers.
</brief_description>
diff --git a/doc/classes/Material.xml b/doc/classes/Material.xml
index 5c31efc5e0..fa53ce11da 100644
--- a/doc/classes/Material.xml
+++ b/doc/classes/Material.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Material" inherits="Resource" category="Core" version="3.0-stable">
+<class name="Material" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
Abstract base [Resource] for coloring and shading geometry.
</brief_description>
diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml
index 5b15bba22a..333326b730 100644
--- a/doc/classes/MenuButton.xml
+++ b/doc/classes/MenuButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MenuButton" inherits="Button" category="Core" version="3.0-stable">
+<class name="MenuButton" inherits="Button" category="Core" version="3.1-dev">
<brief_description>
Special button that brings up a [PopupMenu] when clicked.
</brief_description>
diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml
index 7fbc7768f7..6e60809999 100644
--- a/doc/classes/Mesh.xml
+++ b/doc/classes/Mesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Mesh" inherits="Resource" category="Core" version="3.0-stable">
+<class name="Mesh" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
A [Resource] that contains vertex-array based geometry.
</brief_description>
diff --git a/doc/classes/MeshDataTool.xml b/doc/classes/MeshDataTool.xml
index 720ab6f5d2..eff6bd2c61 100644
--- a/doc/classes/MeshDataTool.xml
+++ b/doc/classes/MeshDataTool.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MeshDataTool" inherits="Reference" category="Core" version="3.0-stable">
+<class name="MeshDataTool" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/MeshInstance.xml b/doc/classes/MeshInstance.xml
index 3b9ed70e77..d70123239a 100644
--- a/doc/classes/MeshInstance.xml
+++ b/doc/classes/MeshInstance.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MeshInstance" inherits="GeometryInstance" category="Core" version="3.0-stable">
+<class name="MeshInstance" inherits="GeometryInstance" category="Core" version="3.1-dev">
<brief_description>
Node that instances meshes into a scenario.
</brief_description>
diff --git a/doc/classes/MeshLibrary.xml b/doc/classes/MeshLibrary.xml
index 774deab0ef..40776d095a 100644
--- a/doc/classes/MeshLibrary.xml
+++ b/doc/classes/MeshLibrary.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MeshLibrary" inherits="Resource" category="Core" version="3.0-stable">
+<class name="MeshLibrary" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
Library of meshes.
</brief_description>
diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml
index 270da019eb..f5bd0885d3 100644
--- a/doc/classes/MultiMesh.xml
+++ b/doc/classes/MultiMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MultiMesh" inherits="Resource" category="Core" version="3.0-stable">
+<class name="MultiMesh" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
Provides high performance mesh instancing.
</brief_description>
diff --git a/doc/classes/MultiMeshInstance.xml b/doc/classes/MultiMeshInstance.xml
index aef372f810..0ffdb3c928 100644
--- a/doc/classes/MultiMeshInstance.xml
+++ b/doc/classes/MultiMeshInstance.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MultiMeshInstance" inherits="GeometryInstance" category="Core" version="3.0-stable">
+<class name="MultiMeshInstance" inherits="GeometryInstance" category="Core" version="3.1-dev">
<brief_description>
Node that instances a [MultiMesh].
</brief_description>
diff --git a/doc/classes/Mutex.xml b/doc/classes/Mutex.xml
index 2ed02cad48..ce3a4cc45a 100644
--- a/doc/classes/Mutex.xml
+++ b/doc/classes/Mutex.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Mutex" inherits="Reference" category="Core" version="3.0-stable">
+<class name="Mutex" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
A synchronization Mutex.
</brief_description>
diff --git a/doc/classes/Navigation.xml b/doc/classes/Navigation.xml
index 86302694a0..e2be70979d 100644
--- a/doc/classes/Navigation.xml
+++ b/doc/classes/Navigation.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Navigation" inherits="Spatial" category="Core" version="3.0-stable">
+<class name="Navigation" inherits="Spatial" category="Core" version="3.1-dev">
<brief_description>
A collection of [code]NavigationMesh[/code] resources and methods used for pathfinding.
</brief_description>
diff --git a/doc/classes/Navigation2D.xml b/doc/classes/Navigation2D.xml
index 80d53c00a5..4709dab3e8 100644
--- a/doc/classes/Navigation2D.xml
+++ b/doc/classes/Navigation2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Navigation2D" inherits="Node2D" category="Core" version="3.0-stable">
+<class name="Navigation2D" inherits="Node2D" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/NavigationMesh.xml b/doc/classes/NavigationMesh.xml
index 5cde8942d1..34ca1f852e 100644
--- a/doc/classes/NavigationMesh.xml
+++ b/doc/classes/NavigationMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NavigationMesh" inherits="Resource" category="Core" version="3.0-stable">
+<class name="NavigationMesh" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/NavigationMeshInstance.xml b/doc/classes/NavigationMeshInstance.xml
index f329bad0eb..48b7e3a8ef 100644
--- a/doc/classes/NavigationMeshInstance.xml
+++ b/doc/classes/NavigationMeshInstance.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NavigationMeshInstance" inherits="Spatial" category="Core" version="3.0-stable">
+<class name="NavigationMeshInstance" inherits="Spatial" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/NavigationPolygon.xml b/doc/classes/NavigationPolygon.xml
index 6e8154c4e5..b8865a24b3 100644
--- a/doc/classes/NavigationPolygon.xml
+++ b/doc/classes/NavigationPolygon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NavigationPolygon" inherits="Resource" category="Core" version="3.0-stable">
+<class name="NavigationPolygon" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/NavigationPolygonInstance.xml b/doc/classes/NavigationPolygonInstance.xml
index 023f13de89..db9b691ef1 100644
--- a/doc/classes/NavigationPolygonInstance.xml
+++ b/doc/classes/NavigationPolygonInstance.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NavigationPolygonInstance" inherits="Node2D" category="Core" version="3.0-stable">
+<class name="NavigationPolygonInstance" inherits="Node2D" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/NetworkedMultiplayerPeer.xml b/doc/classes/NetworkedMultiplayerPeer.xml
index 8f746594bc..794886dd64 100644
--- a/doc/classes/NetworkedMultiplayerPeer.xml
+++ b/doc/classes/NetworkedMultiplayerPeer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NetworkedMultiplayerPeer" inherits="PacketPeer" category="Core" version="3.0-stable">
+<class name="NetworkedMultiplayerPeer" inherits="PacketPeer" category="Core" version="3.1-dev">
<brief_description>
A high-level network interface to simplify multiplayer interactions.
</brief_description>
diff --git a/doc/classes/Nil.xml b/doc/classes/Nil.xml
index 2e845d511a..46c972d4d5 100644
--- a/doc/classes/Nil.xml
+++ b/doc/classes/Nil.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Nil" category="Built-In Types" version="3.0-stable">
+<class name="Nil" category="Built-In Types" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/NinePatchRect.xml b/doc/classes/NinePatchRect.xml
index e67f0ea4a4..ce6fe26e07 100644
--- a/doc/classes/NinePatchRect.xml
+++ b/doc/classes/NinePatchRect.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NinePatchRect" inherits="Control" category="Core" version="3.0-stable">
+<class name="NinePatchRect" inherits="Control" category="Core" version="3.1-dev">
<brief_description>
Scalable texture-based frame that tiles the texture's centers and sides, but keeps the corners' original size. Perfect for panels and dialog boxes.
</brief_description>
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index 46c8bf01a5..e272e14d08 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Node" inherits="Object" category="Core" version="3.0-stable">
+<class name="Node" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
Base class for all [i]scene[/i] objects.
</brief_description>
diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml
index f51c5abe18..0b462967a1 100644
--- a/doc/classes/Node2D.xml
+++ b/doc/classes/Node2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Node2D" inherits="CanvasItem" category="Core" version="3.0-stable">
+<class name="Node2D" inherits="CanvasItem" category="Core" version="3.1-dev">
<brief_description>
A 2D game object, parent of all 2D related nodes. Has a position, rotation, scale and Z-index.
</brief_description>
diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml
index 6027f110da..48effa5918 100644
--- a/doc/classes/NodePath.xml
+++ b/doc/classes/NodePath.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NodePath" category="Built-In Types" version="3.0-stable">
+<class name="NodePath" category="Built-In Types" version="3.1-dev">
<brief_description>
Pre-parsed scene tree path.
</brief_description>
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index a61b156b01..f37c80efc9 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="OS" inherits="Object" category="Core" version="3.0-stable">
+<class name="OS" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
Operating System functions.
</brief_description>
@@ -36,6 +36,12 @@
Returns [code]true[/code] if the current host platform is using multiple threads.
</description>
</method>
+ <method name="center_window">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="delay_msec" qualifiers="const">
<return type="void">
</return>
@@ -232,6 +238,12 @@
Returns the number of cores available in the host machine.
</description>
</method>
+ <method name="get_real_window_size" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_scancode_string" qualifiers="const">
<return type="String">
</return>
@@ -458,6 +470,12 @@
If [code]true[/code], the [code]user://[/code] file system is persistent, so that its state is the same after a player quits and starts the game again. Relevant to the HTML5 platform, where this persistence may be unavailable.
</description>
</method>
+ <method name="is_window_always_on_top" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="kill">
<return type="int" enum="Error">
</return>
@@ -586,6 +604,14 @@
Enables backup saves if [code]enabled[/code] is [code]true[/code].
</description>
</method>
+ <method name="set_window_always_on_top">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_window_title">
<return type="void">
</return>
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index 8a7006ea97..663eb2be56 100644
--- a/doc/classes/Object.xml
+++ b/doc/classes/Object.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Object" category="Core" version="3.0-stable">
+<class name="Object" category="Core" version="3.1-dev">
<brief_description>
Base class for all non built-in types.
</brief_description>
diff --git a/doc/classes/OccluderPolygon2D.xml b/doc/classes/OccluderPolygon2D.xml
index f16aca487e..9824c7868d 100644
--- a/doc/classes/OccluderPolygon2D.xml
+++ b/doc/classes/OccluderPolygon2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="OccluderPolygon2D" inherits="Resource" category="Core" version="3.0-stable">
+<class name="OccluderPolygon2D" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
Defines a 2D polygon for LightOccluder2D.
</brief_description>
diff --git a/doc/classes/OmniLight.xml b/doc/classes/OmniLight.xml
index d4d00e2a9b..2fdcc86d55 100644
--- a/doc/classes/OmniLight.xml
+++ b/doc/classes/OmniLight.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="OmniLight" inherits="Light" category="Core" version="3.0-stable">
+<class name="OmniLight" inherits="Light" category="Core" version="3.1-dev">
<brief_description>
OmniDirectional Light, such as a light bulb or a candle.
</brief_description>
diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml
index 56f4aa2082..cefb02d724 100644
--- a/doc/classes/OptionButton.xml
+++ b/doc/classes/OptionButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="OptionButton" inherits="Button" category="Core" version="3.0-stable">
+<class name="OptionButton" inherits="Button" category="Core" version="3.1-dev">
<brief_description>
Button control that provides selectable options when pressed.
</brief_description>
diff --git a/doc/classes/PCKPacker.xml b/doc/classes/PCKPacker.xml
index a04f9ef6fb..ed7a343f03 100644
--- a/doc/classes/PCKPacker.xml
+++ b/doc/classes/PCKPacker.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PCKPacker" inherits="Reference" category="Core" version="3.0-stable">
+<class name="PCKPacker" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/PHashTranslation.xml b/doc/classes/PHashTranslation.xml
index 94fddad706..52eb2748da 100644
--- a/doc/classes/PHashTranslation.xml
+++ b/doc/classes/PHashTranslation.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PHashTranslation" inherits="Translation" category="Core" version="3.0-stable">
+<class name="PHashTranslation" inherits="Translation" category="Core" version="3.1-dev">
<brief_description>
Optimized translation.
</brief_description>
diff --git a/doc/classes/PackedDataContainer.xml b/doc/classes/PackedDataContainer.xml
index 42d00e067b..edabaace8f 100644
--- a/doc/classes/PackedDataContainer.xml
+++ b/doc/classes/PackedDataContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PackedDataContainer" inherits="Resource" category="Core" version="3.0-stable">
+<class name="PackedDataContainer" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/PackedDataContainerRef.xml b/doc/classes/PackedDataContainerRef.xml
index 1adbbeb5a1..2f418991de 100644
--- a/doc/classes/PackedDataContainerRef.xml
+++ b/doc/classes/PackedDataContainerRef.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PackedDataContainerRef" inherits="Reference" category="Core" version="3.0-stable">
+<class name="PackedDataContainerRef" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml
index a5877a66d2..b6ef9db068 100644
--- a/doc/classes/PackedScene.xml
+++ b/doc/classes/PackedScene.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PackedScene" inherits="Resource" category="Core" version="3.0-stable">
+<class name="PackedScene" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
An abstraction of a serialized scene.
</brief_description>
diff --git a/doc/classes/PacketPeer.xml b/doc/classes/PacketPeer.xml
index 354ef1f3f3..6fdbaf27e6 100644
--- a/doc/classes/PacketPeer.xml
+++ b/doc/classes/PacketPeer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PacketPeer" inherits="Reference" category="Core" version="3.0-stable">
+<class name="PacketPeer" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
Abstraction and base class for packet-based protocols.
</brief_description>
diff --git a/doc/classes/PacketPeerStream.xml b/doc/classes/PacketPeerStream.xml
index b475c9d99e..0ad473f644 100644
--- a/doc/classes/PacketPeerStream.xml
+++ b/doc/classes/PacketPeerStream.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PacketPeerStream" inherits="PacketPeer" category="Core" version="3.0-stable">
+<class name="PacketPeerStream" inherits="PacketPeer" category="Core" version="3.1-dev">
<brief_description>
Wrapper to use a PacketPeer over a StreamPeer.
</brief_description>
diff --git a/doc/classes/PacketPeerUDP.xml b/doc/classes/PacketPeerUDP.xml
index d7b38297ba..29abcda9d9 100644
--- a/doc/classes/PacketPeerUDP.xml
+++ b/doc/classes/PacketPeerUDP.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PacketPeerUDP" inherits="PacketPeer" category="Core" version="3.0-stable">
+<class name="PacketPeerUDP" inherits="PacketPeer" category="Core" version="3.1-dev">
<brief_description>
UDP packet peer.
</brief_description>
diff --git a/doc/classes/Panel.xml b/doc/classes/Panel.xml
index 38c605f8a4..3afda37355 100644
--- a/doc/classes/Panel.xml
+++ b/doc/classes/Panel.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Panel" inherits="Control" category="Core" version="3.0-stable">
+<class name="Panel" inherits="Control" category="Core" version="3.1-dev">
<brief_description>
Provides an opaque background for [Control] children.
</brief_description>
diff --git a/doc/classes/PanelContainer.xml b/doc/classes/PanelContainer.xml
index 4c0875dea5..5b76f49687 100644
--- a/doc/classes/PanelContainer.xml
+++ b/doc/classes/PanelContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PanelContainer" inherits="Container" category="Core" version="3.0-stable">
+<class name="PanelContainer" inherits="Container" category="Core" version="3.1-dev">
<brief_description>
Panel container type.
</brief_description>
diff --git a/doc/classes/PanoramaSky.xml b/doc/classes/PanoramaSky.xml
index b99f29e112..0196f7a73e 100644
--- a/doc/classes/PanoramaSky.xml
+++ b/doc/classes/PanoramaSky.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PanoramaSky" inherits="Sky" category="Core" version="3.0-stable">
+<class name="PanoramaSky" inherits="Sky" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/ParallaxBackground.xml b/doc/classes/ParallaxBackground.xml
index 0b9e3c9609..c8b15b3c7d 100644
--- a/doc/classes/ParallaxBackground.xml
+++ b/doc/classes/ParallaxBackground.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ParallaxBackground" inherits="CanvasLayer" category="Core" version="3.0-stable">
+<class name="ParallaxBackground" inherits="CanvasLayer" category="Core" version="3.1-dev">
<brief_description>
A node used to create a parallax scrolling background.
</brief_description>
diff --git a/doc/classes/ParallaxLayer.xml b/doc/classes/ParallaxLayer.xml
index 1feb3054f3..b5d4e10d7e 100644
--- a/doc/classes/ParallaxLayer.xml
+++ b/doc/classes/ParallaxLayer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ParallaxLayer" inherits="Node2D" category="Core" version="3.0-stable">
+<class name="ParallaxLayer" inherits="Node2D" category="Core" version="3.1-dev">
<brief_description>
A parallax scrolling layer to be used with [ParallaxBackground].
</brief_description>
diff --git a/doc/classes/Particles.xml b/doc/classes/Particles.xml
index bdf62f2b14..b56c15f246 100644
--- a/doc/classes/Particles.xml
+++ b/doc/classes/Particles.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Particles" inherits="GeometryInstance" category="Core" version="3.0-stable">
+<class name="Particles" inherits="GeometryInstance" category="Core" version="3.1-dev">
<brief_description>
3D particle emitter.
</brief_description>
diff --git a/doc/classes/Particles2D.xml b/doc/classes/Particles2D.xml
index 20b9632c30..88a373b7a9 100644
--- a/doc/classes/Particles2D.xml
+++ b/doc/classes/Particles2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Particles2D" inherits="Node2D" category="Core" version="3.0-stable">
+<class name="Particles2D" inherits="Node2D" category="Core" version="3.1-dev">
<brief_description>
2D particle emitter.
</brief_description>
diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml
index 28ca512ec4..a6c463d307 100644
--- a/doc/classes/ParticlesMaterial.xml
+++ b/doc/classes/ParticlesMaterial.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ParticlesMaterial" inherits="Material" category="Core" version="3.0-stable">
+<class name="ParticlesMaterial" inherits="Material" category="Core" version="3.1-dev">
<brief_description>
Particle properties for [Particles] and [Particles2D] nodes.
</brief_description>
diff --git a/doc/classes/Path.xml b/doc/classes/Path.xml
index 0d931e12fd..48d41c89c1 100644
--- a/doc/classes/Path.xml
+++ b/doc/classes/Path.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Path" inherits="Spatial" category="Core" version="3.0-stable">
+<class name="Path" inherits="Spatial" category="Core" version="3.1-dev">
<brief_description>
Container for a [Curve3D].
</brief_description>
diff --git a/doc/classes/Path2D.xml b/doc/classes/Path2D.xml
index e889027283..dcef22c241 100644
--- a/doc/classes/Path2D.xml
+++ b/doc/classes/Path2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Path2D" inherits="Node2D" category="Core" version="3.0-stable">
+<class name="Path2D" inherits="Node2D" category="Core" version="3.1-dev">
<brief_description>
Contains a [Curve2D] path for [PathFollow2D] nodes to follow.
</brief_description>
diff --git a/doc/classes/PathFollow.xml b/doc/classes/PathFollow.xml
index 144afa21e7..c248e6f868 100644
--- a/doc/classes/PathFollow.xml
+++ b/doc/classes/PathFollow.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PathFollow" inherits="Spatial" category="Core" version="3.0-stable">
+<class name="PathFollow" inherits="Spatial" category="Core" version="3.1-dev">
<brief_description>
Point sampler for a [Path].
</brief_description>
diff --git a/doc/classes/PathFollow2D.xml b/doc/classes/PathFollow2D.xml
index 2d844c22bb..995c65d4fa 100644
--- a/doc/classes/PathFollow2D.xml
+++ b/doc/classes/PathFollow2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PathFollow2D" inherits="Node2D" category="Core" version="3.0-stable">
+<class name="PathFollow2D" inherits="Node2D" category="Core" version="3.1-dev">
<brief_description>
Point sampler for a [Path2D].
</brief_description>
diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml
index 18e45f7c3f..c67b9e2f07 100644
--- a/doc/classes/Performance.xml
+++ b/doc/classes/Performance.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Performance" inherits="Object" category="Core" version="3.0-stable">
+<class name="Performance" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
Exposes performance related data.
</brief_description>
diff --git a/doc/classes/Physics2DDirectBodyState.xml b/doc/classes/Physics2DDirectBodyState.xml
index 190325396d..d1634974f4 100644
--- a/doc/classes/Physics2DDirectBodyState.xml
+++ b/doc/classes/Physics2DDirectBodyState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Physics2DDirectBodyState" inherits="Object" category="Core" version="3.0-stable">
+<class name="Physics2DDirectBodyState" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
Direct access object to a physics body in the [Physics2DServer].
</brief_description>
diff --git a/doc/classes/Physics2DDirectBodyStateSW.xml b/doc/classes/Physics2DDirectBodyStateSW.xml
index f6bcaef7be..7d04e483ff 100644
--- a/doc/classes/Physics2DDirectBodyStateSW.xml
+++ b/doc/classes/Physics2DDirectBodyStateSW.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Physics2DDirectBodyStateSW" inherits="Physics2DDirectBodyState" category="Core" version="3.0-stable">
+<class name="Physics2DDirectBodyStateSW" inherits="Physics2DDirectBodyState" category="Core" version="3.1-dev">
<brief_description>
Software implementation of [Physics2DDirectBodyState].
</brief_description>
diff --git a/doc/classes/Physics2DDirectSpaceState.xml b/doc/classes/Physics2DDirectSpaceState.xml
index 5e0908f497..b3a33e9216 100644
--- a/doc/classes/Physics2DDirectSpaceState.xml
+++ b/doc/classes/Physics2DDirectSpaceState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Physics2DDirectSpaceState" inherits="Object" category="Core" version="3.0-stable">
+<class name="Physics2DDirectSpaceState" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
Direct access object to a space in the [Physics2DServer].
</brief_description>
diff --git a/doc/classes/Physics2DServer.xml b/doc/classes/Physics2DServer.xml
index c0316aa1bc..644731516f 100644
--- a/doc/classes/Physics2DServer.xml
+++ b/doc/classes/Physics2DServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Physics2DServer" inherits="Object" category="Core" version="3.0-stable">
+<class name="Physics2DServer" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
Physics 2D Server.
</brief_description>
diff --git a/doc/classes/Physics2DServerSW.xml b/doc/classes/Physics2DServerSW.xml
index 6942c5e3af..25ca5dd4d2 100644
--- a/doc/classes/Physics2DServerSW.xml
+++ b/doc/classes/Physics2DServerSW.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Physics2DServerSW" inherits="Physics2DServer" category="Core" version="3.0-stable">
+<class name="Physics2DServerSW" inherits="Physics2DServer" category="Core" version="3.1-dev">
<brief_description>
Software implementation of [Physics2DServer].
</brief_description>
diff --git a/doc/classes/Physics2DShapeQueryParameters.xml b/doc/classes/Physics2DShapeQueryParameters.xml
index 7cd35f4167..209623c62a 100644
--- a/doc/classes/Physics2DShapeQueryParameters.xml
+++ b/doc/classes/Physics2DShapeQueryParameters.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Physics2DShapeQueryParameters" inherits="Reference" category="Core" version="3.0-stable">
+<class name="Physics2DShapeQueryParameters" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
Parameters to be sent to a 2D shape physics query.
</brief_description>
diff --git a/doc/classes/Physics2DShapeQueryResult.xml b/doc/classes/Physics2DShapeQueryResult.xml
index b080da43a2..2e2180ee0f 100644
--- a/doc/classes/Physics2DShapeQueryResult.xml
+++ b/doc/classes/Physics2DShapeQueryResult.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Physics2DShapeQueryResult" inherits="Reference" category="Core" version="3.0-stable">
+<class name="Physics2DShapeQueryResult" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Physics2DTestMotionResult.xml b/doc/classes/Physics2DTestMotionResult.xml
index 8b4260c484..943ef72ffb 100644
--- a/doc/classes/Physics2DTestMotionResult.xml
+++ b/doc/classes/Physics2DTestMotionResult.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Physics2DTestMotionResult" inherits="Reference" category="Core" version="3.0-stable">
+<class name="Physics2DTestMotionResult" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/PhysicsBody.xml b/doc/classes/PhysicsBody.xml
index 27db2c8f07..b765bb1f1f 100644
--- a/doc/classes/PhysicsBody.xml
+++ b/doc/classes/PhysicsBody.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsBody" inherits="CollisionObject" category="Core" version="3.0-stable">
+<class name="PhysicsBody" inherits="CollisionObject" category="Core" version="3.1-dev">
<brief_description>
Base class for all objects affected by physics in 3D space.
</brief_description>
diff --git a/doc/classes/PhysicsBody2D.xml b/doc/classes/PhysicsBody2D.xml
index 34e86fa63a..80d72512fe 100644
--- a/doc/classes/PhysicsBody2D.xml
+++ b/doc/classes/PhysicsBody2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsBody2D" inherits="CollisionObject2D" category="Core" version="3.0-stable">
+<class name="PhysicsBody2D" inherits="CollisionObject2D" category="Core" version="3.1-dev">
<brief_description>
Base class for all objects affected by physics in 2D space.
</brief_description>
diff --git a/doc/classes/PhysicsDirectBodyState.xml b/doc/classes/PhysicsDirectBodyState.xml
index 1f9c492571..fa0e529a73 100644
--- a/doc/classes/PhysicsDirectBodyState.xml
+++ b/doc/classes/PhysicsDirectBodyState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsDirectBodyState" inherits="Object" category="Core" version="3.0-stable">
+<class name="PhysicsDirectBodyState" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/PhysicsDirectSpaceState.xml b/doc/classes/PhysicsDirectSpaceState.xml
index 6c8d084f26..e33718edf0 100644
--- a/doc/classes/PhysicsDirectSpaceState.xml
+++ b/doc/classes/PhysicsDirectSpaceState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsDirectSpaceState" inherits="Object" category="Core" version="3.0-stable">
+<class name="PhysicsDirectSpaceState" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
Direct access object to a space in the [PhysicsServer].
</brief_description>
diff --git a/doc/classes/PhysicsServer.xml b/doc/classes/PhysicsServer.xml
index 9920d5364b..02172a310d 100644
--- a/doc/classes/PhysicsServer.xml
+++ b/doc/classes/PhysicsServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsServer" inherits="Object" category="Core" version="3.0-stable">
+<class name="PhysicsServer" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
Server interface for low level physics access.
</brief_description>
diff --git a/doc/classes/PhysicsShapeQueryParameters.xml b/doc/classes/PhysicsShapeQueryParameters.xml
index 3f68136285..6bd37dda32 100644
--- a/doc/classes/PhysicsShapeQueryParameters.xml
+++ b/doc/classes/PhysicsShapeQueryParameters.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsShapeQueryParameters" inherits="Reference" category="Core" version="3.0-stable">
+<class name="PhysicsShapeQueryParameters" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/PhysicsShapeQueryResult.xml b/doc/classes/PhysicsShapeQueryResult.xml
index 109074c35c..bb78071e85 100644
--- a/doc/classes/PhysicsShapeQueryResult.xml
+++ b/doc/classes/PhysicsShapeQueryResult.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicsShapeQueryResult" inherits="Reference" category="Core" version="3.0-stable">
+<class name="PhysicsShapeQueryResult" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
Result of a shape query in Physics2DServer.
</brief_description>
diff --git a/doc/classes/PinJoint.xml b/doc/classes/PinJoint.xml
index a8cc0ad9b3..7c94347008 100644
--- a/doc/classes/PinJoint.xml
+++ b/doc/classes/PinJoint.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PinJoint" inherits="Joint" category="Core" version="3.0-stable">
+<class name="PinJoint" inherits="Joint" category="Core" version="3.1-dev">
<brief_description>
Pin Joint for 3D Shapes.
</brief_description>
diff --git a/doc/classes/PinJoint2D.xml b/doc/classes/PinJoint2D.xml
index 08fb849523..0982ffacae 100644
--- a/doc/classes/PinJoint2D.xml
+++ b/doc/classes/PinJoint2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PinJoint2D" inherits="Joint2D" category="Core" version="3.0-stable">
+<class name="PinJoint2D" inherits="Joint2D" category="Core" version="3.1-dev">
<brief_description>
Pin Joint for 2D Shapes.
</brief_description>
diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml
index b1984ec03f..f478b2d384 100644
--- a/doc/classes/Plane.xml
+++ b/doc/classes/Plane.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Plane" category="Built-In Types" version="3.0-stable">
+<class name="Plane" category="Built-In Types" version="3.1-dev">
<brief_description>
Plane in hessian form.
</brief_description>
diff --git a/doc/classes/PlaneMesh.xml b/doc/classes/PlaneMesh.xml
index cd97d5c6eb..60bc1f6613 100644
--- a/doc/classes/PlaneMesh.xml
+++ b/doc/classes/PlaneMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PlaneMesh" inherits="PrimitiveMesh" category="Core" version="3.0-stable">
+<class name="PlaneMesh" inherits="PrimitiveMesh" category="Core" version="3.1-dev">
<brief_description>
Class representing a planar [PrimitiveMesh].
</brief_description>
diff --git a/doc/classes/PlaneShape.xml b/doc/classes/PlaneShape.xml
index 5912a2a91b..e0c1fdf25b 100644
--- a/doc/classes/PlaneShape.xml
+++ b/doc/classes/PlaneShape.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PlaneShape" inherits="Shape" category="Core" version="3.0-stable">
+<class name="PlaneShape" inherits="Shape" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml
index 8c68c06e65..a538cd2f05 100644
--- a/doc/classes/Polygon2D.xml
+++ b/doc/classes/Polygon2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Polygon2D" inherits="Node2D" category="Core" version="3.0-stable">
+<class name="Polygon2D" inherits="Node2D" category="Core" version="3.1-dev">
<brief_description>
A 2D polygon.
</brief_description>
diff --git a/doc/classes/PolygonPathFinder.xml b/doc/classes/PolygonPathFinder.xml
index cea33fa5c8..3c57b4ca18 100644
--- a/doc/classes/PolygonPathFinder.xml
+++ b/doc/classes/PolygonPathFinder.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PolygonPathFinder" inherits="Resource" category="Core" version="3.0-stable">
+<class name="PolygonPathFinder" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/PoolByteArray.xml b/doc/classes/PoolByteArray.xml
index 5e80072d46..7982c91ea9 100644
--- a/doc/classes/PoolByteArray.xml
+++ b/doc/classes/PoolByteArray.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PoolByteArray" category="Built-In Types" version="3.0-stable">
+<class name="PoolByteArray" category="Built-In Types" version="3.1-dev">
<brief_description>
Raw byte array.
</brief_description>
diff --git a/doc/classes/PoolColorArray.xml b/doc/classes/PoolColorArray.xml
index 47fb38f440..c61f39b238 100644
--- a/doc/classes/PoolColorArray.xml
+++ b/doc/classes/PoolColorArray.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PoolColorArray" category="Built-In Types" version="3.0-stable">
+<class name="PoolColorArray" category="Built-In Types" version="3.1-dev">
<brief_description>
Array of Colors
</brief_description>
diff --git a/doc/classes/PoolIntArray.xml b/doc/classes/PoolIntArray.xml
index c24d565db8..7b9bb96730 100644
--- a/doc/classes/PoolIntArray.xml
+++ b/doc/classes/PoolIntArray.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PoolIntArray" category="Built-In Types" version="3.0-stable">
+<class name="PoolIntArray" category="Built-In Types" version="3.1-dev">
<brief_description>
Integer Array.
</brief_description>
diff --git a/doc/classes/PoolRealArray.xml b/doc/classes/PoolRealArray.xml
index 49f4ed85d2..b0f971ae3e 100644
--- a/doc/classes/PoolRealArray.xml
+++ b/doc/classes/PoolRealArray.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PoolRealArray" category="Built-In Types" version="3.0-stable">
+<class name="PoolRealArray" category="Built-In Types" version="3.1-dev">
<brief_description>
Real Array.
</brief_description>
diff --git a/doc/classes/PoolStringArray.xml b/doc/classes/PoolStringArray.xml
index bc273e2fb6..9db0af34be 100644
--- a/doc/classes/PoolStringArray.xml
+++ b/doc/classes/PoolStringArray.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PoolStringArray" category="Built-In Types" version="3.0-stable">
+<class name="PoolStringArray" category="Built-In Types" version="3.1-dev">
<brief_description>
String Array.
</brief_description>
diff --git a/doc/classes/PoolVector2Array.xml b/doc/classes/PoolVector2Array.xml
index d08cfbba33..5c8599f220 100644
--- a/doc/classes/PoolVector2Array.xml
+++ b/doc/classes/PoolVector2Array.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PoolVector2Array" category="Built-In Types" version="3.0-stable">
+<class name="PoolVector2Array" category="Built-In Types" version="3.1-dev">
<brief_description>
An Array of Vector2.
</brief_description>
diff --git a/doc/classes/PoolVector3Array.xml b/doc/classes/PoolVector3Array.xml
index 99d5929ded..944bb767e0 100644
--- a/doc/classes/PoolVector3Array.xml
+++ b/doc/classes/PoolVector3Array.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PoolVector3Array" category="Built-In Types" version="3.0-stable">
+<class name="PoolVector3Array" category="Built-In Types" version="3.1-dev">
<brief_description>
An Array of Vector3.
</brief_description>
diff --git a/doc/classes/Popup.xml b/doc/classes/Popup.xml
index 0e6d6c844d..b6ee43254e 100644
--- a/doc/classes/Popup.xml
+++ b/doc/classes/Popup.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Popup" inherits="Control" category="Core" version="3.0-stable">
+<class name="Popup" inherits="Control" category="Core" version="3.1-dev">
<brief_description>
Base container control for popups and dialogs.
</brief_description>
diff --git a/doc/classes/PopupDialog.xml b/doc/classes/PopupDialog.xml
index b47674b588..eac361f404 100644
--- a/doc/classes/PopupDialog.xml
+++ b/doc/classes/PopupDialog.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PopupDialog" inherits="Popup" category="Core" version="3.0-stable">
+<class name="PopupDialog" inherits="Popup" category="Core" version="3.1-dev">
<brief_description>
Base class for Popup Dialogs.
</brief_description>
diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml
index 2ffdc07e1f..62911c1cf7 100644
--- a/doc/classes/PopupMenu.xml
+++ b/doc/classes/PopupMenu.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PopupMenu" inherits="Popup" category="Core" version="3.0-stable">
+<class name="PopupMenu" inherits="Popup" category="Core" version="3.1-dev">
<brief_description>
PopupMenu displays a list of options.
</brief_description>
diff --git a/doc/classes/PopupPanel.xml b/doc/classes/PopupPanel.xml
index 0de5319f59..5e8e24d36f 100644
--- a/doc/classes/PopupPanel.xml
+++ b/doc/classes/PopupPanel.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PopupPanel" inherits="Popup" category="Core" version="3.0-stable">
+<class name="PopupPanel" inherits="Popup" category="Core" version="3.1-dev">
<brief_description>
Class for displaying popups with a panel background.
</brief_description>
diff --git a/doc/classes/Position2D.xml b/doc/classes/Position2D.xml
index d06d9220a7..3e29000c5b 100644
--- a/doc/classes/Position2D.xml
+++ b/doc/classes/Position2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Position2D" inherits="Node2D" category="Core" version="3.0-stable">
+<class name="Position2D" inherits="Node2D" category="Core" version="3.1-dev">
<brief_description>
Generic 2D Position hint for editing.
</brief_description>
diff --git a/doc/classes/Position3D.xml b/doc/classes/Position3D.xml
index 5f3aa004dc..2719cdb7f3 100644
--- a/doc/classes/Position3D.xml
+++ b/doc/classes/Position3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Position3D" inherits="Spatial" category="Core" version="3.0-stable">
+<class name="Position3D" inherits="Spatial" category="Core" version="3.1-dev">
<brief_description>
Generic 3D Position hint for editing
</brief_description>
diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml
index 7f0ee9ce37..8fd8e5da1e 100644
--- a/doc/classes/PrimitiveMesh.xml
+++ b/doc/classes/PrimitiveMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PrimitiveMesh" inherits="Mesh" category="Core" version="3.0-stable">
+<class name="PrimitiveMesh" inherits="Mesh" category="Core" version="3.1-dev">
<brief_description>
Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh.
</brief_description>
diff --git a/doc/classes/PrismMesh.xml b/doc/classes/PrismMesh.xml
index 389acc9320..58f7a0dd09 100644
--- a/doc/classes/PrismMesh.xml
+++ b/doc/classes/PrismMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PrismMesh" inherits="PrimitiveMesh" category="Core" version="3.0-stable">
+<class name="PrismMesh" inherits="PrimitiveMesh" category="Core" version="3.1-dev">
<brief_description>
Class representing a prism-shaped [PrimitiveMesh].
</brief_description>
diff --git a/doc/classes/ProceduralSky.xml b/doc/classes/ProceduralSky.xml
index 9d7e590fa3..75831465ed 100644
--- a/doc/classes/ProceduralSky.xml
+++ b/doc/classes/ProceduralSky.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ProceduralSky" inherits="Sky" category="Core" version="3.0-stable">
+<class name="ProceduralSky" inherits="Sky" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml
index 321f27008d..44eb82f2a4 100644
--- a/doc/classes/ProgressBar.xml
+++ b/doc/classes/ProgressBar.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ProgressBar" inherits="Range" category="Core" version="3.0-stable">
+<class name="ProgressBar" inherits="Range" category="Core" version="3.1-dev">
<brief_description>
General purpose progress bar.
</brief_description>
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index 7d0856127c..83dea5d097 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ProjectSettings" inherits="Object" category="Core" version="3.0-stable">
+<class name="ProjectSettings" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
Contains global variables accessible from everywhere.
</brief_description>
diff --git a/doc/classes/ProximityGroup.xml b/doc/classes/ProximityGroup.xml
index b4a424dfdd..697bb8ff7e 100644
--- a/doc/classes/ProximityGroup.xml
+++ b/doc/classes/ProximityGroup.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ProximityGroup" inherits="Spatial" category="Core" version="3.0-stable">
+<class name="ProximityGroup" inherits="Spatial" category="Core" version="3.1-dev">
<brief_description>
General purpose proximity-detection node.
</brief_description>
diff --git a/doc/classes/ProxyTexture.xml b/doc/classes/ProxyTexture.xml
index 68f03ca4fa..2f50229643 100644
--- a/doc/classes/ProxyTexture.xml
+++ b/doc/classes/ProxyTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ProxyTexture" inherits="Texture" category="Core" version="3.0-stable">
+<class name="ProxyTexture" inherits="Texture" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/QuadMesh.xml b/doc/classes/QuadMesh.xml
index f1b38d379a..a295ffc929 100644
--- a/doc/classes/QuadMesh.xml
+++ b/doc/classes/QuadMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="QuadMesh" inherits="PrimitiveMesh" category="Core" version="3.0-stable">
+<class name="QuadMesh" inherits="PrimitiveMesh" category="Core" version="3.1-dev">
<brief_description>
Class representing a square mesh.
</brief_description>
diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml
index ead73d0267..90301db01f 100644
--- a/doc/classes/Quat.xml
+++ b/doc/classes/Quat.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Quat" category="Built-In Types" version="3.0-stable">
+<class name="Quat" category="Built-In Types" version="3.1-dev">
<brief_description>
Quaternion.
</brief_description>
diff --git a/doc/classes/RID.xml b/doc/classes/RID.xml
index 1510d75679..85702727ce 100644
--- a/doc/classes/RID.xml
+++ b/doc/classes/RID.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RID" category="Built-In Types" version="3.0-stable">
+<class name="RID" category="Built-In Types" version="3.1-dev">
<brief_description>
Handle for a [Resource]'s unique ID.
</brief_description>
diff --git a/doc/classes/Range.xml b/doc/classes/Range.xml
index 8a0c831805..7828445dc4 100644
--- a/doc/classes/Range.xml
+++ b/doc/classes/Range.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Range" inherits="Control" category="Core" version="3.0-stable">
+<class name="Range" inherits="Control" category="Core" version="3.1-dev">
<brief_description>
Abstract base class for range-based controls.
</brief_description>
diff --git a/doc/classes/RayCast.xml b/doc/classes/RayCast.xml
index 09e0f8b643..76574b305f 100644
--- a/doc/classes/RayCast.xml
+++ b/doc/classes/RayCast.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RayCast" inherits="Spatial" category="Core" version="3.0-stable">
+<class name="RayCast" inherits="Spatial" category="Core" version="3.1-dev">
<brief_description>
Query the closest object intersecting a ray.
</brief_description>
diff --git a/doc/classes/RayCast2D.xml b/doc/classes/RayCast2D.xml
index b76c880bb7..7a6ec8ded8 100644
--- a/doc/classes/RayCast2D.xml
+++ b/doc/classes/RayCast2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RayCast2D" inherits="Node2D" category="Core" version="3.0-stable">
+<class name="RayCast2D" inherits="Node2D" category="Core" version="3.1-dev">
<brief_description>
Query the closest object intersecting a ray.
</brief_description>
diff --git a/doc/classes/RayShape.xml b/doc/classes/RayShape.xml
index 6d83ed2903..5d488cb3f5 100644
--- a/doc/classes/RayShape.xml
+++ b/doc/classes/RayShape.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RayShape" inherits="Shape" category="Core" version="3.0-stable">
+<class name="RayShape" inherits="Shape" category="Core" version="3.1-dev">
<brief_description>
Ray shape for 3D collisions.
</brief_description>
diff --git a/doc/classes/RayShape2D.xml b/doc/classes/RayShape2D.xml
index ce004b582b..3137bbd1ad 100644
--- a/doc/classes/RayShape2D.xml
+++ b/doc/classes/RayShape2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RayShape2D" inherits="Shape2D" category="Core" version="3.0-stable">
+<class name="RayShape2D" inherits="Shape2D" category="Core" version="3.1-dev">
<brief_description>
Ray shape for 2D collisions.
</brief_description>
diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml
index 6d953d2615..bafa5a3632 100644
--- a/doc/classes/Rect2.xml
+++ b/doc/classes/Rect2.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Rect2" category="Built-In Types" version="3.0-stable">
+<class name="Rect2" category="Built-In Types" version="3.1-dev">
<brief_description>
2D Axis-aligned bounding box.
</brief_description>
diff --git a/doc/classes/RectangleShape2D.xml b/doc/classes/RectangleShape2D.xml
index 4ecd0aadf4..5e2bdf040a 100644
--- a/doc/classes/RectangleShape2D.xml
+++ b/doc/classes/RectangleShape2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RectangleShape2D" inherits="Shape2D" category="Core" version="3.0-stable">
+<class name="RectangleShape2D" inherits="Shape2D" category="Core" version="3.1-dev">
<brief_description>
Rectangle shape for 2D collisions.
</brief_description>
diff --git a/doc/classes/Reference.xml b/doc/classes/Reference.xml
index ba769db5e7..3f4f499b3e 100644
--- a/doc/classes/Reference.xml
+++ b/doc/classes/Reference.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Reference" inherits="Object" category="Core" version="3.0-stable">
+<class name="Reference" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
Base class for anything that keeps a reference count.
</brief_description>
diff --git a/doc/classes/ReferenceRect.xml b/doc/classes/ReferenceRect.xml
index 2a13eb3312..1946ee8b81 100644
--- a/doc/classes/ReferenceRect.xml
+++ b/doc/classes/ReferenceRect.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ReferenceRect" inherits="Control" category="Core" version="3.0-stable">
+<class name="ReferenceRect" inherits="Control" category="Core" version="3.1-dev">
<brief_description>
Reference frame for GUI.
</brief_description>
diff --git a/doc/classes/ReflectionProbe.xml b/doc/classes/ReflectionProbe.xml
index 5db9f32486..c565fc6a92 100644
--- a/doc/classes/ReflectionProbe.xml
+++ b/doc/classes/ReflectionProbe.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ReflectionProbe" inherits="VisualInstance" category="Core" version="3.0-stable">
+<class name="ReflectionProbe" inherits="VisualInstance" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/RemoteTransform.xml b/doc/classes/RemoteTransform.xml
index e9b8d2b746..16521e27ea 100644
--- a/doc/classes/RemoteTransform.xml
+++ b/doc/classes/RemoteTransform.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RemoteTransform" inherits="Spatial" category="Core" version="3.0-stable">
+<class name="RemoteTransform" inherits="Spatial" category="Core" version="3.1-dev">
<brief_description>
RemoteTransform leads the [Transform] of another [Spatial] derived Node in the scene.
</brief_description>
diff --git a/doc/classes/RemoteTransform2D.xml b/doc/classes/RemoteTransform2D.xml
index c6022fd1ff..a6c61eb2f4 100644
--- a/doc/classes/RemoteTransform2D.xml
+++ b/doc/classes/RemoteTransform2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RemoteTransform2D" inherits="Node2D" category="Core" version="3.0-stable">
+<class name="RemoteTransform2D" inherits="Node2D" category="Core" version="3.1-dev">
<brief_description>
RemoteTransform2D leads the [Transform2D] of another [CanvasItem] derived Node in the scene.
</brief_description>
diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml
index 8113d81fbb..9bba251607 100644
--- a/doc/classes/Resource.xml
+++ b/doc/classes/Resource.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Resource" inherits="Reference" category="Core" version="3.0-stable">
+<class name="Resource" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
Base class for all resources.
</brief_description>
diff --git a/doc/classes/ResourceImporter.xml b/doc/classes/ResourceImporter.xml
index c68bdd613c..91e72ff595 100644
--- a/doc/classes/ResourceImporter.xml
+++ b/doc/classes/ResourceImporter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceImporter" inherits="Reference" category="Core" version="3.0-stable">
+<class name="ResourceImporter" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/ResourceInteractiveLoader.xml b/doc/classes/ResourceInteractiveLoader.xml
index 8a8023c8ec..dba045213e 100644
--- a/doc/classes/ResourceInteractiveLoader.xml
+++ b/doc/classes/ResourceInteractiveLoader.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceInteractiveLoader" inherits="Reference" category="Core" version="3.0-stable">
+<class name="ResourceInteractiveLoader" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
Interactive Resource Loader.
</brief_description>
diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml
index d4f61b7929..baeb7a6bb4 100644
--- a/doc/classes/ResourceLoader.xml
+++ b/doc/classes/ResourceLoader.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceLoader" inherits="Object" category="Core" version="3.0-stable">
+<class name="ResourceLoader" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
Resource Loader.
</brief_description>
diff --git a/doc/classes/ResourcePreloader.xml b/doc/classes/ResourcePreloader.xml
index 868ca62963..6c3c4cd5d0 100644
--- a/doc/classes/ResourcePreloader.xml
+++ b/doc/classes/ResourcePreloader.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourcePreloader" inherits="Node" category="Core" version="3.0-stable">
+<class name="ResourcePreloader" inherits="Node" category="Core" version="3.1-dev">
<brief_description>
Resource Preloader Node.
</brief_description>
diff --git a/doc/classes/ResourceSaver.xml b/doc/classes/ResourceSaver.xml
index f4abe9f770..e44244aabb 100644
--- a/doc/classes/ResourceSaver.xml
+++ b/doc/classes/ResourceSaver.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceSaver" inherits="Object" category="Core" version="3.0-stable">
+<class name="ResourceSaver" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
Resource Saving Interface.
</brief_description>
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index 24ae94d6db..dab8eb1505 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RichTextLabel" inherits="Control" category="Core" version="3.0-stable">
+<class name="RichTextLabel" inherits="Control" category="Core" version="3.1-dev">
<brief_description>
Label that displays rich text.
</brief_description>
diff --git a/doc/classes/RigidBody.xml b/doc/classes/RigidBody.xml
index ad5da50dd6..b3de3b9700 100644
--- a/doc/classes/RigidBody.xml
+++ b/doc/classes/RigidBody.xml
@@ -1,14 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RigidBody" inherits="PhysicsBody" category="Core" version="3.0-stable">
+<class name="RigidBody" inherits="PhysicsBody" category="Core" version="3.1-dev">
<brief_description>
Physics Body whose position is determined through physics simulation in 3D space.
</brief_description>
<description>
This is the node that implements full 3D physics. This means that you do not control a RigidBody directly. Instead you can apply forces to it (gravity, impulses, etc.), and the physics simulation will calculate the resulting movement, collision, bouncing, rotating, etc.
- This node can use custom force integration, for writing complex physics motion behavior per node.
- This node can shift state between regular Rigid body, Kinematic, Character or Static.
- Character mode forbids this node from being rotated.
- As a warning, don't change RigidBody's position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop will yield strange behavior.
+ A RigidBody has 4 behavior [member mode]s: Rigid, Static, Character, and Kinematic.
+ [b]Note:[/b] Don't change a RigidBody's position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop will yield strange behavior. If you need to directly affect the body's state, use [method _integrate_forces], which allows you to directly access the physics state.
+ If you need to override the default physics behavior, you can write a custom force integration. See [member custom_integrator].
</description>
<tutorials>
http://docs.godotengine.org/en/3.0/tutorials/physics/physics_introduction.html
diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml
index 67ae92c664..719ddfffe4 100644
--- a/doc/classes/RigidBody2D.xml
+++ b/doc/classes/RigidBody2D.xml
@@ -1,15 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RigidBody2D" inherits="PhysicsBody2D" category="Core" version="3.0-stable">
+<class name="RigidBody2D" inherits="PhysicsBody2D" category="Core" version="3.1-dev">
<brief_description>
A body that is controlled by the 2D physics engine.
</brief_description>
<description>
This node implements simulated 2D physics. You do not control a RigidBody2D directly. Instead you apply forces to it (gravity, impulses, etc.) and the physics simulation calculates the resulting movement based on its mass, friction, and other physical properties.
- A RigidBody2D has 4 behavior modes (see [member mode]):
- - [b]Rigid[/b]: The body behaves as a physical object. It collides with other bodies and responds to forces applied to it. This is the default mode.
- - [b]Static[/b]: The body behaves like a [StaticBody2D] and does not move.
- - [b]Character[/b]: Similar to [code]Rigid[/code] mode, but the body can not rotate.
- - [b]Kinematic[/b]: The body behaves like a [KinematicBody2D], and must be moved by code.
+ A RigidBody2D has 4 behavior [member mode]s: Rigid, Static, Character, and Kinematic.
[b]Note:[/b] You should not change a RigidBody2D's [code]position[/code] or [code]linear_velocity[/code] every frame or even very often. If you need to directly affect the body's state, use [method _integrate_forces], which allows you to directly access the physics state.
If you need to override the default physics behavior, you can write a custom force integration. See [member custom_integrator].
</description>
diff --git a/doc/classes/SceneState.xml b/doc/classes/SceneState.xml
index 6fec02c392..3ce08c0878 100644
--- a/doc/classes/SceneState.xml
+++ b/doc/classes/SceneState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SceneState" inherits="Reference" category="Core" version="3.0-stable">
+<class name="SceneState" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
A script interface to a scene file's data.
</brief_description>
diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml
index 0fe220ae48..bd6ffbaf80 100644
--- a/doc/classes/SceneTree.xml
+++ b/doc/classes/SceneTree.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SceneTree" inherits="MainLoop" category="Core" version="3.0-stable">
+<class name="SceneTree" inherits="MainLoop" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/SceneTreeTimer.xml b/doc/classes/SceneTreeTimer.xml
index f6b262d225..a5b199d9d7 100644
--- a/doc/classes/SceneTreeTimer.xml
+++ b/doc/classes/SceneTreeTimer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SceneTreeTimer" inherits="Reference" category="Core" version="3.0-stable">
+<class name="SceneTreeTimer" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml
index 787d2c24bf..db85890b2b 100644
--- a/doc/classes/Script.xml
+++ b/doc/classes/Script.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Script" inherits="Resource" category="Core" version="3.0-stable">
+<class name="Script" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
A class stored as a resource.
</brief_description>
diff --git a/doc/classes/ScriptEditor.xml b/doc/classes/ScriptEditor.xml
index 89a8200d66..0b5365f583 100644
--- a/doc/classes/ScriptEditor.xml
+++ b/doc/classes/ScriptEditor.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ScriptEditor" inherits="PanelContainer" category="Core" version="3.0-stable">
+<class name="ScriptEditor" inherits="PanelContainer" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/ScrollBar.xml b/doc/classes/ScrollBar.xml
index 53b20e55d5..04b3ccfca0 100644
--- a/doc/classes/ScrollBar.xml
+++ b/doc/classes/ScrollBar.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ScrollBar" inherits="Range" category="Core" version="3.0-stable">
+<class name="ScrollBar" inherits="Range" category="Core" version="3.1-dev">
<brief_description>
Base class for scroll bars.
</brief_description>
diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml
index a1e6441d1c..3a613f8bcd 100644
--- a/doc/classes/ScrollContainer.xml
+++ b/doc/classes/ScrollContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ScrollContainer" inherits="Container" category="Core" version="3.0-stable">
+<class name="ScrollContainer" inherits="Container" category="Core" version="3.1-dev">
<brief_description>
A helper node for displaying scrollable elements (e.g. lists).
</brief_description>
diff --git a/doc/classes/SegmentShape2D.xml b/doc/classes/SegmentShape2D.xml
index 56d9fe6d31..69dd4f7ca2 100644
--- a/doc/classes/SegmentShape2D.xml
+++ b/doc/classes/SegmentShape2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SegmentShape2D" inherits="Shape2D" category="Core" version="3.0-stable">
+<class name="SegmentShape2D" inherits="Shape2D" category="Core" version="3.1-dev">
<brief_description>
Segment shape for 2D collisions.
</brief_description>
diff --git a/doc/classes/Semaphore.xml b/doc/classes/Semaphore.xml
index 3d6f894f52..353c621818 100644
--- a/doc/classes/Semaphore.xml
+++ b/doc/classes/Semaphore.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Semaphore" inherits="Reference" category="Core" version="3.0-stable">
+<class name="Semaphore" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
A synchronization Semaphore.
</brief_description>
diff --git a/doc/classes/Separator.xml b/doc/classes/Separator.xml
index 20cf870d75..725ca8d2d0 100644
--- a/doc/classes/Separator.xml
+++ b/doc/classes/Separator.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Separator" inherits="Control" category="Core" version="3.0-stable">
+<class name="Separator" inherits="Control" category="Core" version="3.1-dev">
<brief_description>
Base class for separators.
</brief_description>
diff --git a/doc/classes/Shader.xml b/doc/classes/Shader.xml
index 28f06f0caa..f9f26593bf 100644
--- a/doc/classes/Shader.xml
+++ b/doc/classes/Shader.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Shader" inherits="Resource" category="Core" version="3.0-stable">
+<class name="Shader" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
To be changed, ignore.
</brief_description>
diff --git a/doc/classes/ShaderMaterial.xml b/doc/classes/ShaderMaterial.xml
index 893746ec31..57fb3ed1aa 100644
--- a/doc/classes/ShaderMaterial.xml
+++ b/doc/classes/ShaderMaterial.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ShaderMaterial" inherits="Material" category="Core" version="3.0-stable">
+<class name="ShaderMaterial" inherits="Material" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Shape.xml b/doc/classes/Shape.xml
index 986d567c12..240da1a43d 100644
--- a/doc/classes/Shape.xml
+++ b/doc/classes/Shape.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Shape" inherits="Resource" category="Core" version="3.0-stable">
+<class name="Shape" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
Base class for all 3D shape resources.
</brief_description>
diff --git a/doc/classes/Shape2D.xml b/doc/classes/Shape2D.xml
index d2366faa7f..0f3fc44ecb 100644
--- a/doc/classes/Shape2D.xml
+++ b/doc/classes/Shape2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Shape2D" inherits="Resource" category="Core" version="3.0-stable">
+<class name="Shape2D" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
Base class for all 2D Shapes.
</brief_description>
diff --git a/doc/classes/ShortCut.xml b/doc/classes/ShortCut.xml
index f0908cfa44..2cb832c045 100644
--- a/doc/classes/ShortCut.xml
+++ b/doc/classes/ShortCut.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ShortCut" inherits="Resource" category="Core" version="3.0-stable">
+<class name="ShortCut" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
A shortcut for binding input.
</brief_description>
diff --git a/doc/classes/Skeleton.xml b/doc/classes/Skeleton.xml
index 33022cca14..760b2e92a9 100644
--- a/doc/classes/Skeleton.xml
+++ b/doc/classes/Skeleton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Skeleton" inherits="Spatial" category="Core" version="3.0-stable">
+<class name="Skeleton" inherits="Spatial" category="Core" version="3.1-dev">
<brief_description>
Skeleton for characters and animated objects.
</brief_description>
diff --git a/doc/classes/Sky.xml b/doc/classes/Sky.xml
index 3cd3957f40..4f3593dfcb 100644
--- a/doc/classes/Sky.xml
+++ b/doc/classes/Sky.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Sky" inherits="Resource" category="Core" version="3.0-stable">
+<class name="Sky" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
The base class for [PanoramaSky] and [ProceduralSky].
</brief_description>
diff --git a/doc/classes/Slider.xml b/doc/classes/Slider.xml
index 84c51572c3..aa19a27735 100644
--- a/doc/classes/Slider.xml
+++ b/doc/classes/Slider.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Slider" inherits="Range" category="Core" version="3.0-stable">
+<class name="Slider" inherits="Range" category="Core" version="3.1-dev">
<brief_description>
Base class for GUI Sliders.
</brief_description>
diff --git a/doc/classes/SliderJoint.xml b/doc/classes/SliderJoint.xml
index 4507668292..d8e4970363 100644
--- a/doc/classes/SliderJoint.xml
+++ b/doc/classes/SliderJoint.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SliderJoint" inherits="Joint" category="Core" version="3.0-stable">
+<class name="SliderJoint" inherits="Joint" category="Core" version="3.1-dev">
<brief_description>
Piston kind of slider between two bodies in 3D.
</brief_description>
diff --git a/doc/classes/Spatial.xml b/doc/classes/Spatial.xml
index 26f6f4003b..b142e5c96c 100644
--- a/doc/classes/Spatial.xml
+++ b/doc/classes/Spatial.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Spatial" inherits="Node" category="Core" version="3.0-stable">
+<class name="Spatial" inherits="Node" category="Core" version="3.1-dev">
<brief_description>
Most basic 3D game object, parent of all 3D related nodes.
</brief_description>
diff --git a/doc/classes/SpatialGizmo.xml b/doc/classes/SpatialGizmo.xml
index cf6f0efd46..fde79e19dd 100644
--- a/doc/classes/SpatialGizmo.xml
+++ b/doc/classes/SpatialGizmo.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SpatialGizmo" inherits="Reference" category="Core" version="3.0-stable">
+<class name="SpatialGizmo" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/SpatialMaterial.xml b/doc/classes/SpatialMaterial.xml
index eef18c9892..ce67ddc220 100644
--- a/doc/classes/SpatialMaterial.xml
+++ b/doc/classes/SpatialMaterial.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SpatialMaterial" inherits="Material" category="Core" version="3.0-stable">
+<class name="SpatialMaterial" inherits="Material" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/SpatialVelocityTracker.xml b/doc/classes/SpatialVelocityTracker.xml
index 276b82899b..8d666c9f84 100644
--- a/doc/classes/SpatialVelocityTracker.xml
+++ b/doc/classes/SpatialVelocityTracker.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SpatialVelocityTracker" inherits="Reference" category="Core" version="3.0-stable">
+<class name="SpatialVelocityTracker" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/SphereMesh.xml b/doc/classes/SphereMesh.xml
index 9f2d613267..72af6137d0 100644
--- a/doc/classes/SphereMesh.xml
+++ b/doc/classes/SphereMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SphereMesh" inherits="PrimitiveMesh" category="Core" version="3.0-stable">
+<class name="SphereMesh" inherits="PrimitiveMesh" category="Core" version="3.1-dev">
<brief_description>
Class representing a spherical [PrimitiveMesh].
</brief_description>
diff --git a/doc/classes/SphereShape.xml b/doc/classes/SphereShape.xml
index a8df924bde..cb2461942d 100644
--- a/doc/classes/SphereShape.xml
+++ b/doc/classes/SphereShape.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SphereShape" inherits="Shape" category="Core" version="3.0-stable">
+<class name="SphereShape" inherits="Shape" category="Core" version="3.1-dev">
<brief_description>
Sphere shape for 3D collisions.
</brief_description>
diff --git a/doc/classes/SpinBox.xml b/doc/classes/SpinBox.xml
index 1762a66302..76dcfa97f6 100644
--- a/doc/classes/SpinBox.xml
+++ b/doc/classes/SpinBox.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SpinBox" inherits="Range" category="Core" version="3.0-stable">
+<class name="SpinBox" inherits="Range" category="Core" version="3.1-dev">
<brief_description>
Numerical input text field.
</brief_description>
diff --git a/doc/classes/SplitContainer.xml b/doc/classes/SplitContainer.xml
index 3a7f22693a..54cfaaff63 100644
--- a/doc/classes/SplitContainer.xml
+++ b/doc/classes/SplitContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SplitContainer" inherits="Container" category="Core" version="3.0-stable">
+<class name="SplitContainer" inherits="Container" category="Core" version="3.1-dev">
<brief_description>
Container for splitting and adjusting.
</brief_description>
diff --git a/doc/classes/SpotLight.xml b/doc/classes/SpotLight.xml
index 00991e75bc..88e3240188 100644
--- a/doc/classes/SpotLight.xml
+++ b/doc/classes/SpotLight.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SpotLight" inherits="Light" category="Core" version="3.0-stable">
+<class name="SpotLight" inherits="Light" category="Core" version="3.1-dev">
<brief_description>
Spotlight [Light], such as a reflector spotlight or a lantern.
</brief_description>
diff --git a/doc/classes/Sprite.xml b/doc/classes/Sprite.xml
index c1afb35e09..d60e1dbe52 100644
--- a/doc/classes/Sprite.xml
+++ b/doc/classes/Sprite.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Sprite" inherits="Node2D" category="Core" version="3.0-stable">
+<class name="Sprite" inherits="Node2D" category="Core" version="3.1-dev">
<brief_description>
General purpose Sprite node.
</brief_description>
diff --git a/doc/classes/Sprite3D.xml b/doc/classes/Sprite3D.xml
index ca0bd212aa..122f0b85f7 100644
--- a/doc/classes/Sprite3D.xml
+++ b/doc/classes/Sprite3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Sprite3D" inherits="SpriteBase3D" category="Core" version="3.0-stable">
+<class name="Sprite3D" inherits="SpriteBase3D" category="Core" version="3.1-dev">
<brief_description>
2D Sprite node in 3D world.
</brief_description>
diff --git a/doc/classes/SpriteBase3D.xml b/doc/classes/SpriteBase3D.xml
index d91314e236..6dba815255 100644
--- a/doc/classes/SpriteBase3D.xml
+++ b/doc/classes/SpriteBase3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SpriteBase3D" inherits="GeometryInstance" category="Core" version="3.0-stable">
+<class name="SpriteBase3D" inherits="GeometryInstance" category="Core" version="3.1-dev">
<brief_description>
2D Sprite node in 3D environment.
</brief_description>
diff --git a/doc/classes/SpriteFrames.xml b/doc/classes/SpriteFrames.xml
index f76212b0d2..e7199d7163 100644
--- a/doc/classes/SpriteFrames.xml
+++ b/doc/classes/SpriteFrames.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SpriteFrames" inherits="Resource" category="Core" version="3.0-stable">
+<class name="SpriteFrames" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
Sprite frame library for AnimatedSprite.
</brief_description>
diff --git a/doc/classes/StaticBody.xml b/doc/classes/StaticBody.xml
index e5b9d1c0d9..df56330c08 100644
--- a/doc/classes/StaticBody.xml
+++ b/doc/classes/StaticBody.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StaticBody" inherits="PhysicsBody" category="Core" version="3.0-stable">
+<class name="StaticBody" inherits="PhysicsBody" category="Core" version="3.1-dev">
<brief_description>
Static body for 3D Physics.
</brief_description>
diff --git a/doc/classes/StaticBody2D.xml b/doc/classes/StaticBody2D.xml
index d9e750f4f6..ca12699061 100644
--- a/doc/classes/StaticBody2D.xml
+++ b/doc/classes/StaticBody2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StaticBody2D" inherits="PhysicsBody2D" category="Core" version="3.0-stable">
+<class name="StaticBody2D" inherits="PhysicsBody2D" category="Core" version="3.1-dev">
<brief_description>
Static body for 2D Physics.
</brief_description>
diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml
index 49aa26a601..4ab83f8d8a 100644
--- a/doc/classes/StreamPeer.xml
+++ b/doc/classes/StreamPeer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StreamPeer" inherits="Reference" category="Core" version="3.0-stable">
+<class name="StreamPeer" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
Abstraction and base class for stream-based protocols.
</brief_description>
diff --git a/doc/classes/StreamPeerBuffer.xml b/doc/classes/StreamPeerBuffer.xml
index 2c95a8a3cf..a3c118ec60 100644
--- a/doc/classes/StreamPeerBuffer.xml
+++ b/doc/classes/StreamPeerBuffer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StreamPeerBuffer" inherits="StreamPeer" category="Core" version="3.0-stable">
+<class name="StreamPeerBuffer" inherits="StreamPeer" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/StreamPeerSSL.xml b/doc/classes/StreamPeerSSL.xml
index 62e5240c7f..32459efd47 100644
--- a/doc/classes/StreamPeerSSL.xml
+++ b/doc/classes/StreamPeerSSL.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StreamPeerSSL" inherits="StreamPeer" category="Core" version="3.0-stable">
+<class name="StreamPeerSSL" inherits="StreamPeer" category="Core" version="3.1-dev">
<brief_description>
SSL Stream peer.
</brief_description>
diff --git a/doc/classes/StreamPeerTCP.xml b/doc/classes/StreamPeerTCP.xml
index 73e9b97367..ef856551bb 100644
--- a/doc/classes/StreamPeerTCP.xml
+++ b/doc/classes/StreamPeerTCP.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StreamPeerTCP" inherits="StreamPeer" category="Core" version="3.0-stable">
+<class name="StreamPeerTCP" inherits="StreamPeer" category="Core" version="3.1-dev">
<brief_description>
TCP Stream peer.
</brief_description>
@@ -29,16 +29,6 @@
Disconnect from host.
</description>
</method>
- <method name="set_no_delay">
- <return type="void">
- </return>
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Disable Nagle algorithm to improve latency for small packets.
- Note that for applications that send large packets, or need to transfer a lot of data, this can reduce total bandwidth.
- </description>
- </method>
<method name="get_connected_host" qualifiers="const">
<return type="String">
</return>
@@ -66,6 +56,16 @@
<description>
</description>
</method>
+ <method name="set_no_delay">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ Disable Nagle algorithm to improve latency for small packets.
+ Note that for applications that send large packets, or need to transfer a lot of data, this can reduce total bandwidth.
+ </description>
+ </method>
</methods>
<constants>
<constant name="STATUS_NONE" value="0" enum="Status">
diff --git a/doc/classes/StreamTexture.xml b/doc/classes/StreamTexture.xml
index c37b5d6fe4..7ed95ef01c 100644
--- a/doc/classes/StreamTexture.xml
+++ b/doc/classes/StreamTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StreamTexture" inherits="Texture" category="Core" version="3.0-stable">
+<class name="StreamTexture" inherits="Texture" category="Core" version="3.1-dev">
<brief_description>
A .stex texture.
</brief_description>
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index bad4ada144..01d8dc32e6 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="String" category="Built-In Types" version="3.0-stable">
+<class name="String" category="Built-In Types" version="3.1-dev">
<brief_description>
Built-in string class.
</brief_description>
diff --git a/doc/classes/StyleBox.xml b/doc/classes/StyleBox.xml
index a816b6a030..1e68d83237 100644
--- a/doc/classes/StyleBox.xml
+++ b/doc/classes/StyleBox.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StyleBox" inherits="Resource" category="Core" version="3.0-stable">
+<class name="StyleBox" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
Base class for drawing stylized boxes for the UI.
</brief_description>
diff --git a/doc/classes/StyleBoxEmpty.xml b/doc/classes/StyleBoxEmpty.xml
index cd0bd9bf9d..b5000da265 100644
--- a/doc/classes/StyleBoxEmpty.xml
+++ b/doc/classes/StyleBoxEmpty.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StyleBoxEmpty" inherits="StyleBox" category="Core" version="3.0-stable">
+<class name="StyleBoxEmpty" inherits="StyleBox" category="Core" version="3.1-dev">
<brief_description>
Empty stylebox (does not display anything).
</brief_description>
diff --git a/doc/classes/StyleBoxFlat.xml b/doc/classes/StyleBoxFlat.xml
index 2f26032c45..a64ca31ff0 100644
--- a/doc/classes/StyleBoxFlat.xml
+++ b/doc/classes/StyleBoxFlat.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StyleBoxFlat" inherits="StyleBox" category="Core" version="3.0-stable">
+<class name="StyleBoxFlat" inherits="StyleBox" category="Core" version="3.1-dev">
<brief_description>
Customizable Stylebox with a given set of parameters. (no texture required)
</brief_description>
diff --git a/doc/classes/StyleBoxLine.xml b/doc/classes/StyleBoxLine.xml
index ddabe9aede..9fa2790a4b 100644
--- a/doc/classes/StyleBoxLine.xml
+++ b/doc/classes/StyleBoxLine.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StyleBoxLine" inherits="StyleBox" category="Core" version="3.0-stable">
+<class name="StyleBoxLine" inherits="StyleBox" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/StyleBoxTexture.xml b/doc/classes/StyleBoxTexture.xml
index 8bac0fc77e..6245400943 100644
--- a/doc/classes/StyleBoxTexture.xml
+++ b/doc/classes/StyleBoxTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StyleBoxTexture" inherits="StyleBox" category="Core" version="3.0-stable">
+<class name="StyleBoxTexture" inherits="StyleBox" category="Core" version="3.1-dev">
<brief_description>
Texture Based 3x3 scale style.
</brief_description>
diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml
index 64978a8bef..71cfc9bb9a 100644
--- a/doc/classes/SurfaceTool.xml
+++ b/doc/classes/SurfaceTool.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SurfaceTool" inherits="Reference" category="Core" version="3.0-stable">
+<class name="SurfaceTool" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
Helper tool to create geometry.
</brief_description>
diff --git a/doc/classes/TCP_Server.xml b/doc/classes/TCP_Server.xml
index b3db65de59..cac81f8e05 100644
--- a/doc/classes/TCP_Server.xml
+++ b/doc/classes/TCP_Server.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TCP_Server" inherits="Reference" category="Core" version="3.0-stable">
+<class name="TCP_Server" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
TCP Server.
</brief_description>
diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml
index 9806c03349..eb3b270938 100644
--- a/doc/classes/TabContainer.xml
+++ b/doc/classes/TabContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TabContainer" inherits="Control" category="Core" version="3.0-stable">
+<class name="TabContainer" inherits="Control" category="Core" version="3.1-dev">
<brief_description>
Tabbed Container.
</brief_description>
diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml
index e4df4d0a31..7c3e28ec3c 100644
--- a/doc/classes/Tabs.xml
+++ b/doc/classes/Tabs.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Tabs" inherits="Control" category="Core" version="3.0-stable">
+<class name="Tabs" inherits="Control" category="Core" version="3.1-dev">
<brief_description>
Tabs Control.
</brief_description>
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index f84ebede1c..c39baa8a8c 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TextEdit" inherits="Control" category="Core" version="3.0-stable">
+<class name="TextEdit" inherits="Control" category="Core" version="3.1-dev">
<brief_description>
Multiline text editing control.
</brief_description>
diff --git a/doc/classes/Texture.xml b/doc/classes/Texture.xml
index f21b41f939..997324992a 100644
--- a/doc/classes/Texture.xml
+++ b/doc/classes/Texture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Texture" inherits="Resource" category="Core" version="3.0-stable">
+<class name="Texture" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
Texture for 2D and 3D.
</brief_description>
diff --git a/doc/classes/TextureButton.xml b/doc/classes/TextureButton.xml
index 3bda04fe58..1f9c6acb47 100644
--- a/doc/classes/TextureButton.xml
+++ b/doc/classes/TextureButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TextureButton" inherits="BaseButton" category="Core" version="3.0-stable">
+<class name="TextureButton" inherits="BaseButton" category="Core" version="3.1-dev">
<brief_description>
Texture-based button. Supports Pressed, Hover, Disabled and Focused states.
</brief_description>
diff --git a/doc/classes/TextureProgress.xml b/doc/classes/TextureProgress.xml
index 2456653786..3c4ed13746 100644
--- a/doc/classes/TextureProgress.xml
+++ b/doc/classes/TextureProgress.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TextureProgress" inherits="Range" category="Core" version="3.0-stable">
+<class name="TextureProgress" inherits="Range" category="Core" version="3.1-dev">
<brief_description>
Texture-based progress bar. Useful for loading screens and life or stamina bars.
</brief_description>
diff --git a/doc/classes/TextureRect.xml b/doc/classes/TextureRect.xml
index 8b0fc09a6d..8d18adcc36 100644
--- a/doc/classes/TextureRect.xml
+++ b/doc/classes/TextureRect.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TextureRect" inherits="Control" category="Core" version="3.0-stable">
+<class name="TextureRect" inherits="Control" category="Core" version="3.1-dev">
<brief_description>
Draws a sprite or a texture inside a User Interface. The texture can tile or not.
</brief_description>
diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml
index 037f8cbd48..4134936764 100644
--- a/doc/classes/Theme.xml
+++ b/doc/classes/Theme.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Theme" inherits="Resource" category="Core" version="3.0-stable">
+<class name="Theme" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
Theme for controls.
</brief_description>
diff --git a/doc/classes/Thread.xml b/doc/classes/Thread.xml
index c3d1d1b24f..c5aac8f1ce 100644
--- a/doc/classes/Thread.xml
+++ b/doc/classes/Thread.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Thread" inherits="Reference" category="Core" version="3.0-stable">
+<class name="Thread" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
A unit of execution in a process.
</brief_description>
diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml
index 058a92d99c..0a5fc1951b 100644
--- a/doc/classes/TileMap.xml
+++ b/doc/classes/TileMap.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TileMap" inherits="Node2D" category="Core" version="3.0-stable">
+<class name="TileMap" inherits="Node2D" category="Core" version="3.1-dev">
<brief_description>
Node for 2D tile-based maps.
</brief_description>
diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml
index 95a5e55176..3b9a34abff 100644
--- a/doc/classes/TileSet.xml
+++ b/doc/classes/TileSet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TileSet" inherits="Resource" category="Core" version="3.0-stable">
+<class name="TileSet" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
Tile library for tilemaps.
</brief_description>
diff --git a/doc/classes/Timer.xml b/doc/classes/Timer.xml
index 383d3199f5..892b14a933 100644
--- a/doc/classes/Timer.xml
+++ b/doc/classes/Timer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Timer" inherits="Node" category="Core" version="3.0-stable">
+<class name="Timer" inherits="Node" category="Core" version="3.1-dev">
<brief_description>
A countdown timer.
</brief_description>
diff --git a/doc/classes/ToolButton.xml b/doc/classes/ToolButton.xml
index 6597dc96e0..916585ecf7 100644
--- a/doc/classes/ToolButton.xml
+++ b/doc/classes/ToolButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ToolButton" inherits="Button" category="Core" version="3.0-stable">
+<class name="ToolButton" inherits="Button" category="Core" version="3.1-dev">
<brief_description>
Flat button helper class.
</brief_description>
diff --git a/doc/classes/TouchScreenButton.xml b/doc/classes/TouchScreenButton.xml
index c187274a9d..50bb23f5d9 100644
--- a/doc/classes/TouchScreenButton.xml
+++ b/doc/classes/TouchScreenButton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TouchScreenButton" inherits="Node2D" category="Core" version="3.0-stable">
+<class name="TouchScreenButton" inherits="Node2D" category="Core" version="3.1-dev">
<brief_description>
Button for touch screen devices.
</brief_description>
diff --git a/doc/classes/Transform.xml b/doc/classes/Transform.xml
index cf1c9ea032..2ebdea9d5e 100644
--- a/doc/classes/Transform.xml
+++ b/doc/classes/Transform.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Transform" category="Built-In Types" version="3.0-stable">
+<class name="Transform" category="Built-In Types" version="3.1-dev">
<brief_description>
3D Transformation. 3x4 matrix.
</brief_description>
diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml
index e20f48ba14..11b8b37ebd 100644
--- a/doc/classes/Transform2D.xml
+++ b/doc/classes/Transform2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Transform2D" category="Built-In Types" version="3.0-stable">
+<class name="Transform2D" category="Built-In Types" version="3.1-dev">
<brief_description>
2D Transformation. 3x2 matrix.
</brief_description>
diff --git a/doc/classes/Translation.xml b/doc/classes/Translation.xml
index 53106f9c08..d3964b8f02 100644
--- a/doc/classes/Translation.xml
+++ b/doc/classes/Translation.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Translation" inherits="Resource" category="Core" version="3.0-stable">
+<class name="Translation" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
Language Translation.
</brief_description>
diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml
index 5b61f46f96..a95ae9b2a3 100644
--- a/doc/classes/TranslationServer.xml
+++ b/doc/classes/TranslationServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TranslationServer" inherits="Object" category="Core" version="3.0-stable">
+<class name="TranslationServer" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
Server that manages all translations. Translations can be set to it and removed from it.
</brief_description>
diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml
index 09af7ee49a..f68f80fa8e 100644
--- a/doc/classes/Tree.xml
+++ b/doc/classes/Tree.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Tree" inherits="Control" category="Core" version="3.0-stable">
+<class name="Tree" inherits="Control" category="Core" version="3.1-dev">
<brief_description>
Control to show a tree of items.
</brief_description>
diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml
index c41cfac37c..21b3223cd3 100644
--- a/doc/classes/TreeItem.xml
+++ b/doc/classes/TreeItem.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TreeItem" inherits="Object" category="Core" version="3.0-stable">
+<class name="TreeItem" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
Control for a single item inside a [Tree].
</brief_description>
diff --git a/doc/classes/TriangleMesh.xml b/doc/classes/TriangleMesh.xml
index 0a4ea1fa8f..a55130744f 100644
--- a/doc/classes/TriangleMesh.xml
+++ b/doc/classes/TriangleMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TriangleMesh" inherits="Reference" category="Core" version="3.0-stable">
+<class name="TriangleMesh" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml
index d843c8341f..dabf8a59b3 100644
--- a/doc/classes/Tween.xml
+++ b/doc/classes/Tween.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Tween" inherits="Node" category="Core" version="3.0-stable">
+<class name="Tween" inherits="Node" category="Core" version="3.1-dev">
<brief_description>
Node useful for animations with unknown start and end points.
</brief_description>
diff --git a/doc/classes/UndoRedo.xml b/doc/classes/UndoRedo.xml
index c95723e083..13f0a506da 100644
--- a/doc/classes/UndoRedo.xml
+++ b/doc/classes/UndoRedo.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="UndoRedo" inherits="Object" category="Core" version="3.0-stable">
+<class name="UndoRedo" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
Helper to manage UndoRedo in the editor or custom tools.
</brief_description>
diff --git a/doc/classes/VBoxContainer.xml b/doc/classes/VBoxContainer.xml
index f92335eef1..d1eb013f29 100644
--- a/doc/classes/VBoxContainer.xml
+++ b/doc/classes/VBoxContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VBoxContainer" inherits="BoxContainer" category="Core" version="3.0-stable">
+<class name="VBoxContainer" inherits="BoxContainer" category="Core" version="3.1-dev">
<brief_description>
Vertical box container.
</brief_description>
diff --git a/doc/classes/VScrollBar.xml b/doc/classes/VScrollBar.xml
index d533db98be..9958b40027 100644
--- a/doc/classes/VScrollBar.xml
+++ b/doc/classes/VScrollBar.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VScrollBar" inherits="ScrollBar" category="Core" version="3.0-stable">
+<class name="VScrollBar" inherits="ScrollBar" category="Core" version="3.1-dev">
<brief_description>
Vertical version of [ScrollBar], which goes from left (min) to right (max).
</brief_description>
diff --git a/doc/classes/VSeparator.xml b/doc/classes/VSeparator.xml
index c6082a905d..2b7027076c 100644
--- a/doc/classes/VSeparator.xml
+++ b/doc/classes/VSeparator.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VSeparator" inherits="Separator" category="Core" version="3.0-stable">
+<class name="VSeparator" inherits="Separator" category="Core" version="3.1-dev">
<brief_description>
Vertical version of [Separator].
</brief_description>
diff --git a/doc/classes/VSlider.xml b/doc/classes/VSlider.xml
index b91c8a7c2a..404626c32d 100644
--- a/doc/classes/VSlider.xml
+++ b/doc/classes/VSlider.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VSlider" inherits="Slider" category="Core" version="3.0-stable">
+<class name="VSlider" inherits="Slider" category="Core" version="3.1-dev">
<brief_description>
Vertical slider.
</brief_description>
diff --git a/doc/classes/VSplitContainer.xml b/doc/classes/VSplitContainer.xml
index e6e6e189e8..903539fd54 100644
--- a/doc/classes/VSplitContainer.xml
+++ b/doc/classes/VSplitContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VSplitContainer" inherits="SplitContainer" category="Core" version="3.0-stable">
+<class name="VSplitContainer" inherits="SplitContainer" category="Core" version="3.1-dev">
<brief_description>
Vertical split container.
</brief_description>
diff --git a/doc/classes/Variant.xml b/doc/classes/Variant.xml
index f27f358015..27e6799fd4 100644
--- a/doc/classes/Variant.xml
+++ b/doc/classes/Variant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Variant" category="Core" version="3.0-stable">
+<class name="Variant" category="Core" version="3.1-dev">
<brief_description>
The most important data type in Godot.
</brief_description>
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index 6a87bbf66c..7666425e86 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Vector2" category="Built-In Types" version="3.0-stable">
+<class name="Vector2" category="Built-In Types" version="3.1-dev">
<brief_description>
Vector used for 2D Math.
</brief_description>
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index 0dc808329f..09afa17282 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Vector3" category="Built-In Types" version="3.0-stable">
+<class name="Vector3" category="Built-In Types" version="3.1-dev">
<brief_description>
Vector class, which performs basic 3D vector math operations.
</brief_description>
diff --git a/doc/classes/VehicleBody.xml b/doc/classes/VehicleBody.xml
index fe58806344..f5ec98ea04 100644
--- a/doc/classes/VehicleBody.xml
+++ b/doc/classes/VehicleBody.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VehicleBody" inherits="RigidBody" category="Core" version="3.0-stable">
+<class name="VehicleBody" inherits="RigidBody" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/VehicleWheel.xml b/doc/classes/VehicleWheel.xml
index e36a1abe9d..16b2424b6e 100644
--- a/doc/classes/VehicleWheel.xml
+++ b/doc/classes/VehicleWheel.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VehicleWheel" inherits="Spatial" category="Core" version="3.0-stable">
+<class name="VehicleWheel" inherits="Spatial" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoPlayer.xml
index 55755ca5df..aa827c6e2c 100644
--- a/doc/classes/VideoPlayer.xml
+++ b/doc/classes/VideoPlayer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VideoPlayer" inherits="Control" category="Core" version="3.0-stable">
+<class name="VideoPlayer" inherits="Control" category="Core" version="3.1-dev">
<brief_description>
Control to play video files.
</brief_description>
diff --git a/doc/classes/VideoStream.xml b/doc/classes/VideoStream.xml
index a4e4ee3452..c777673cf4 100644
--- a/doc/classes/VideoStream.xml
+++ b/doc/classes/VideoStream.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VideoStream" inherits="Resource" category="Core" version="3.0-stable">
+<class name="VideoStream" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index 0698a61529..b3568321ad 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Viewport" inherits="Node" category="Core" version="3.0-stable">
+<class name="Viewport" inherits="Node" category="Core" version="3.1-dev">
<brief_description>
Creates a sub-view into the screen.
</brief_description>
@@ -302,7 +302,7 @@
Amount of objects in frame.
</constant>
<constant name="RENDER_INFO_VERTICES_IN_FRAME" value="1" enum="RenderInfo">
- Amount of vertices in frame.
+ Amount of vertices in frame.
</constant>
<constant name="RENDER_INFO_MATERIAL_CHANGES_IN_FRAME" value="2" enum="RenderInfo">
Amount of material changes in frame.
diff --git a/doc/classes/ViewportContainer.xml b/doc/classes/ViewportContainer.xml
index a2cd9a0217..8c89a2c1be 100644
--- a/doc/classes/ViewportContainer.xml
+++ b/doc/classes/ViewportContainer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ViewportContainer" inherits="Container" category="Core" version="3.0-stable">
+<class name="ViewportContainer" inherits="Container" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/ViewportTexture.xml b/doc/classes/ViewportTexture.xml
index 5943759c55..6900c6563d 100644
--- a/doc/classes/ViewportTexture.xml
+++ b/doc/classes/ViewportTexture.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ViewportTexture" inherits="Texture" category="Core" version="3.0-stable">
+<class name="ViewportTexture" inherits="Texture" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/VisibilityEnabler.xml b/doc/classes/VisibilityEnabler.xml
index faf0451bae..0094a9b3cc 100644
--- a/doc/classes/VisibilityEnabler.xml
+++ b/doc/classes/VisibilityEnabler.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisibilityEnabler" inherits="VisibilityNotifier" category="Core" version="3.0-stable">
+<class name="VisibilityEnabler" inherits="VisibilityNotifier" category="Core" version="3.1-dev">
<brief_description>
Enable certain nodes only when visible.
</brief_description>
diff --git a/doc/classes/VisibilityEnabler2D.xml b/doc/classes/VisibilityEnabler2D.xml
index acd9d86c2a..6b66d76733 100644
--- a/doc/classes/VisibilityEnabler2D.xml
+++ b/doc/classes/VisibilityEnabler2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisibilityEnabler2D" inherits="VisibilityNotifier2D" category="Core" version="3.0-stable">
+<class name="VisibilityEnabler2D" inherits="VisibilityNotifier2D" category="Core" version="3.1-dev">
<brief_description>
Enable certain nodes only when visible.
</brief_description>
diff --git a/doc/classes/VisibilityNotifier.xml b/doc/classes/VisibilityNotifier.xml
index 94b08b78ed..c430a1336d 100644
--- a/doc/classes/VisibilityNotifier.xml
+++ b/doc/classes/VisibilityNotifier.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisibilityNotifier" inherits="Spatial" category="Core" version="3.0-stable">
+<class name="VisibilityNotifier" inherits="Spatial" category="Core" version="3.1-dev">
<brief_description>
Detects when the node is visible on screen.
</brief_description>
diff --git a/doc/classes/VisibilityNotifier2D.xml b/doc/classes/VisibilityNotifier2D.xml
index bcd52cf9ca..67b3525eb4 100644
--- a/doc/classes/VisibilityNotifier2D.xml
+++ b/doc/classes/VisibilityNotifier2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisibilityNotifier2D" inherits="Node2D" category="Core" version="3.0-stable">
+<class name="VisibilityNotifier2D" inherits="Node2D" category="Core" version="3.1-dev">
<brief_description>
Detects when the node is visible on screen.
</brief_description>
diff --git a/doc/classes/VisualInstance.xml b/doc/classes/VisualInstance.xml
index 1c54cb53ac..81e1bcf7f7 100644
--- a/doc/classes/VisualInstance.xml
+++ b/doc/classes/VisualInstance.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualInstance" inherits="Spatial" category="Core" version="3.0-stable">
+<class name="VisualInstance" inherits="Spatial" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml
index a546b86c57..204a4a6704 100644
--- a/doc/classes/VisualServer.xml
+++ b/doc/classes/VisualServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualServer" inherits="Object" category="Core" version="3.0-stable">
+<class name="VisualServer" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
Server for anything visible.
</brief_description>
@@ -42,6 +42,80 @@
Sets margin size, where black bars (or images, if [method black_bars_set_images] was used) are rendered.
</description>
</method>
+ <method name="camera_create">
+ <return type="RID">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="camera_set_cull_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="camera" type="RID">
+ </argument>
+ <argument index="1" name="layers" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="camera_set_environment">
+ <return type="void">
+ </return>
+ <argument index="0" name="camera" type="RID">
+ </argument>
+ <argument index="1" name="env" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="camera_set_orthogonal">
+ <return type="void">
+ </return>
+ <argument index="0" name="camera" type="RID">
+ </argument>
+ <argument index="1" name="size" type="float">
+ </argument>
+ <argument index="2" name="z_near" type="float">
+ </argument>
+ <argument index="3" name="z_far" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="camera_set_perspective">
+ <return type="void">
+ </return>
+ <argument index="0" name="camera" type="RID">
+ </argument>
+ <argument index="1" name="fovy_degrees" type="float">
+ </argument>
+ <argument index="2" name="z_near" type="float">
+ </argument>
+ <argument index="3" name="z_far" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="camera_set_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="camera" type="RID">
+ </argument>
+ <argument index="1" name="transform" type="Transform">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="camera_set_use_vertical_aspect">
+ <return type="void">
+ </return>
+ <argument index="0" name="camera" type="RID">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="canvas_create">
<return type="RID">
</return>
@@ -881,6 +955,12 @@
Modulates all colors in the given canvas.
</description>
</method>
+ <method name="directional_light_create">
+ <return type="RID">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="draw">
<return type="void">
</return>
@@ -890,6 +970,290 @@
Draws a frame.
</description>
</method>
+ <method name="environment_create">
+ <return type="RID">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="environment_set_adjustment">
+ <return type="void">
+ </return>
+ <argument index="0" name="env" type="RID">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <argument index="2" name="brightness" type="float">
+ </argument>
+ <argument index="3" name="contrast" type="float">
+ </argument>
+ <argument index="4" name="saturation" type="float">
+ </argument>
+ <argument index="5" name="ramp" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="environment_set_ambient_light">
+ <return type="void">
+ </return>
+ <argument index="0" name="env" type="RID">
+ </argument>
+ <argument index="1" name="color" type="Color">
+ </argument>
+ <argument index="2" name="energy" type="float" default="1.0">
+ </argument>
+ <argument index="3" name="sky_contibution" type="float" default="0.0">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="environment_set_background">
+ <return type="void">
+ </return>
+ <argument index="0" name="env" type="RID">
+ </argument>
+ <argument index="1" name="bg" type="int" enum="VisualServer.EnvironmentBG">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="environment_set_bg_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="env" type="RID">
+ </argument>
+ <argument index="1" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="environment_set_bg_energy">
+ <return type="void">
+ </return>
+ <argument index="0" name="env" type="RID">
+ </argument>
+ <argument index="1" name="energy" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="environment_set_canvas_max_layer">
+ <return type="void">
+ </return>
+ <argument index="0" name="env" type="RID">
+ </argument>
+ <argument index="1" name="max_layer" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="environment_set_dof_blur_far">
+ <return type="void">
+ </return>
+ <argument index="0" name="env" type="RID">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <argument index="2" name="distance" type="float">
+ </argument>
+ <argument index="3" name="transition" type="float">
+ </argument>
+ <argument index="4" name="far_amount" type="float">
+ </argument>
+ <argument index="5" name="quality" type="int" enum="VisualServer.EnvironmentDOFBlurQuality">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="environment_set_dof_blur_near">
+ <return type="void">
+ </return>
+ <argument index="0" name="env" type="RID">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <argument index="2" name="distance" type="float">
+ </argument>
+ <argument index="3" name="transition" type="float">
+ </argument>
+ <argument index="4" name="far_amount" type="float">
+ </argument>
+ <argument index="5" name="quality" type="int" enum="VisualServer.EnvironmentDOFBlurQuality">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="environment_set_fog">
+ <return type="void">
+ </return>
+ <argument index="0" name="env" type="RID">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <argument index="2" name="color" type="Color">
+ </argument>
+ <argument index="3" name="sun_color" type="Color">
+ </argument>
+ <argument index="4" name="sun_amount" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="environment_set_fog_depth">
+ <return type="void">
+ </return>
+ <argument index="0" name="env" type="RID">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <argument index="2" name="depth_begin" type="float">
+ </argument>
+ <argument index="3" name="depth_curve" type="float">
+ </argument>
+ <argument index="4" name="transmit" type="bool">
+ </argument>
+ <argument index="5" name="transmit_curve" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="environment_set_fog_height">
+ <return type="void">
+ </return>
+ <argument index="0" name="env" type="RID">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <argument index="2" name="min_height" type="float">
+ </argument>
+ <argument index="3" name="max_height" type="float">
+ </argument>
+ <argument index="4" name="height_curve" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="environment_set_glow">
+ <return type="void">
+ </return>
+ <argument index="0" name="env" type="RID">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <argument index="2" name="level_flags" type="int">
+ </argument>
+ <argument index="3" name="intensity" type="float">
+ </argument>
+ <argument index="4" name="strength" type="float">
+ </argument>
+ <argument index="5" name="bloom_threshold" type="float">
+ </argument>
+ <argument index="6" name="blend_mode" type="int" enum="VisualServer.EnvironmentGlowBlendMode">
+ </argument>
+ <argument index="7" name="hdr_bleed_threshold" type="float">
+ </argument>
+ <argument index="8" name="hdr_bleed_scale" type="float">
+ </argument>
+ <argument index="9" name="bicubic_upscale" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="environment_set_sky">
+ <return type="void">
+ </return>
+ <argument index="0" name="env" type="RID">
+ </argument>
+ <argument index="1" name="sky" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="environment_set_sky_custom_fov">
+ <return type="void">
+ </return>
+ <argument index="0" name="env" type="RID">
+ </argument>
+ <argument index="1" name="scale" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="environment_set_ssao">
+ <return type="void">
+ </return>
+ <argument index="0" name="env" type="RID">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <argument index="2" name="radius" type="float">
+ </argument>
+ <argument index="3" name="intensity" type="float">
+ </argument>
+ <argument index="4" name="radius2" type="float">
+ </argument>
+ <argument index="5" name="intensity2" type="float">
+ </argument>
+ <argument index="6" name="bias" type="float">
+ </argument>
+ <argument index="7" name="light_affect" type="float">
+ </argument>
+ <argument index="8" name="color" type="Color">
+ </argument>
+ <argument index="9" name="quality" type="int" enum="VisualServer.EnvironmentSSAOQuality">
+ </argument>
+ <argument index="10" name="blur" type="int" enum="VisualServer.EnvironmentSSAOBlur">
+ </argument>
+ <argument index="11" name="bilateral_sharpness" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="environment_set_ssr">
+ <return type="void">
+ </return>
+ <argument index="0" name="env" type="RID">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <argument index="2" name="max_steps" type="int">
+ </argument>
+ <argument index="3" name="fade_in" type="float">
+ </argument>
+ <argument index="4" name="fade_out" type="float">
+ </argument>
+ <argument index="5" name="depth_tolerance" type="float">
+ </argument>
+ <argument index="6" name="roughness" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="environment_set_tonemap">
+ <return type="void">
+ </return>
+ <argument index="0" name="env" type="RID">
+ </argument>
+ <argument index="1" name="tone_mapper" type="int" enum="VisualServer.EnvironmentToneMapper">
+ </argument>
+ <argument index="2" name="exposure" type="float">
+ </argument>
+ <argument index="3" name="white" type="float">
+ </argument>
+ <argument index="4" name="auto_exposure" type="bool">
+ </argument>
+ <argument index="5" name="min_luminance" type="float">
+ </argument>
+ <argument index="6" name="max_luminance" type="float">
+ </argument>
+ <argument index="7" name="auto_exp_speed" type="float">
+ </argument>
+ <argument index="8" name="auto_exp_grey" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="finish">
<return type="void">
</return>
@@ -952,6 +1316,210 @@
Returns the id of a white texture. Creates one if none exists.
</description>
</method>
+ <method name="gi_probe_create">
+ <return type="RID">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="gi_probe_get_bias" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="arg0" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="gi_probe_get_bounds" qualifiers="const">
+ <return type="AABB">
+ </return>
+ <argument index="0" name="probe" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="gi_probe_get_cell_size" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="probe" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="gi_probe_get_dynamic_data" qualifiers="const">
+ <return type="PoolIntArray">
+ </return>
+ <argument index="0" name="arg0" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="gi_probe_get_dynamic_range" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="arg0" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="gi_probe_get_energy" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="arg0" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="gi_probe_get_normal_bias" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="arg0" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="gi_probe_get_propagation" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="arg0" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="gi_probe_get_to_cell_xform" qualifiers="const">
+ <return type="Transform">
+ </return>
+ <argument index="0" name="arg0" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="gi_probe_is_compressed" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="arg0" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="gi_probe_is_interior" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="arg0" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="gi_probe_set_bias">
+ <return type="void">
+ </return>
+ <argument index="0" name="bias" type="RID">
+ </argument>
+ <argument index="1" name="arg1" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="gi_probe_set_bounds">
+ <return type="void">
+ </return>
+ <argument index="0" name="probe" type="RID">
+ </argument>
+ <argument index="1" name="bounds" type="AABB">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="gi_probe_set_cell_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="probe" type="RID">
+ </argument>
+ <argument index="1" name="range" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="gi_probe_set_compress">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="RID">
+ </argument>
+ <argument index="1" name="arg1" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="gi_probe_set_dynamic_data">
+ <return type="void">
+ </return>
+ <argument index="0" name="data" type="RID">
+ </argument>
+ <argument index="1" name="arg1" type="PoolIntArray">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="gi_probe_set_dynamic_range">
+ <return type="void">
+ </return>
+ <argument index="0" name="range" type="RID">
+ </argument>
+ <argument index="1" name="arg1" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="gi_probe_set_energy">
+ <return type="void">
+ </return>
+ <argument index="0" name="energy" type="RID">
+ </argument>
+ <argument index="1" name="arg1" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="gi_probe_set_interior">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="RID">
+ </argument>
+ <argument index="1" name="arg1" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="gi_probe_set_normal_bias">
+ <return type="void">
+ </return>
+ <argument index="0" name="bias" type="RID">
+ </argument>
+ <argument index="1" name="arg1" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="gi_probe_set_propagation">
+ <return type="void">
+ </return>
+ <argument index="0" name="propagation" type="RID">
+ </argument>
+ <argument index="1" name="arg1" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="gi_probe_set_to_cell_xform">
+ <return type="void">
+ </return>
+ <argument index="0" name="xform" type="RID">
+ </argument>
+ <argument index="1" name="arg1" type="Transform">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="has_changed" qualifiers="const">
<return type="bool">
</return>
@@ -976,6 +1544,128 @@
Returns true, if the OS supports a certain feature. Features might be s3tc, etc, etc2 and pvrtc,
</description>
</method>
+ <method name="immediate_begin">
+ <return type="void">
+ </return>
+ <argument index="0" name="immediate" type="RID">
+ </argument>
+ <argument index="1" name="primitive" type="int" enum="VisualServer.PrimitiveType">
+ </argument>
+ <argument index="2" name="texture" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="immediate_clear">
+ <return type="void">
+ </return>
+ <argument index="0" name="immediate" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="immediate_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="immediate" type="RID">
+ </argument>
+ <argument index="1" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="immediate_create">
+ <return type="RID">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="immediate_end">
+ <return type="void">
+ </return>
+ <argument index="0" name="immediate" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="immediate_get_material" qualifiers="const">
+ <return type="RID">
+ </return>
+ <argument index="0" name="immediate" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="immediate_normal">
+ <return type="void">
+ </return>
+ <argument index="0" name="immediate" type="RID">
+ </argument>
+ <argument index="1" name="normal" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="immediate_set_material">
+ <return type="void">
+ </return>
+ <argument index="0" name="immediate" type="RID">
+ </argument>
+ <argument index="1" name="material" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="immediate_tangent">
+ <return type="void">
+ </return>
+ <argument index="0" name="immediate" type="RID">
+ </argument>
+ <argument index="1" name="tangent" type="Plane">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="immediate_uv">
+ <return type="void">
+ </return>
+ <argument index="0" name="immediate" type="RID">
+ </argument>
+ <argument index="1" name="tex_uv" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="immediate_uv2">
+ <return type="void">
+ </return>
+ <argument index="0" name="immediate" type="RID">
+ </argument>
+ <argument index="1" name="tex_uv" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="immediate_vertex">
+ <return type="void">
+ </return>
+ <argument index="0" name="immediate" type="RID">
+ </argument>
+ <argument index="1" name="vertex" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="immediate_vertex_2d">
+ <return type="void">
+ </return>
+ <argument index="0" name="immediate" type="RID">
+ </argument>
+ <argument index="1" name="vertex" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="init">
<return type="void">
</return>
@@ -983,6 +1673,476 @@
Initializes the visual server.
</description>
</method>
+ <method name="instance_attach_object_instance_id">
+ <return type="void">
+ </return>
+ <argument index="0" name="instance" type="RID">
+ </argument>
+ <argument index="1" name="id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="instance_attach_skeleton">
+ <return type="void">
+ </return>
+ <argument index="0" name="instance" type="RID">
+ </argument>
+ <argument index="1" name="skeleton" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="instance_create">
+ <return type="RID">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="instance_create2">
+ <return type="RID">
+ </return>
+ <argument index="0" name="base" type="RID">
+ </argument>
+ <argument index="1" name="scenario" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="instance_geometry_set_as_instance_lod">
+ <return type="void">
+ </return>
+ <argument index="0" name="instance" type="RID">
+ </argument>
+ <argument index="1" name="as_lod_of_instance" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="instance_geometry_set_cast_shadows_setting">
+ <return type="void">
+ </return>
+ <argument index="0" name="instance" type="RID">
+ </argument>
+ <argument index="1" name="shadow_casting_setting" type="int" enum="VisualServer.ShadowCastingSetting">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="instance_geometry_set_draw_range">
+ <return type="void">
+ </return>
+ <argument index="0" name="instance" type="RID">
+ </argument>
+ <argument index="1" name="min" type="float">
+ </argument>
+ <argument index="2" name="max" type="float">
+ </argument>
+ <argument index="3" name="min_margin" type="float">
+ </argument>
+ <argument index="4" name="max_margin" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="instance_geometry_set_flag">
+ <return type="void">
+ </return>
+ <argument index="0" name="instance" type="RID">
+ </argument>
+ <argument index="1" name="flag" type="int" enum="VisualServer.InstanceFlags">
+ </argument>
+ <argument index="2" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="instance_geometry_set_material_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="instance" type="RID">
+ </argument>
+ <argument index="1" name="material" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="instance_set_base">
+ <return type="void">
+ </return>
+ <argument index="0" name="instance" type="RID">
+ </argument>
+ <argument index="1" name="base" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="instance_set_blend_shape_weight">
+ <return type="void">
+ </return>
+ <argument index="0" name="instance" type="RID">
+ </argument>
+ <argument index="1" name="shape" type="int">
+ </argument>
+ <argument index="2" name="weight" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="instance_set_custom_aabb">
+ <return type="void">
+ </return>
+ <argument index="0" name="instance" type="RID">
+ </argument>
+ <argument index="1" name="aabb" type="AABB">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="instance_set_exterior">
+ <return type="void">
+ </return>
+ <argument index="0" name="instance" type="RID">
+ </argument>
+ <argument index="1" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="instance_set_extra_visibility_margin">
+ <return type="void">
+ </return>
+ <argument index="0" name="instance" type="RID">
+ </argument>
+ <argument index="1" name="margin" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="instance_set_layer_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="instance" type="RID">
+ </argument>
+ <argument index="1" name="mask" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="instance_set_scenario">
+ <return type="void">
+ </return>
+ <argument index="0" name="instance" type="RID">
+ </argument>
+ <argument index="1" name="scenario" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="instance_set_surface_material">
+ <return type="void">
+ </return>
+ <argument index="0" name="instance" type="RID">
+ </argument>
+ <argument index="1" name="surface" type="int">
+ </argument>
+ <argument index="2" name="material" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="instance_set_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="instance" type="RID">
+ </argument>
+ <argument index="1" name="transform" type="Transform">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="instance_set_use_lightmap">
+ <return type="void">
+ </return>
+ <argument index="0" name="instance" type="RID">
+ </argument>
+ <argument index="1" name="lightmap_instance" type="RID">
+ </argument>
+ <argument index="2" name="lightmap" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="instance_set_visible">
+ <return type="void">
+ </return>
+ <argument index="0" name="instance" type="RID">
+ </argument>
+ <argument index="1" name="visible" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="instances_cull_aabb" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="aabb" type="AABB">
+ </argument>
+ <argument index="1" name="scenario" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="instances_cull_convex" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="convex" type="Array">
+ </argument>
+ <argument index="1" name="scenario" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="instances_cull_ray" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="from" type="Vector3">
+ </argument>
+ <argument index="1" name="to" type="Vector3">
+ </argument>
+ <argument index="2" name="scenario" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="light_directional_set_blend_splits">
+ <return type="void">
+ </return>
+ <argument index="0" name="light" type="RID">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="light_directional_set_shadow_depth_range_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="light" type="RID">
+ </argument>
+ <argument index="1" name="range_mode" type="int" enum="VisualServer.LightDirectionalShadowDepthRangeMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="light_directional_set_shadow_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="light" type="RID">
+ </argument>
+ <argument index="1" name="mode" type="int" enum="VisualServer.LightDirectionalShadowMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="light_omni_set_shadow_detail">
+ <return type="void">
+ </return>
+ <argument index="0" name="light" type="RID">
+ </argument>
+ <argument index="1" name="detail" type="int" enum="VisualServer.LightOmniShadowDetail">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="light_omni_set_shadow_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="light" type="RID">
+ </argument>
+ <argument index="1" name="mode" type="int" enum="VisualServer.LightOmniShadowMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="light_set_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="light" type="RID">
+ </argument>
+ <argument index="1" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="light_set_cull_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="light" type="RID">
+ </argument>
+ <argument index="1" name="mask" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="light_set_negative">
+ <return type="void">
+ </return>
+ <argument index="0" name="light" type="RID">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="light_set_param">
+ <return type="void">
+ </return>
+ <argument index="0" name="light" type="RID">
+ </argument>
+ <argument index="1" name="param" type="int" enum="VisualServer.LightParam">
+ </argument>
+ <argument index="2" name="value" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="light_set_projector">
+ <return type="void">
+ </return>
+ <argument index="0" name="light" type="RID">
+ </argument>
+ <argument index="1" name="texture" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="light_set_reverse_cull_face_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="light" type="RID">
+ </argument>
+ <argument index="1" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="light_set_shadow">
+ <return type="void">
+ </return>
+ <argument index="0" name="light" type="RID">
+ </argument>
+ <argument index="1" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="light_set_shadow_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="light" type="RID">
+ </argument>
+ <argument index="1" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="lightmap_capture_create">
+ <return type="RID">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="lightmap_capture_get_bounds" qualifiers="const">
+ <return type="AABB">
+ </return>
+ <argument index="0" name="capture" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="lightmap_capture_get_energy" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="capture" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="lightmap_capture_get_octree" qualifiers="const">
+ <return type="PoolByteArray">
+ </return>
+ <argument index="0" name="capture" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="lightmap_capture_get_octree_cell_subdiv" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="capture" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="lightmap_capture_get_octree_cell_transform" qualifiers="const">
+ <return type="Transform">
+ </return>
+ <argument index="0" name="capture" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="lightmap_capture_set_bounds">
+ <return type="void">
+ </return>
+ <argument index="0" name="capture" type="RID">
+ </argument>
+ <argument index="1" name="bounds" type="AABB">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="lightmap_capture_set_energy">
+ <return type="void">
+ </return>
+ <argument index="0" name="capture" type="RID">
+ </argument>
+ <argument index="1" name="energy" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="lightmap_capture_set_octree">
+ <return type="void">
+ </return>
+ <argument index="0" name="capture" type="RID">
+ </argument>
+ <argument index="1" name="octree" type="PoolByteArray">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="lightmap_capture_set_octree_cell_subdiv">
+ <return type="void">
+ </return>
+ <argument index="0" name="capture" type="RID">
+ </argument>
+ <argument index="1" name="subdiv" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="lightmap_capture_set_octree_cell_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="capture" type="RID">
+ </argument>
+ <argument index="1" name="xform" type="Transform">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="make_sphere_mesh">
<return type="RID">
</return>
@@ -1327,6 +2487,472 @@
Sets a mesh's surface's material.
</description>
</method>
+ <method name="multimesh_allocate">
+ <return type="void">
+ </return>
+ <argument index="0" name="multimesh" type="RID">
+ </argument>
+ <argument index="1" name="instances" type="int">
+ </argument>
+ <argument index="2" name="transform_format" type="int" enum="VisualServer.MultimeshTransformFormat">
+ </argument>
+ <argument index="3" name="color_format" type="int" enum="VisualServer.MultimeshColorFormat">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="multimesh_get_aabb" qualifiers="const">
+ <return type="AABB">
+ </return>
+ <argument index="0" name="multimesh" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="multimesh_get_instance_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="multimesh" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="multimesh_get_mesh" qualifiers="const">
+ <return type="RID">
+ </return>
+ <argument index="0" name="multimesh" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="multimesh_get_visible_instances" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="multimesh" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="multimesh_instance_get_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <argument index="0" name="multimesh" type="RID">
+ </argument>
+ <argument index="1" name="index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="multimesh_instance_get_transform" qualifiers="const">
+ <return type="Transform">
+ </return>
+ <argument index="0" name="multimesh" type="RID">
+ </argument>
+ <argument index="1" name="index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="multimesh_instance_get_transform_2d" qualifiers="const">
+ <return type="Transform2D">
+ </return>
+ <argument index="0" name="multimesh" type="RID">
+ </argument>
+ <argument index="1" name="index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="multimesh_instance_set_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="multimesh" type="RID">
+ </argument>
+ <argument index="1" name="index" type="int">
+ </argument>
+ <argument index="2" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="multimesh_instance_set_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="multimesh" type="RID">
+ </argument>
+ <argument index="1" name="index" type="int">
+ </argument>
+ <argument index="2" name="transform" type="Transform">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="multimesh_instance_set_transform_2d">
+ <return type="void">
+ </return>
+ <argument index="0" name="multimesh" type="RID">
+ </argument>
+ <argument index="1" name="index" type="int">
+ </argument>
+ <argument index="2" name="transform" type="Transform2D">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="multimesh_set_mesh">
+ <return type="void">
+ </return>
+ <argument index="0" name="multimesh" type="RID">
+ </argument>
+ <argument index="1" name="mesh" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="multimesh_set_visible_instances">
+ <return type="void">
+ </return>
+ <argument index="0" name="multimesh" type="RID">
+ </argument>
+ <argument index="1" name="visible" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="omni_light_create">
+ <return type="RID">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="particles_create">
+ <return type="RID">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="particles_get_current_aabb">
+ <return type="AABB">
+ </return>
+ <argument index="0" name="particles" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="particles_get_emitting">
+ <return type="bool">
+ </return>
+ <argument index="0" name="particles" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="particles_restart">
+ <return type="void">
+ </return>
+ <argument index="0" name="particles" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="particles_set_amount">
+ <return type="void">
+ </return>
+ <argument index="0" name="particles" type="RID">
+ </argument>
+ <argument index="1" name="amount" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="particles_set_custom_aabb">
+ <return type="void">
+ </return>
+ <argument index="0" name="particles" type="RID">
+ </argument>
+ <argument index="1" name="aabb" type="AABB">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="particles_set_draw_order">
+ <return type="void">
+ </return>
+ <argument index="0" name="particles" type="RID">
+ </argument>
+ <argument index="1" name="order" type="int" enum="VisualServer.ParticlesDrawOrder">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="particles_set_draw_pass_mesh">
+ <return type="void">
+ </return>
+ <argument index="0" name="particles" type="RID">
+ </argument>
+ <argument index="1" name="pass" type="int">
+ </argument>
+ <argument index="2" name="mesh" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="particles_set_draw_passes">
+ <return type="void">
+ </return>
+ <argument index="0" name="particles" type="RID">
+ </argument>
+ <argument index="1" name="count" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="particles_set_emission_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="particles" type="RID">
+ </argument>
+ <argument index="1" name="transform" type="Transform">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="particles_set_emitting">
+ <return type="void">
+ </return>
+ <argument index="0" name="particles" type="RID">
+ </argument>
+ <argument index="1" name="emitting" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="particles_set_explosiveness_ratio">
+ <return type="void">
+ </return>
+ <argument index="0" name="particles" type="RID">
+ </argument>
+ <argument index="1" name="ratio" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="particles_set_fixed_fps">
+ <return type="void">
+ </return>
+ <argument index="0" name="particles" type="RID">
+ </argument>
+ <argument index="1" name="fps" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="particles_set_fractional_delta">
+ <return type="void">
+ </return>
+ <argument index="0" name="particles" type="RID">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="particles_set_lifetime">
+ <return type="void">
+ </return>
+ <argument index="0" name="particles" type="RID">
+ </argument>
+ <argument index="1" name="lifetime" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="particles_set_one_shot">
+ <return type="void">
+ </return>
+ <argument index="0" name="particles" type="RID">
+ </argument>
+ <argument index="1" name="one_shot" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="particles_set_pre_process_time">
+ <return type="void">
+ </return>
+ <argument index="0" name="particles" type="RID">
+ </argument>
+ <argument index="1" name="time" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="particles_set_process_material">
+ <return type="void">
+ </return>
+ <argument index="0" name="particles" type="RID">
+ </argument>
+ <argument index="1" name="material" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="particles_set_randomness_ratio">
+ <return type="void">
+ </return>
+ <argument index="0" name="particles" type="RID">
+ </argument>
+ <argument index="1" name="ratio" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="particles_set_speed_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="particles" type="RID">
+ </argument>
+ <argument index="1" name="scale" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="particles_set_use_local_coordinates">
+ <return type="void">
+ </return>
+ <argument index="0" name="particles" type="RID">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="reflection_probe_create">
+ <return type="RID">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="reflection_probe_set_as_interior">
+ <return type="void">
+ </return>
+ <argument index="0" name="probe" type="RID">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="reflection_probe_set_cull_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="probe" type="RID">
+ </argument>
+ <argument index="1" name="layers" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="reflection_probe_set_enable_box_projection">
+ <return type="void">
+ </return>
+ <argument index="0" name="probe" type="RID">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="reflection_probe_set_enable_shadows">
+ <return type="void">
+ </return>
+ <argument index="0" name="probe" type="RID">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="reflection_probe_set_extents">
+ <return type="void">
+ </return>
+ <argument index="0" name="probe" type="RID">
+ </argument>
+ <argument index="1" name="extents" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="reflection_probe_set_intensity">
+ <return type="void">
+ </return>
+ <argument index="0" name="probe" type="RID">
+ </argument>
+ <argument index="1" name="intensity" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="reflection_probe_set_interior_ambient">
+ <return type="void">
+ </return>
+ <argument index="0" name="probe" type="RID">
+ </argument>
+ <argument index="1" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="reflection_probe_set_interior_ambient_energy">
+ <return type="void">
+ </return>
+ <argument index="0" name="probe" type="RID">
+ </argument>
+ <argument index="1" name="energy" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="reflection_probe_set_interior_ambient_probe_contribution">
+ <return type="void">
+ </return>
+ <argument index="0" name="probe" type="RID">
+ </argument>
+ <argument index="1" name="contrib" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="reflection_probe_set_max_distance">
+ <return type="void">
+ </return>
+ <argument index="0" name="probe" type="RID">
+ </argument>
+ <argument index="1" name="distance" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="reflection_probe_set_origin_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="probe" type="RID">
+ </argument>
+ <argument index="1" name="offset" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="reflection_probe_set_update_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="probe" type="RID">
+ </argument>
+ <argument index="1" name="mode" type="int" enum="VisualServer.ReflectionProbeUpdateMode">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="request_frame_drawn_callback">
<return type="void">
</return>
@@ -1341,6 +2967,54 @@
The callback method must use only 1 argument which will be called with 'userdata'.
</description>
</method>
+ <method name="scenario_create">
+ <return type="RID">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="scenario_set_debug">
+ <return type="void">
+ </return>
+ <argument index="0" name="scenario" type="RID">
+ </argument>
+ <argument index="1" name="debug_mode" type="int" enum="VisualServer.ScenarioDebugMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="scenario_set_environment">
+ <return type="void">
+ </return>
+ <argument index="0" name="scenario" type="RID">
+ </argument>
+ <argument index="1" name="environment" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="scenario_set_fallback_environment">
+ <return type="void">
+ </return>
+ <argument index="0" name="scenario" type="RID">
+ </argument>
+ <argument index="1" name="environment" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="scenario_set_reflection_atlas_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="scenario" type="RID">
+ </argument>
+ <argument index="1" name="p_size" type="int">
+ </argument>
+ <argument index="2" name="subdiv" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_boot_image">
<return type="void">
</return>
@@ -1430,6 +3104,76 @@
Sets a shader's default texture. Overwrites the texture given by name.
</description>
</method>
+ <method name="skeleton_allocate">
+ <return type="void">
+ </return>
+ <argument index="0" name="skeleton" type="RID">
+ </argument>
+ <argument index="1" name="bones" type="int">
+ </argument>
+ <argument index="2" name="is_2d_skeleton" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="skeleton_bone_get_transform" qualifiers="const">
+ <return type="Transform">
+ </return>
+ <argument index="0" name="skeleton" type="RID">
+ </argument>
+ <argument index="1" name="bone" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="skeleton_bone_get_transform_2d" qualifiers="const">
+ <return type="Transform2D">
+ </return>
+ <argument index="0" name="skeleton" type="RID">
+ </argument>
+ <argument index="1" name="bone" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="skeleton_bone_set_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="skeleton" type="RID">
+ </argument>
+ <argument index="1" name="bone" type="int">
+ </argument>
+ <argument index="2" name="transform" type="Transform">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="skeleton_bone_set_transform_2d">
+ <return type="void">
+ </return>
+ <argument index="0" name="skeleton" type="RID">
+ </argument>
+ <argument index="1" name="bone" type="int">
+ </argument>
+ <argument index="2" name="transform" type="Transform2D">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="skeleton_create">
+ <return type="RID">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="skeleton_get_bone_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="skeleton" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="sky_create">
<return type="RID">
</return>
@@ -1450,6 +3194,12 @@
Sets a sky's texture.
</description>
</method>
+ <method name="spot_light_create">
+ <return type="RID">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="sync">
<return type="void">
</return>
@@ -2214,6 +3964,24 @@
<constant name="LIGHT_PARAM_MAX" value="15" enum="LightParam">
The light parameters endpoint. Used internally.
</constant>
+ <constant name="LIGHT_OMNI_SHADOW_DUAL_PARABOLOID" value="0" enum="LightOmniShadowMode">
+ </constant>
+ <constant name="LIGHT_OMNI_SHADOW_CUBE" value="1" enum="LightOmniShadowMode">
+ </constant>
+ <constant name="LIGHT_OMNI_SHADOW_DETAIL_VERTICAL" value="0" enum="LightOmniShadowDetail">
+ </constant>
+ <constant name="LIGHT_OMNI_SHADOW_DETAIL_HORIZONTAL" value="1" enum="LightOmniShadowDetail">
+ </constant>
+ <constant name="LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL" value="0" enum="LightDirectionalShadowMode">
+ </constant>
+ <constant name="LIGHT_DIRECTIONAL_SHADOW_PARALLEL_2_SPLITS" value="1" enum="LightDirectionalShadowMode">
+ </constant>
+ <constant name="LIGHT_DIRECTIONAL_SHADOW_PARALLEL_4_SPLITS" value="2" enum="LightDirectionalShadowMode">
+ </constant>
+ <constant name="LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_STABLE" value="0" enum="LightDirectionalShadowDepthRangeMode">
+ </constant>
+ <constant name="LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_OPTIMIZED" value="1" enum="LightDirectionalShadowDepthRangeMode">
+ </constant>
<constant name="VIEWPORT_UPDATE_DISABLED" value="0" enum="ViewportUpdateMode">
</constant>
<constant name="VIEWPORT_UPDATE_ONCE" value="1" enum="ViewportUpdateMode">
@@ -2323,6 +4091,18 @@
<constant name="INSTANCE_GEOMETRY_MASK" value="30" enum="InstanceType">
A combination of the flags of geometry instances (mesh, multimesh, immediate and particles).
</constant>
+ <constant name="INSTANCE_FLAG_USE_BAKED_LIGHT" value="0" enum="InstanceFlags">
+ </constant>
+ <constant name="INSTANCE_FLAG_MAX" value="1" enum="InstanceFlags">
+ </constant>
+ <constant name="SHADOW_CASTING_SETTING_OFF" value="0" enum="ShadowCastingSetting">
+ </constant>
+ <constant name="SHADOW_CASTING_SETTING_ON" value="1" enum="ShadowCastingSetting">
+ </constant>
+ <constant name="SHADOW_CASTING_SETTING_DOUBLE_SIDED" value="2" enum="ShadowCastingSetting">
+ </constant>
+ <constant name="SHADOW_CASTING_SETTING_SHADOWS_ONLY" value="3" enum="ShadowCastingSetting">
+ </constant>
<constant name="NINE_PATCH_STRETCH" value="0" enum="NinePatchAxisMode">
The nine patch gets stretched where needed.
</constant>
@@ -2398,5 +4178,75 @@
</constant>
<constant name="FEATURE_MULTITHREADED" value="1" enum="Features">
</constant>
+ <constant name="MULTIMESH_TRANSFORM_2D" value="0" enum="MultimeshTransformFormat">
+ </constant>
+ <constant name="MULTIMESH_TRANSFORM_3D" value="1" enum="MultimeshTransformFormat">
+ </constant>
+ <constant name="MULTIMESH_COLOR_NONE" value="0" enum="MultimeshColorFormat">
+ </constant>
+ <constant name="MULTIMESH_COLOR_8BIT" value="1" enum="MultimeshColorFormat">
+ </constant>
+ <constant name="MULTIMESH_COLOR_FLOAT" value="2" enum="MultimeshColorFormat">
+ </constant>
+ <constant name="REFLECTION_PROBE_UPDATE_ONCE" value="0" enum="ReflectionProbeUpdateMode">
+ </constant>
+ <constant name="REFLECTION_PROBE_UPDATE_ALWAYS" value="1" enum="ReflectionProbeUpdateMode">
+ </constant>
+ <constant name="PARTICLES_DRAW_ORDER_INDEX" value="0" enum="ParticlesDrawOrder">
+ </constant>
+ <constant name="PARTICLES_DRAW_ORDER_LIFETIME" value="1" enum="ParticlesDrawOrder">
+ </constant>
+ <constant name="PARTICLES_DRAW_ORDER_VIEW_DEPTH" value="2" enum="ParticlesDrawOrder">
+ </constant>
+ <constant name="ENV_BG_CLEAR_COLOR" value="0" enum="EnvironmentBG">
+ </constant>
+ <constant name="ENV_BG_COLOR" value="1" enum="EnvironmentBG">
+ </constant>
+ <constant name="ENV_BG_SKY" value="2" enum="EnvironmentBG">
+ </constant>
+ <constant name="ENV_BG_COLOR_SKY" value="3" enum="EnvironmentBG">
+ </constant>
+ <constant name="ENV_BG_CANVAS" value="4" enum="EnvironmentBG">
+ </constant>
+ <constant name="ENV_BG_KEEP" value="5" enum="EnvironmentBG">
+ </constant>
+ <constant name="ENV_BG_MAX" value="6" enum="EnvironmentBG">
+ </constant>
+ <constant name="ENV_DOF_BLUR_QUALITY_LOW" value="0" enum="EnvironmentDOFBlurQuality">
+ </constant>
+ <constant name="ENV_DOF_BLUR_QUALITY_MEDIUM" value="1" enum="EnvironmentDOFBlurQuality">
+ </constant>
+ <constant name="ENV_DOF_BLUR_QUALITY_HIGH" value="2" enum="EnvironmentDOFBlurQuality">
+ </constant>
+ <constant name="GLOW_BLEND_MODE_ADDITIVE" value="0" enum="EnvironmentGlowBlendMode">
+ </constant>
+ <constant name="GLOW_BLEND_MODE_SCREEN" value="1" enum="EnvironmentGlowBlendMode">
+ </constant>
+ <constant name="GLOW_BLEND_MODE_SOFTLIGHT" value="2" enum="EnvironmentGlowBlendMode">
+ </constant>
+ <constant name="GLOW_BLEND_MODE_REPLACE" value="3" enum="EnvironmentGlowBlendMode">
+ </constant>
+ <constant name="ENV_TONE_MAPPER_LINEAR" value="0" enum="EnvironmentToneMapper">
+ </constant>
+ <constant name="ENV_TONE_MAPPER_REINHARDT" value="1" enum="EnvironmentToneMapper">
+ </constant>
+ <constant name="ENV_TONE_MAPPER_FILMIC" value="2" enum="EnvironmentToneMapper">
+ </constant>
+ <constant name="ENV_TONE_MAPPER_ACES" value="3" enum="EnvironmentToneMapper">
+ </constant>
+ <constant name="ENV_SSAO_QUALITY_LOW" value="0" enum="EnvironmentSSAOQuality">
+ </constant>
+ <constant name="ENV_SSAO_QUALITY_MEDIUM" value="1" enum="EnvironmentSSAOQuality">
+ </constant>
+ <constant name="ENV_SSAO_QUALITY_HIGH" value="2" enum="EnvironmentSSAOQuality">
+ </constant>
+ <constant name="ENV_SSAO_BLUR_DISABLED" value="0" enum="EnvironmentSSAOBlur">
+ </constant>
+ <constant name="ENV_SSAO_BLUR_1x1" value="1" enum="EnvironmentSSAOBlur">
+ </constant>
+ <constant name="ENV_SSAO_BLUR_2x2" value="2" enum="EnvironmentSSAOBlur">
+ </constant>
+ <constant name="ENV_SSAO_BLUR_3x3" value="3" enum="EnvironmentSSAOBlur">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/WeakRef.xml b/doc/classes/WeakRef.xml
index 0c4801b66e..adaa964630 100644
--- a/doc/classes/WeakRef.xml
+++ b/doc/classes/WeakRef.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WeakRef" inherits="Reference" category="Core" version="3.0-stable">
+<class name="WeakRef" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
Holds an [Object], but does not contribute to the reference count if the object is a reference.
</brief_description>
diff --git a/doc/classes/WebSocketClient.xml b/doc/classes/WebSocketClient.xml
new file mode 100644
index 0000000000..9c0685031c
--- /dev/null
+++ b/doc/classes/WebSocketClient.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="WebSocketClient" inherits="WebSocketMultiplayerPeer" category="Core" version="3.1-dev">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="connect_to_url">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="url" type="String">
+ </argument>
+ <argument index="1" name="protocols" type="PoolStringArray" default="PoolStringArray( )">
+ </argument>
+ <argument index="2" name="gd_mp_api" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="disconnect_from_host">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <signals>
+ <signal name="connection_closed">
+ <description>
+ </description>
+ </signal>
+ <signal name="connection_error">
+ <description>
+ </description>
+ </signal>
+ <signal name="connection_established">
+ <argument index="0" name="protocol" type="String">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="data_received">
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/WebSocketMultiplayerPeer.xml b/doc/classes/WebSocketMultiplayerPeer.xml
new file mode 100644
index 0000000000..b49d4c48e0
--- /dev/null
+++ b/doc/classes/WebSocketMultiplayerPeer.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="WebSocketMultiplayerPeer" inherits="NetworkedMultiplayerPeer" category="Core" version="3.1-dev">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_peer" qualifiers="const">
+ <return type="WebSocketPeer">
+ </return>
+ <argument index="0" name="peer_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <signals>
+ <signal name="peer_packet">
+ <argument index="0" name="peer_source" type="int">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/WebSocketPeer.xml b/doc/classes/WebSocketPeer.xml
new file mode 100644
index 0000000000..fba8322889
--- /dev/null
+++ b/doc/classes/WebSocketPeer.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="WebSocketPeer" inherits="PacketPeer" category="Core" version="3.1-dev">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="close">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_write_mode" qualifiers="const">
+ <return type="int" enum="WebSocketPeer.WriteMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_connected_to_host" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_write_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="WebSocketPeer.WriteMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="was_string_packet" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="WRITE_MODE_TEXT" value="0" enum="WriteMode">
+ </constant>
+ <constant name="WRITE_MODE_BINARY" value="1" enum="WriteMode">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/WebSocketServer.xml b/doc/classes/WebSocketServer.xml
new file mode 100644
index 0000000000..887df696ff
--- /dev/null
+++ b/doc/classes/WebSocketServer.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="WebSocketServer" inherits="WebSocketMultiplayerPeer" category="Core" version="3.1-dev">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="has_peer" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_listening" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="listen">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="port" type="int">
+ </argument>
+ <argument index="1" name="protocols" type="PoolStringArray" default="PoolStringArray( )">
+ </argument>
+ <argument index="2" name="gd_mp_api" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="stop">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <signals>
+ <signal name="client_connected">
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="protocol" type="String">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="client_disconnected">
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="data_received">
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/WindowDialog.xml b/doc/classes/WindowDialog.xml
index 891e489be5..ef4f6196b5 100644
--- a/doc/classes/WindowDialog.xml
+++ b/doc/classes/WindowDialog.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WindowDialog" inherits="Popup" category="Core" version="3.0-stable">
+<class name="WindowDialog" inherits="Popup" category="Core" version="3.1-dev">
<brief_description>
Base class for window dialogs.
</brief_description>
diff --git a/doc/classes/World.xml b/doc/classes/World.xml
index cad286a1ac..810e659c74 100644
--- a/doc/classes/World.xml
+++ b/doc/classes/World.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="World" inherits="Resource" category="Core" version="3.0-stable">
+<class name="World" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
Class that has everything pertaining to a world.
</brief_description>
diff --git a/doc/classes/World2D.xml b/doc/classes/World2D.xml
index 1a2745e6cb..acde276c1d 100644
--- a/doc/classes/World2D.xml
+++ b/doc/classes/World2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="World2D" inherits="Resource" category="Core" version="3.0-stable">
+<class name="World2D" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
Class that has everything pertaining to a 2D world.
</brief_description>
diff --git a/doc/classes/WorldEnvironment.xml b/doc/classes/WorldEnvironment.xml
index 468e618e72..266f94c317 100644
--- a/doc/classes/WorldEnvironment.xml
+++ b/doc/classes/WorldEnvironment.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WorldEnvironment" inherits="Node" category="Core" version="3.0-stable">
+<class name="WorldEnvironment" inherits="Node" category="Core" version="3.1-dev">
<brief_description>
Default environment properties for the entire scene (post-processing effects, lightning and background settings).
</brief_description>
diff --git a/doc/classes/XMLParser.xml b/doc/classes/XMLParser.xml
index a404074401..8855adec22 100644
--- a/doc/classes/XMLParser.xml
+++ b/doc/classes/XMLParser.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="XMLParser" inherits="Reference" category="Core" version="3.0-stable">
+<class name="XMLParser" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
Low-level class for creating parsers for XML files.
</brief_description>
diff --git a/doc/classes/YSort.xml b/doc/classes/YSort.xml
index e4818df62b..fdccfaf531 100644
--- a/doc/classes/YSort.xml
+++ b/doc/classes/YSort.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="YSort" inherits="Node2D" category="Core" version="3.0-stable">
+<class name="YSort" inherits="Node2D" category="Core" version="3.1-dev">
<brief_description>
Sort all child nodes based on their Y positions.
</brief_description>
diff --git a/doc/classes/bool.xml b/doc/classes/bool.xml
index cce5dd3b45..ed95da869b 100644
--- a/doc/classes/bool.xml
+++ b/doc/classes/bool.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="bool" category="Built-In Types" version="3.0-stable">
+<class name="bool" category="Built-In Types" version="3.1-dev">
<brief_description>
Boolean built-in type
</brief_description>
diff --git a/doc/classes/float.xml b/doc/classes/float.xml
index 812bd9b3a9..c576c27687 100644
--- a/doc/classes/float.xml
+++ b/doc/classes/float.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="float" category="Built-In Types" version="3.0-stable">
+<class name="float" category="Built-In Types" version="3.1-dev">
<brief_description>
Float built-in type
</brief_description>
diff --git a/doc/classes/int.xml b/doc/classes/int.xml
index 49b8b3949a..a86353e97e 100644
--- a/doc/classes/int.xml
+++ b/doc/classes/int.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="int" category="Built-In Types" version="3.0-stable">
+<class name="int" category="Built-In Types" version="3.1-dev">
<brief_description>
Integer built-in type.
</brief_description>
diff --git a/doc/tools/makemd.py b/doc/tools/makemd.py
index b2444eb47b..a73a4337d0 100644
--- a/doc/tools/makemd.py
+++ b/doc/tools/makemd.py
@@ -2,12 +2,19 @@
# -*- coding: utf-8 -*-
import sys
+import os.path as path
+import os
import xml.etree.ElementTree as ET
input_list = []
for arg in sys.argv[1:]:
- input_list.append(arg)
+ if not path.exists(arg):
+ exit("path {} doesn't exist".format(arg))
+ elif path.isdir(arg):
+ input_list += filter(path.isfile, [path.join(arg, f) for f in os.listdir(arg)])
+ else: # assuming is a file
+ input_list.append(arg)
if len(input_list) < 1:
print 'usage: makemd.py <classes.xml>'
@@ -29,7 +36,6 @@ def make_class_list(class_list, columns):
f = open('class_list.md', 'wb')
prev = 0
col_max = len(class_list) / columns + 1
- print ('col max is ', col_max)
col_count = 0
row_count = 0
last_initial = ''
@@ -335,12 +341,11 @@ for file in input_list:
sys.exit(255)
version = doc.attrib['version']
-
- for c in list(doc):
- if c.attrib['name'] in class_names:
- continue
- class_names.append(c.attrib['name'])
- classes[c.attrib['name']] = c
+ class_name = doc.attrib['name']
+ if class_name in class_names:
+ continue
+ class_names.append(class_name)
+ classes[class_name] = doc
class_names.sort()
diff --git a/editor/icons/SCsub b/editor/icons/SCsub
index 9bd036dfa9..64992a9f90 100644
--- a/editor/icons/SCsub
+++ b/editor/icons/SCsub
@@ -34,7 +34,7 @@ def make_editor_icons_action(target, source, env):
s.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n")
s.write("#ifndef _EDITOR_ICONS_H\n")
s.write("#define _EDITOR_ICONS_H\n")
- s.write("static const int editor_icons_count = %s;\n" % len(svg_icons))
+ s.write("static const int editor_icons_count = {};\n".format(len(svg_icons)))
s.write("static const char *editor_icons_sources[] = {\n")
s.write(icons_string.getvalue())
s.write('};\n\n')
@@ -57,7 +57,7 @@ def make_editor_icons_action(target, source, env):
if icon_name.endswith("BigThumb"): # don't know a better way to handle this
thumb_big_indices.append(str(index))
- s.write('\t"%s"' % icon_name)
+ s.write('\t"{0}"'.format(icon_name))
if fname != svg_icons[-1]:
s.write(",")
@@ -69,13 +69,13 @@ def make_editor_icons_action(target, source, env):
if thumb_medium_indices:
s.write("\n\n")
- s.write("static const int editor_md_thumbs_count = %s;\n" % len(thumb_medium_indices))
+ s.write("static const int editor_md_thumbs_count = {};\n".format(len(thumb_medium_indices)))
s.write("static const int editor_md_thumbs_indices[] = {")
s.write(", ".join(thumb_medium_indices))
s.write("};\n")
if thumb_big_indices:
s.write("\n\n")
- s.write("static const int editor_bg_thumbs_count = %s;\n" % len(thumb_big_indices))
+ s.write("static const int editor_bg_thumbs_count = {};\n".format(len(thumb_big_indices)))
s.write("static const int editor_bg_thumbs_indices[] = {")
s.write(", ".join(thumb_big_indices))
s.write("};\n")
diff --git a/editor/import/editor_import_plugin.cpp b/editor/import/editor_import_plugin.cpp
index 3f5dc7c9f4..c1c1183692 100644
--- a/editor/import/editor_import_plugin.cpp
+++ b/editor/import/editor_import_plugin.cpp
@@ -74,14 +74,14 @@ String EditorImportPlugin::get_resource_type() const {
float EditorImportPlugin::get_priority() const {
if (!(get_script_instance() && get_script_instance()->has_method("get_priority"))) {
- return EditorImportPlugin::get_priority();
+ return ResourceImporter::get_priority();
}
return get_script_instance()->call("get_priority");
}
int EditorImportPlugin::get_import_order() const {
if (!(get_script_instance() && get_script_instance()->has_method("get_import_order"))) {
- return EditorImportPlugin::get_import_order();
+ return ResourceImporter::get_import_order();
}
return get_script_instance()->call("get_import_order");
}
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 4a05d401cb..9680ad07e7 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -169,64 +169,10 @@ public:
}
};
-void CanvasItemEditor::_edit_set_pivot(const Vector2 &mouse_pos) {
- List<Node *> &selection = editor_selection->get_selected_node_list();
-
- undo_redo->create_action(TTR("Move Pivot"));
-
- for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
- Node2D *n2d = Object::cast_to<Node2D>(E->get());
- if (n2d && n2d->_edit_use_pivot()) {
-
- Vector2 offset = n2d->_edit_get_pivot();
- Vector2 gpos = n2d->get_global_position();
-
- Vector2 local_mouse_pos = n2d->get_canvas_transform().affine_inverse().xform(mouse_pos);
-
- Vector2 motion_ofs = gpos - local_mouse_pos;
-
- undo_redo->add_do_method(n2d, "set_global_position", local_mouse_pos);
- undo_redo->add_do_method(n2d, "_edit_set_pivot", offset + n2d->get_global_transform().affine_inverse().basis_xform(motion_ofs));
- undo_redo->add_undo_method(n2d, "set_global_position", gpos);
- undo_redo->add_undo_method(n2d, "_edit_set_pivot", offset);
- for (int i = 0; i < n2d->get_child_count(); i++) {
- Node2D *n2dc = Object::cast_to<Node2D>(n2d->get_child(i));
- if (!n2dc)
- continue;
-
- undo_redo->add_do_method(n2dc, "set_global_position", n2dc->get_global_position());
- undo_redo->add_undo_method(n2dc, "set_global_position", n2dc->get_global_position());
- }
- }
-
- Control *cnt = Object::cast_to<Control>(E->get());
- if (cnt) {
-
- Vector2 old_pivot = cnt->get_pivot_offset();
- Vector2 new_pivot = cnt->get_global_transform_with_canvas().affine_inverse().xform(mouse_pos);
- Vector2 old_pos = cnt->get_position();
-
- Vector2 top_pos = cnt->get_transform().get_origin(); //remember where top pos was
- cnt->set_pivot_offset(new_pivot);
- Vector2 new_top_pos = cnt->get_transform().get_origin(); //check where it is now
-
- Vector2 new_pos = old_pos - (new_top_pos - top_pos); //offset it back
-
- undo_redo->add_do_method(cnt, "set_pivot_offset", new_pivot);
- undo_redo->add_do_method(cnt, "set_position", new_pos);
- undo_redo->add_undo_method(cnt, "set_pivot_offset", old_pivot);
- undo_redo->add_undo_method(cnt, "set_position", old_pos);
- }
- }
-
- undo_redo->commit_action();
-}
-
void CanvasItemEditor::_snap_if_closer_float(float p_value, float p_target_snap, float &r_current_snap, bool &r_snapped, float p_radius) {
float radius = p_radius / zoom;
float dist = Math::abs(p_value - p_target_snap);
- if (p_radius < 0 || dist < radius && (!r_snapped || dist < Math::abs(r_current_snap - p_value))) {
+ if ((p_radius < 0 || dist < radius) && (!r_snapped || dist < Math::abs(r_current_snap - p_value))) {
r_current_snap = p_target_snap;
r_snapped = true;
}
@@ -263,7 +209,6 @@ void CanvasItemEditor::_snap_other_nodes(Point2 p_value, Point2 &r_current_snap,
}
Point2 CanvasItemEditor::snap_point(Point2 p_target, unsigned int p_modes, const CanvasItem *p_canvas_item, unsigned int p_forced_modes) {
- Point2 dist[2];
bool snapped[2] = { false, false };
// Smart snap using the canvas position
@@ -271,12 +216,12 @@ Point2 CanvasItemEditor::snap_point(Point2 p_target, unsigned int p_modes, const
real_t rotation = 0.0;
if (p_canvas_item) {
- Point2 begin;
- Point2 end;
rotation = p_canvas_item->get_global_transform_with_canvas().get_rotation();
+ // Parent sides and center
if ((snap_active && snap_node_parent && (p_modes & SNAP_NODE_PARENT)) || (p_forced_modes & SNAP_NODE_PARENT)) {
- // Parent sides and center
+ Point2 begin;
+ Point2 end;
bool can_snap = false;
if (const Control *c = Object::cast_to<Control>(p_canvas_item)) {
begin = p_canvas_item->get_global_transform_with_canvas().xform(_anchor_to_position(c, Point2(0, 0)));
@@ -295,23 +240,29 @@ Point2 CanvasItemEditor::snap_point(Point2 p_target, unsigned int p_modes, const
}
}
- // Self anchors (for sides)
+ // Self anchors
if ((snap_active && snap_node_anchors && (p_modes & SNAP_NODE_ANCHORS)) || (p_forced_modes & SNAP_NODE_ANCHORS)) {
if (const Control *c = Object::cast_to<Control>(p_canvas_item)) {
- begin = p_canvas_item->get_global_transform_with_canvas().xform(_anchor_to_position(c, Point2(c->get_anchor(MARGIN_LEFT), c->get_anchor(MARGIN_TOP))));
- end = p_canvas_item->get_global_transform_with_canvas().xform(_anchor_to_position(c, Point2(c->get_anchor(MARGIN_RIGHT), c->get_anchor(MARGIN_BOTTOM))));
+ Point2 begin = p_canvas_item->get_global_transform_with_canvas().xform(_anchor_to_position(c, Point2(c->get_anchor(MARGIN_LEFT), c->get_anchor(MARGIN_TOP))));
+ Point2 end = p_canvas_item->get_global_transform_with_canvas().xform(_anchor_to_position(c, Point2(c->get_anchor(MARGIN_RIGHT), c->get_anchor(MARGIN_BOTTOM))));
_snap_if_closer_point(p_target, begin, output, snapped, rotation);
_snap_if_closer_point(p_target, end, output, snapped, rotation);
}
}
- // Self sides (for anchors)
+ // Self sides
if ((snap_active && snap_node_sides && (p_modes & SNAP_NODE_SIDES)) || (p_forced_modes & SNAP_NODE_SIDES)) {
- begin = p_canvas_item->get_global_transform_with_canvas().xform(p_canvas_item->_edit_get_rect().get_position());
- end = p_canvas_item->get_global_transform_with_canvas().xform(p_canvas_item->_edit_get_rect().get_position() + p_canvas_item->_edit_get_rect().get_size());
+ Point2 begin = p_canvas_item->get_global_transform_with_canvas().xform(p_canvas_item->_edit_get_rect().get_position());
+ Point2 end = p_canvas_item->get_global_transform_with_canvas().xform(p_canvas_item->_edit_get_rect().get_position() + p_canvas_item->_edit_get_rect().get_size());
_snap_if_closer_point(p_target, begin, output, snapped, rotation);
_snap_if_closer_point(p_target, end, output, snapped, rotation);
}
+
+ // Self center
+ if ((snap_active && snap_node_center && (p_modes & SNAP_NODE_CENTER)) || (p_forced_modes & SNAP_NODE_CENTER)) {
+ Point2 center = p_canvas_item->get_global_transform_with_canvas().xform(p_canvas_item->_edit_get_rect().get_position() + p_canvas_item->_edit_get_rect().get_size() / 2.0);
+ _snap_if_closer_point(p_target, center, output, snapped, rotation);
+ }
}
// Other nodes sides
@@ -340,11 +291,11 @@ Point2 CanvasItemEditor::snap_point(Point2 p_target, unsigned int p_modes, const
// Grid
Point2 offset = grid_offset;
if (snap_relative) {
- List<Node *> selection = editor_selection->get_selected_node_list();
+ List<CanvasItem *> selection = _get_edited_canvas_items();
if (selection.size() == 1 && Object::cast_to<Node2D>(selection[0])) {
offset = Object::cast_to<Node2D>(selection[0])->get_global_position();
- } else {
- offset = _find_topleftmost_point();
+ } else if (selection.size() > 0) {
+ offset = _get_encompassing_rect_from_list(selection).position;
}
}
Point2 grid_output;
@@ -362,7 +313,6 @@ Point2 CanvasItemEditor::snap_point(Point2 p_target, unsigned int p_modes, const
}
float CanvasItemEditor::snap_angle(float p_target, float p_start) const {
- float offset = snap_relative ? p_start : p_target;
return (snap_rotation && snap_rotation_step != 0) ? Math::stepify(p_target - snap_rotation_offset, snap_rotation_step) + snap_rotation_offset : p_target;
}
@@ -377,48 +327,20 @@ void CanvasItemEditor::_unhandled_key_input(const Ref<InputEvent> &p_ev) {
return;
if (k->is_pressed() && !k->is_echo()) {
- if (drag_pivot_shortcut.is_valid() && drag_pivot_shortcut->is_shortcut(p_ev) && drag == DRAG_NONE && can_move_pivot) {
- //move drag pivot
- drag = DRAG_PIVOT;
- } else if (set_pivot_shortcut.is_valid() && set_pivot_shortcut->is_shortcut(p_ev) && drag == DRAG_NONE && can_move_pivot) {
- if (!Input::get_singleton()->is_mouse_button_pressed(0)) {
- List<Node *> selection = editor_selection->get_selected_node_list();
- Vector2 mouse_pos = viewport->get_local_mouse_position();
- if (selection.size() && viewport->get_rect().has_point(mouse_pos)) {
- //just in case, make it work if over viewport
- mouse_pos = transform.affine_inverse().xform(mouse_pos);
- mouse_pos = snap_point(mouse_pos, SNAP_DEFAULT, _get_single_item());
-
- _edit_set_pivot(mouse_pos);
- }
- }
- } else if ((snap_grid || show_grid) && multiply_grid_step_shortcut.is_valid() && multiply_grid_step_shortcut->is_shortcut(p_ev)) {
+ if ((snap_grid || show_grid) && multiply_grid_step_shortcut.is_valid() && multiply_grid_step_shortcut->is_shortcut(p_ev)) {
// Multiply the grid size
grid_step_multiplier = MIN(grid_step_multiplier + 1, 12);
- viewport_base->update();
viewport->update();
} else if ((snap_grid || show_grid) && divide_grid_step_shortcut.is_valid() && divide_grid_step_shortcut->is_shortcut(p_ev)) {
// Divide the grid size
Point2 new_grid_step = grid_step * Math::pow(2.0, grid_step_multiplier - 1);
if (new_grid_step.x >= 1.0 && new_grid_step.y >= 1.0)
grid_step_multiplier--;
- viewport_base->update();
viewport->update();
}
}
}
-void CanvasItemEditor::_tool_select(int p_index) {
-
- ToolButton *tb[TOOL_MAX] = { select_button, list_select_button, move_button, rotate_button, pivot_button, pan_button };
- for (int i = 0; i < TOOL_MAX; i++) {
- tb[i]->set_pressed(i == p_index);
- }
-
- viewport->update();
- tool = (Tool)p_index;
-}
-
Object *CanvasItemEditor::_get_editor_data(Object *p_what) {
CanvasItem *ci = Object::cast_to<CanvasItem>(p_what);
@@ -428,220 +350,109 @@ Object *CanvasItemEditor::_get_editor_data(Object *p_what) {
return memnew(CanvasItemEditorSelectedItem);
}
-Dictionary CanvasItemEditor::get_state() const {
+void CanvasItemEditor::_keying_changed() {
- Dictionary state;
- state["zoom"] = zoom;
- state["ofs"] = Point2(h_scroll->get_value(), v_scroll->get_value());
- //state["ofs"]=-transform.get_origin();
- state["grid_offset"] = grid_offset;
- state["grid_step"] = grid_step;
- state["snap_rotation_offset"] = snap_rotation_offset;
- state["snap_rotation_step"] = snap_rotation_step;
- state["snap_active"] = snap_active;
- state["snap_node_parent"] = snap_node_parent;
- state["snap_node_anchors"] = snap_node_anchors;
- state["snap_node_sides"] = snap_node_sides;
- state["snap_other_nodes"] = snap_other_nodes;
- state["snap_grid"] = snap_grid;
- state["snap_guides"] = snap_guides;
- state["show_grid"] = show_grid;
- state["show_rulers"] = show_rulers;
- state["show_guides"] = show_guides;
- state["show_helpers"] = show_helpers;
- state["snap_rotation"] = snap_rotation;
- state["snap_relative"] = snap_relative;
- state["snap_pixel"] = snap_pixel;
- state["skeleton_show_bones"] = skeleton_show_bones;
- return state;
+ if (AnimationPlayerEditor::singleton->get_key_editor()->is_visible_in_tree())
+ animation_hb->show();
+ else
+ animation_hb->hide();
}
-void CanvasItemEditor::set_state(const Dictionary &p_state) {
- Dictionary state = p_state;
- if (state.has("zoom")) {
- zoom = p_state["zoom"];
- }
+Rect2 CanvasItemEditor::_get_encompassing_rect_from_list(List<CanvasItem *> p_list) {
+ ERR_FAIL_COND_V(p_list.empty(), Rect2());
- if (state.has("ofs")) {
- _update_scrollbars(); // i wonder how safe is calling this here..
- Point2 ofs = p_state["ofs"];
- h_scroll->set_value(ofs.x);
- v_scroll->set_value(ofs.y);
- }
-
- if (state.has("grid_offset")) {
- grid_offset = state["grid_offset"];
- }
-
- if (state.has("grid_step")) {
- grid_step = state["grid_step"];
- }
-
- if (state.has("snap_rotation_step")) {
- snap_rotation_step = state["snap_rotation_step"];
- }
-
- if (state.has("snap_rotation_offset")) {
- snap_rotation_offset = state["snap_rotation_offset"];
- }
+ // Handles the first element
+ CanvasItem *canvas_item = p_list.front()->get();
+ Rect2 rect = Rect2(canvas_item->get_global_transform_with_canvas().xform(canvas_item->_edit_get_rect().position + canvas_item->_edit_get_rect().size / 2), Size2());
- if (state.has("snap_active")) {
- snap_active = state["snap_active"];
- snap_button->set_pressed(snap_active);
- }
-
- if (state.has("snap_node_parent")) {
- snap_node_parent = state["snap_node_parent"];
- int idx = smartsnap_config_popup->get_item_index(SNAP_USE_NODE_PARENT);
- smartsnap_config_popup->set_item_checked(idx, snap_node_parent);
- }
-
- if (state.has("snap_node_anchors")) {
- snap_node_anchors = state["snap_node_anchors"];
- int idx = smartsnap_config_popup->get_item_index(SNAP_USE_NODE_ANCHORS);
- smartsnap_config_popup->set_item_checked(idx, snap_node_anchors);
- }
-
- if (state.has("snap_node_sides")) {
- snap_node_sides = state["snap_node_sides"];
- int idx = smartsnap_config_popup->get_item_index(SNAP_USE_NODE_SIDES);
- smartsnap_config_popup->set_item_checked(idx, snap_node_sides);
- }
-
- if (state.has("snap_other_nodes")) {
- snap_other_nodes = state["snap_other_nodes"];
- int idx = smartsnap_config_popup->get_item_index(SNAP_USE_OTHER_NODES);
- smartsnap_config_popup->set_item_checked(idx, snap_other_nodes);
- }
-
- if (state.has("snap_guides")) {
- snap_guides = state["snap_guides"];
- int idx = smartsnap_config_popup->get_item_index(SNAP_USE_GUIDES);
- smartsnap_config_popup->set_item_checked(idx, snap_guides);
- }
-
- if (state.has("snap_grid")) {
- snap_grid = state["snap_grid"];
- int idx = snap_config_menu->get_popup()->get_item_index(SNAP_USE_GRID);
- snap_config_menu->get_popup()->set_item_checked(idx, snap_grid);
- }
-
- if (state.has("show_grid")) {
- show_grid = state["show_grid"];
- int idx = view_menu->get_popup()->get_item_index(SHOW_GRID);
- view_menu->get_popup()->set_item_checked(idx, show_grid);
- }
-
- if (state.has("show_rulers")) {
- show_rulers = state["show_rulers"];
- int idx = view_menu->get_popup()->get_item_index(SHOW_RULERS);
- view_menu->get_popup()->set_item_checked(idx, show_rulers);
+ // Handles the other ones
+ for (List<CanvasItem *>::Element *E = p_list.front(); E; E = E->next()) {
+ CanvasItem *canvas_item = E->get();
+ Rect2 current_rect = canvas_item->_edit_get_rect();
+ Transform2D xform = canvas_item->get_global_transform_with_canvas();
+ rect.expand_to(xform.xform(current_rect.position));
+ rect.expand_to(xform.xform(current_rect.position + Vector2(current_rect.size.x, 0)));
+ rect.expand_to(xform.xform(current_rect.position + current_rect.size));
+ rect.expand_to(xform.xform(current_rect.position + Vector2(0, current_rect.size.y)));
}
- if (state.has("show_guides")) {
- show_guides = state["show_guides"];
- int idx = view_menu->get_popup()->get_item_index(SHOW_GUIDES);
- view_menu->get_popup()->set_item_checked(idx, show_guides);
- }
+ return rect;
+}
- if (state.has("show_helpers")) {
- show_helpers = state["show_helpers"];
- int idx = view_menu->get_popup()->get_item_index(SHOW_HELPERS);
- view_menu->get_popup()->set_item_checked(idx, show_helpers);
- }
+void CanvasItemEditor::_expand_encompassing_rect_using_children(Rect2 &r_rect, Node *p_node, bool &r_first, const Transform2D &p_parent_xform, const Transform2D &p_canvas_xform) {
+ if (!p_node)
+ return;
+ if (Object::cast_to<Viewport>(p_node))
+ return;
- if (state.has("snap_rotation")) {
- snap_rotation = state["snap_rotation"];
- int idx = snap_config_menu->get_popup()->get_item_index(SNAP_USE_ROTATION);
- snap_config_menu->get_popup()->set_item_checked(idx, snap_rotation);
- }
+ CanvasItem *canvas_item = Object::cast_to<CanvasItem>(p_node);
- if (state.has("snap_relative")) {
- snap_relative = state["snap_relative"];
- int idx = snap_config_menu->get_popup()->get_item_index(SNAP_RELATIVE);
- snap_config_menu->get_popup()->set_item_checked(idx, snap_relative);
- }
+ bool inherited = p_node != get_tree()->get_edited_scene_root() && p_node->get_filename() != "";
+ bool editable = inherited && EditorNode::get_singleton()->get_edited_scene()->is_editable_instance(p_node);
+ bool lock_children = p_node->has_meta("_edit_group_") && p_node->get_meta("_edit_group_");
- if (state.has("snap_pixel")) {
- snap_pixel = state["snap_pixel"];
- int idx = snap_config_menu->get_popup()->get_item_index(SNAP_USE_PIXEL);
- snap_config_menu->get_popup()->set_item_checked(idx, snap_pixel);
+ if (!lock_children && (!inherited || editable)) {
+ for (int i = p_node->get_child_count() - 1; i >= 0; i--) {
+ if (canvas_item && !canvas_item->is_set_as_toplevel()) {
+ _expand_encompassing_rect_using_children(r_rect, p_node->get_child(i), r_first, p_parent_xform * canvas_item->get_transform(), p_canvas_xform);
+ } else {
+ CanvasLayer *canvas_layer = Object::cast_to<CanvasLayer>(p_node);
+ _expand_encompassing_rect_using_children(r_rect, p_node->get_child(i), r_first, Transform2D(), canvas_layer ? canvas_layer->get_transform() : p_canvas_xform);
+ }
+ }
}
- if (state.has("skeleton_show_bones")) {
- skeleton_show_bones = state["skeleton_show_bones"];
- int idx = skeleton_menu->get_popup()->get_item_index(SKELETON_SHOW_BONES);
- skeleton_menu->get_popup()->set_item_checked(idx, skeleton_show_bones);
+ if (canvas_item && canvas_item->is_visible_in_tree() && !canvas_item->has_meta("_edit_lock_")) {
+ Rect2 rect = canvas_item->_edit_get_rect();
+ Transform2D xform = p_parent_xform * p_canvas_xform * canvas_item->get_transform();
+ if (r_first) {
+ r_rect = Rect2(xform.xform(rect.position + rect.size / 2), Size2());
+ r_first = false;
+ }
+ r_rect.expand_to(xform.xform(rect.position));
+ r_rect.expand_to(xform.xform(rect.position + Point2(rect.size.x, 0)));
+ r_rect.expand_to(xform.xform(rect.position + Point2(0, rect.size.y)));
+ r_rect.expand_to(xform.xform(rect.position + rect.size));
}
-
- viewport->update();
-}
-
-void CanvasItemEditor::_add_canvas_item(CanvasItem *p_canvas_item) {
-
- editor_selection->add_node(p_canvas_item);
-}
-
-void CanvasItemEditor::_remove_canvas_item(CanvasItem *p_canvas_item) {
-
- editor_selection->remove_node(p_canvas_item);
-}
-void CanvasItemEditor::_clear_canvas_items() {
-
- editor_selection->clear();
}
-void CanvasItemEditor::_keying_changed() {
-
- if (AnimationPlayerEditor::singleton->get_key_editor()->is_visible_in_tree())
- animation_hb->show();
- else
- animation_hb->hide();
-}
-
-bool CanvasItemEditor::_is_part_of_subscene(CanvasItem *p_item) {
-
- Node *scene_node = get_tree()->get_edited_scene_root();
- Node *item_owner = p_item->get_owner();
-
- return item_owner && item_owner != scene_node && p_item != scene_node && item_owner->get_filename() != "";
+Rect2 CanvasItemEditor::_get_scene_encompassing_rect() {
+ Rect2 rect;
+ bool first = true;
+ _expand_encompassing_rect_using_children(rect, editor->get_edited_scene(), first);
+ return rect;
}
-void CanvasItemEditor::_find_canvas_items_at_pos(const Point2 &p_pos, Node *p_node, const Transform2D &p_parent_xform, const Transform2D &p_canvas_xform, Vector<_SelectResult> &r_items, int limit) {
+void CanvasItemEditor::_find_canvas_items_at_pos(const Point2 &p_pos, Node *p_node, Vector<_SelectResult> &r_items, int limit, const Transform2D &p_parent_xform, const Transform2D &p_canvas_xform) {
if (!p_node)
return;
if (Object::cast_to<Viewport>(p_node))
return;
const real_t grab_distance = EDITOR_DEF("editors/poly_editor/point_grab_radius", 8);
- CanvasItem *c = Object::cast_to<CanvasItem>(p_node);
+ CanvasItem *canvas_item = Object::cast_to<CanvasItem>(p_node);
for (int i = p_node->get_child_count() - 1; i >= 0; i--) {
-
- if (c && !c->is_set_as_toplevel())
- _find_canvas_items_at_pos(p_pos, p_node->get_child(i), p_parent_xform * c->get_transform(), p_canvas_xform, r_items);
+ if (canvas_item && !canvas_item->is_set_as_toplevel())
+ _find_canvas_items_at_pos(p_pos, p_node->get_child(i), r_items, 0, p_parent_xform * canvas_item->get_transform(), p_canvas_xform);
else {
CanvasLayer *cl = Object::cast_to<CanvasLayer>(p_node);
- _find_canvas_items_at_pos(p_pos, p_node->get_child(i), transform, cl ? cl->get_transform() : p_canvas_xform, r_items); //use base transform
+ _find_canvas_items_at_pos(p_pos, p_node->get_child(i), r_items, 0, Transform2D(), cl ? cl->get_transform() : p_canvas_xform); //use base transform
}
-
if (limit != 0 && r_items.size() >= limit)
return;
}
- if (c && c->is_visible_in_tree() && !c->has_meta("_edit_lock_") && !Object::cast_to<CanvasLayer>(c)) {
+ if (canvas_item && canvas_item->is_visible_in_tree() && !canvas_item->has_meta("_edit_lock_")) {
- Rect2 rect = c->_edit_get_rect();
- Transform2D to_local = (p_parent_xform * p_canvas_xform * c->get_transform()).affine_inverse();
- Point2 local_pos = to_local.xform(p_pos);
- const real_t local_grab_distance = (to_local.xform(p_pos + Vector2(grab_distance, 0)) - local_pos).length();
- Rect2 local_pos_rect = Rect2(local_pos, Vector2(0, 0)).grow(local_grab_distance);
+ Transform2D xform = (p_parent_xform * p_canvas_xform * canvas_item->get_transform()).affine_inverse();
+ const real_t local_grab_distance = xform.basis_xform(Vector2(grab_distance, 0)).length();
- if (rect.intersects(local_pos_rect) && c->_edit_is_selected_on_click(local_pos, local_grab_distance)) {
- Node2D *node = Object::cast_to<Node2D>(c);
+ if (canvas_item->_edit_is_selected_on_click(xform.xform(p_pos), local_grab_distance)) {
+ Node2D *node = Object::cast_to<Node2D>(canvas_item);
_SelectResult res;
- res.item = c;
+ res.item = canvas_item;
res.z_index = node ? node->get_z_index() : 0;
res.has_z = node;
r_items.push_back(res);
@@ -651,64 +462,45 @@ void CanvasItemEditor::_find_canvas_items_at_pos(const Point2 &p_pos, Node *p_no
return;
}
-void CanvasItemEditor::_find_canvas_items_at_rect(const Rect2 &p_rect, Node *p_node, const Transform2D &p_parent_xform, const Transform2D &p_canvas_xform, List<CanvasItem *> *r_items) {
-
+void CanvasItemEditor::_find_canvas_items_at_rect(const Rect2 &p_rect, Node *p_node, List<CanvasItem *> *r_items, const Transform2D &p_parent_xform, const Transform2D &p_canvas_xform) {
if (!p_node)
return;
if (Object::cast_to<Viewport>(p_node))
return;
- CanvasItem *c = Object::cast_to<CanvasItem>(p_node);
+ CanvasItem *canvas_item = Object::cast_to<CanvasItem>(p_node);
bool inherited = p_node != get_tree()->get_edited_scene_root() && p_node->get_filename() != "";
- bool editable = false;
- if (inherited) {
- editable = EditorNode::get_singleton()->get_edited_scene()->is_editable_instance(p_node);
- }
+ bool editable = inherited && EditorNode::get_singleton()->get_edited_scene()->is_editable_instance(p_node);
bool lock_children = p_node->has_meta("_edit_group_") && p_node->get_meta("_edit_group_");
+
if (!lock_children && (!inherited || editable)) {
for (int i = p_node->get_child_count() - 1; i >= 0; i--) {
-
- if (c && !c->is_set_as_toplevel())
- _find_canvas_items_at_rect(p_rect, p_node->get_child(i), p_parent_xform * c->get_transform(), p_canvas_xform, r_items);
- else {
- CanvasLayer *cl = Object::cast_to<CanvasLayer>(p_node);
- _find_canvas_items_at_rect(p_rect, p_node->get_child(i), transform, cl ? cl->get_transform() : p_canvas_xform, r_items);
+ if (canvas_item && !canvas_item->is_set_as_toplevel()) {
+ _find_canvas_items_at_rect(p_rect, p_node->get_child(i), r_items, p_parent_xform * canvas_item->get_transform(), p_canvas_xform);
+ } else {
+ CanvasLayer *canvas_layer = Object::cast_to<CanvasLayer>(p_node);
+ _find_canvas_items_at_rect(p_rect, p_node->get_child(i), r_items, Transform2D(), canvas_layer ? canvas_layer->get_transform() : p_canvas_xform);
}
}
}
- if (c && c->is_visible_in_tree() && !c->has_meta("_edit_lock_") && !Object::cast_to<CanvasLayer>(c)) {
+ if (canvas_item && canvas_item->is_visible_in_tree() && !canvas_item->has_meta("_edit_lock_")) {
- Rect2 rect = c->_edit_get_rect();
- Transform2D xform = p_parent_xform * p_canvas_xform * c->get_transform();
+ Rect2 rect = canvas_item->_edit_get_rect();
+ Transform2D xform = p_parent_xform * p_canvas_xform * canvas_item->get_transform();
if (p_rect.has_point(xform.xform(rect.position)) &&
p_rect.has_point(xform.xform(rect.position + Vector2(rect.size.x, 0))) &&
p_rect.has_point(xform.xform(rect.position + Vector2(rect.size.x, rect.size.y))) &&
p_rect.has_point(xform.xform(rect.position + Vector2(0, rect.size.y)))) {
- r_items->push_back(c);
+ r_items->push_back(canvas_item);
}
}
}
-void CanvasItemEditor::_select_click_on_empty_area(Point2 p_click_pos, bool p_append, bool p_box_selection) {
- if (!p_append) {
- editor_selection->clear();
- viewport->update();
- viewport_base->update();
- };
-
- if (p_box_selection) {
- // Start a box selection
- drag_from = transform.affine_inverse().xform(p_click_pos);
- box_selecting = true;
- box_selecting_to = drag_from;
- }
-}
-
-bool CanvasItemEditor::_select_click_on_item(CanvasItem *item, Point2 p_click_pos, bool p_append, bool p_drag) {
+bool CanvasItemEditor::_select_click_on_item(CanvasItem *item, Point2 p_click_pos, bool p_append) {
bool still_selected = true;
if (p_append) {
if (editor_selection->is_selected(item)) {
@@ -717,7 +509,7 @@ bool CanvasItemEditor::_select_click_on_item(CanvasItem *item, Point2 p_click_po
still_selected = false;
} else {
// Add the item to the selection
- _append_canvas_item(item);
+ editor_selection->add_node(item);
}
} else {
if (!editor_selection->is_selected(item)) {
@@ -730,216 +522,33 @@ bool CanvasItemEditor::_select_click_on_item(CanvasItem *item, Point2 p_click_po
}
}
}
-
- if (still_selected && p_drag) {
- // Drag the node(s) if requested
- _prepare_drag(p_click_pos);
- }
-
viewport->update();
- viewport_base->update();
return still_selected;
}
-void CanvasItemEditor::_key_move(const Vector2 &p_dir, bool p_snap, KeyMoveMODE p_move_mode) {
-
- if (drag != DRAG_NONE)
- return;
-
- if (editor_selection->get_selected_node_list().empty())
- return;
-
- undo_redo->create_action(TTR("Move Action"), UndoRedo::MERGE_ENDS);
-
- List<Node *> selection = editor_selection->get_selected_node_list();
-
- for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
- CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
- if (!canvas_item || !canvas_item->is_visible_in_tree())
- continue;
- if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
- continue;
-
- CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item);
- if (!se)
- continue;
-
- if (canvas_item->has_meta("_edit_lock_"))
- continue;
-
- Vector2 drag = p_dir;
- if (p_snap)
- drag *= grid_step * Math::pow(2.0, grid_step_multiplier);
-
- undo_redo->add_undo_method(canvas_item, "_edit_set_state", canvas_item->_edit_get_state());
-
- if (p_move_mode == MOVE_VIEW_BASE) {
-
- // drag = transform.affine_inverse().basis_xform(p_dir); // zoom sensitive
- drag = canvas_item->get_global_transform_with_canvas().affine_inverse().basis_xform(drag);
- Rect2 local_rect = canvas_item->_edit_get_rect();
- local_rect.position += drag;
- undo_redo->add_do_method(canvas_item, "_edit_set_rect", local_rect);
-
- } else { // p_move_mode==MOVE_LOCAL_BASE || p_move_mode==MOVE_LOCAL_WITH_ROT
-
- Node2D *node_2d = Object::cast_to<Node2D>(canvas_item);
- if (node_2d) {
-
- if (p_move_mode == MOVE_LOCAL_WITH_ROT) {
- Transform2D m;
- m.rotate(node_2d->get_rotation());
- drag = m.xform(drag);
- }
- node_2d->set_position(node_2d->get_position() + drag);
-
- } else {
- Control *control = Object::cast_to<Control>(canvas_item);
- if (control)
- control->set_position(control->get_position() + drag);
+List<CanvasItem *> CanvasItemEditor::_get_edited_canvas_items(bool retreive_locked, bool remove_canvas_item_if_parent_in_selection) {
+ List<CanvasItem *> selection;
+ for (Map<Node *, Object *>::Element *E = editor_selection->get_selection().front(); E; E = E->next()) {
+ CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->key());
+ if (canvas_item && canvas_item->is_visible_in_tree() && canvas_item->get_viewport() == EditorNode::get_singleton()->get_scene_root() && (!retreive_locked || !canvas_item->has_meta("_edit_lock_"))) {
+ CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item);
+ if (se) {
+ selection.push_back(canvas_item);
}
}
}
- undo_redo->commit_action();
-}
-
-Point2 CanvasItemEditor::_find_topleftmost_point() {
-
- Vector2 tl = Point2(1e10, 1e10);
- Rect2 r2;
- r2.position = tl;
-
- List<Node *> selection = editor_selection->get_selected_node_list();
-
- for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
- CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
- if (!canvas_item || !canvas_item->is_visible_in_tree())
- continue;
- if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
- continue;
-
- Rect2 rect = canvas_item->_edit_get_rect();
- Transform2D xform = canvas_item->get_global_transform_with_canvas();
-
- r2.expand_to(xform.xform(rect.position));
- r2.expand_to(xform.xform(rect.position + Vector2(rect.size.x, 0)));
- r2.expand_to(xform.xform(rect.position + rect.size));
- r2.expand_to(xform.xform(rect.position + Vector2(0, rect.size.y)));
- }
-
- return r2.position;
-}
-
-int CanvasItemEditor::get_item_count() {
-
- List<Node *> selection = editor_selection->get_selected_node_list();
-
- int ic = 0;
- for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
- CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
- if (!canvas_item || !canvas_item->is_visible_in_tree())
- continue;
-
- if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
- continue;
-
- ic++;
- };
-
- return ic;
-}
-
-CanvasItem *CanvasItemEditor::_get_single_item() {
-
- Map<Node *, Object *> &selection = editor_selection->get_selection();
-
- CanvasItem *single_item = NULL;
-
- for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) {
-
- CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->key());
- if (!canvas_item || !canvas_item->is_visible_in_tree())
- continue;
- if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
- continue;
-
- if (single_item)
- return NULL; //morethan one
-
- single_item = canvas_item;
- };
-
- return single_item;
-}
-
-CanvasItemEditor::DragType CanvasItemEditor::_get_resize_handle_drag_type(const Point2 &p_click, Vector2 &r_point) {
- // Returns a drag type if a resize handle is clicked
- CanvasItem *canvas_item = _get_single_item();
-
- ERR_FAIL_COND_V(!canvas_item, DRAG_NONE);
-
- Rect2 rect = canvas_item->_edit_get_rect();
- Transform2D xforml = canvas_item->get_global_transform_with_canvas();
- Transform2D xform = transform * xforml;
-
- Vector2 endpoints[4] = {
-
- xform.xform(rect.position),
- xform.xform(rect.position + Vector2(rect.size.x, 0)),
- xform.xform(rect.position + rect.size),
- xform.xform(rect.position + Vector2(0, rect.size.y))
- };
-
- Vector2 endpointsl[4] = {
-
- xforml.xform(rect.position),
- xforml.xform(rect.position + Vector2(rect.size.x, 0)),
- xforml.xform(rect.position + rect.size),
- xforml.xform(rect.position + Vector2(0, rect.size.y))
- };
-
- DragType dragger[] = {
- DRAG_TOP_LEFT,
- DRAG_TOP,
- DRAG_TOP_RIGHT,
- DRAG_RIGHT,
- DRAG_BOTTOM_RIGHT,
- DRAG_BOTTOM,
- DRAG_BOTTOM_LEFT,
- DRAG_LEFT
- };
-
- float radius = (select_handle->get_size().width / 2) * 1.5;
-
- for (int i = 0; i < 4; i++) {
-
- int prev = (i + 3) % 4;
- int next = (i + 1) % 4;
-
- r_point = endpointsl[i];
-
- Vector2 ofs = ((endpoints[i] - endpoints[prev]).normalized() + ((endpoints[i] - endpoints[next]).normalized())).normalized();
- ofs *= 1.4144 * (select_handle->get_size().width / 2);
-
- ofs += endpoints[i];
-
- if (ofs.distance_to(p_click) < radius)
- return dragger[i * 2];
-
- ofs = (endpoints[i] + endpoints[next]) / 2;
- ofs += (endpoints[next] - endpoints[i]).tangent().normalized() * (select_handle->get_size().width / 2);
-
- r_point = (endpointsl[i] + endpointsl[next]) / 2;
-
- if (ofs.distance_to(p_click) < radius)
- return dragger[i * 2 + 1];
+ if (remove_canvas_item_if_parent_in_selection) {
+ List<CanvasItem *> filtered_selection;
+ for (List<CanvasItem *>::Element *E = selection.front(); E; E = E->next()) {
+ if (!selection.find(E->get()->get_parent())) {
+ filtered_selection.push_back(E->get());
+ }
+ }
+ return filtered_selection;
+ } else {
+ return selection;
}
-
- return DRAG_NONE;
}
Vector2 CanvasItemEditor::_anchor_to_position(const Control *p_control, Vector2 anchor) {
@@ -958,148 +567,90 @@ Vector2 CanvasItemEditor::_position_to_anchor(const Control *p_control, Vector2
return p_control->get_transform().xform(position) / parent_size;
}
-CanvasItemEditor::DragType CanvasItemEditor::_get_anchor_handle_drag_type(const Point2 &p_click, Vector2 &r_point) {
- // Returns a drag type if an anchor handle is clicked
- CanvasItem *canvas_item = _get_single_item();
- ERR_FAIL_COND_V(!canvas_item, DRAG_NONE);
-
- Control *control = Object::cast_to<Control>(canvas_item);
- ERR_FAIL_COND_V(!control, DRAG_NONE);
-
- Vector2 anchor_pos[4];
- anchor_pos[0] = Vector2(control->get_anchor(MARGIN_LEFT), control->get_anchor(MARGIN_TOP));
- anchor_pos[1] = Vector2(control->get_anchor(MARGIN_RIGHT), control->get_anchor(MARGIN_TOP));
- anchor_pos[2] = Vector2(control->get_anchor(MARGIN_RIGHT), control->get_anchor(MARGIN_BOTTOM));
- anchor_pos[3] = Vector2(control->get_anchor(MARGIN_LEFT), control->get_anchor(MARGIN_BOTTOM));
-
- Rect2 anchor_rects[4];
- for (int i = 0; i < 4; i++) {
- anchor_pos[i] = (transform * control->get_global_transform_with_canvas()).xform(_anchor_to_position(control, anchor_pos[i]));
- anchor_rects[i] = Rect2(anchor_pos[i], anchor_handle->get_size());
- anchor_rects[i].position -= anchor_handle->get_size() * Vector2(i == 0 || i == 3, i <= 1);
- }
-
- DragType dragger[] = {
- DRAG_ANCHOR_TOP_LEFT,
- DRAG_ANCHOR_TOP_RIGHT,
- DRAG_ANCHOR_BOTTOM_RIGHT,
- DRAG_ANCHOR_BOTTOM_LEFT,
- };
+void CanvasItemEditor::_save_canvas_item_state(List<CanvasItem *> p_canvas_items, bool save_bones) {
+ for (List<CanvasItem *>::Element *E = p_canvas_items.front(); E; E = E->next()) {
+ CanvasItem *canvas_item = E->get();
+ CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item);
+ if (se) {
+ se->undo_state = canvas_item->_edit_get_state();
+ se->pre_drag_xform = canvas_item->get_global_transform_with_canvas();
+ se->pre_drag_rect = canvas_item->_edit_get_rect();
+
+ se->pre_drag_bones_length = List<float>();
+ se->pre_drag_bones_undo_state = List<Dictionary>();
+
+ // If we have a bone, save the state of all nodes in the IK chain
+ Node2D *bone = Object::cast_to<Node2D>(canvas_item);
+ if (bone && bone->has_meta("_edit_bone_")) {
+ // Check if we have an IK chain
+ List<Node2D *> bone_ik_list;
+ bool ik_found;
+ bone = Object::cast_to<Node2D>(bone->get_parent());
+ while (bone) {
+ bone_ik_list.push_back(bone);
+ if (bone->has_meta("_edit_ik_")) {
+ ik_found = true;
+ break;
+ } else if (!bone->has_meta("_edit_bone_")) {
+ break;
+ }
+ bone = Object::cast_to<Node2D>(bone->get_parent());
+ }
- for (int i = 0; i < 4; i++) {
- if (anchor_rects[i].has_point(p_click)) {
- r_point = transform.affine_inverse().xform(anchor_pos[i]);
- if ((anchor_pos[0] == anchor_pos[2]) && (anchor_pos[0].distance_to(p_click) < anchor_handle->get_size().length() / 3.0)) {
- return DRAG_ANCHOR_ALL;
- } else {
- return dragger[i];
+ //Save the bone state and lenght if we have an IK chain
+ if (ik_found) {
+ bone = Object::cast_to<Node2D>(canvas_item);
+ Transform2D bone_xform = bone->get_global_transform();
+ for (List<Node2D *>::Element *bone_E = bone_ik_list.front(); bone_E; bone_E = bone_E->next()) {
+ bone_xform = bone_xform * bone->get_transform().affine_inverse();
+ Node2D *parent_bone = bone_E->get();
+ se->pre_drag_bones_length.push_back(parent_bone->get_global_transform().get_origin().distance_to(bone->get_global_position()));
+ se->pre_drag_bones_undo_state.push_back(parent_bone->_edit_get_state());
+ bone = parent_bone;
+ }
+ }
}
}
}
-
- return DRAG_NONE;
}
-void CanvasItemEditor::_prepare_drag(const Point2 &p_click_pos) {
-
- List<Node *> selection = editor_selection->get_selected_node_list();
-
- for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
- CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
- if (!canvas_item || !canvas_item->is_visible_in_tree())
- continue;
- if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
- continue;
-
+void CanvasItemEditor::_restore_canvas_item_state(List<CanvasItem *> p_canvas_items, bool restore_bones) {
+ for (List<CanvasItem *>::Element *E = drag_selection.front(); E; E = E->next()) {
+ CanvasItem *canvas_item = E->get();
CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item);
- if (!se)
- continue;
-
- se->undo_state = canvas_item->_edit_get_state();
- if (Object::cast_to<Node2D>(canvas_item))
- se->undo_pivot = Object::cast_to<Node2D>(canvas_item)->_edit_get_pivot();
- if (Object::cast_to<Control>(canvas_item))
- se->undo_pivot = Object::cast_to<Control>(canvas_item)->get_pivot_offset();
-
- se->pre_drag_xform = canvas_item->get_global_transform_with_canvas();
- se->pre_drag_rect = canvas_item->_edit_get_rect();
- }
-
- if (selection.size() == 1 && Object::cast_to<Node2D>(selection[0]) && bone_ik_list.size() == 0) {
- drag = DRAG_NODE_2D;
- drag_point_from = Object::cast_to<Node2D>(selection[0])->get_global_position();
- } else {
- drag = DRAG_ALL;
- drag_point_from = _find_topleftmost_point();
- }
- drag_from = transform.affine_inverse().xform(p_click_pos);
-}
-
-void CanvasItemEditor::incbeg(float &beg, float &end, float inc, float minsize, bool p_symmetric) {
-
- if (minsize < 0) {
-
- beg += inc;
- if (p_symmetric)
- end -= inc;
- } else {
-
- if (p_symmetric) {
- beg += inc;
- end -= inc;
- if (end - beg < minsize) {
- float center = (beg + end) / 2.0;
- beg = center - minsize / 2.0;
- end = center + minsize / 2.0;
+ canvas_item->_edit_set_state(se->undo_state);
+ if (restore_bones) {
+ for (List<Dictionary>::Element *E = se->pre_drag_bones_undo_state.front(); E; E = E->next()) {
+ canvas_item = Object::cast_to<CanvasItem>(canvas_item->get_parent());
+ canvas_item->_edit_set_state(E->get());
}
-
- } else {
- if (end - (beg + inc) < minsize)
- beg = end - minsize;
- else
- beg += inc;
}
}
}
-void CanvasItemEditor::incend(float &beg, float &end, float inc, float minsize, bool p_symmetric) {
-
- if (minsize < 0) {
-
- end += inc;
- if (p_symmetric)
- beg -= inc;
- } else {
-
- if (p_symmetric) {
-
- end += inc;
- beg -= inc;
- if (end - beg < minsize) {
- float center = (beg + end) / 2.0;
- beg = center - minsize / 2.0;
- end = center + minsize / 2.0;
+void CanvasItemEditor::_commit_canvas_item_state(List<CanvasItem *> p_canvas_items, String action_name, bool commit_bones) {
+ undo_redo->create_action(action_name);
+ for (List<CanvasItem *>::Element *E = p_canvas_items.front(); E; E = E->next()) {
+ CanvasItem *canvas_item = E->get();
+ CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item);
+ undo_redo->add_do_method(canvas_item, "_edit_set_state", canvas_item->_edit_get_state());
+ undo_redo->add_undo_method(canvas_item, "_edit_set_state", se->undo_state);
+ if (commit_bones) {
+ for (List<Dictionary>::Element *E = se->pre_drag_bones_undo_state.front(); E; E = E->next()) {
+ canvas_item = Object::cast_to<CanvasItem>(canvas_item->get_parent());
+ undo_redo->add_do_method(canvas_item, "_edit_set_state", canvas_item->_edit_get_state());
+ undo_redo->add_undo_method(canvas_item, "_edit_set_state", E->get());
}
-
- } else {
- if ((end + inc) - beg < minsize)
- end = beg + minsize;
- else
- end += inc;
}
}
-}
-
-void CanvasItemEditor::_append_canvas_item(CanvasItem *p_item) {
-
- editor_selection->add_node(p_item);
+ undo_redo->add_do_method(viewport, "update");
+ undo_redo->add_undo_method(viewport, "update");
+ undo_redo->commit_action();
}
void CanvasItemEditor::_snap_changed() {
((SnapDialog *)snap_dialog)->get_fields(grid_offset, grid_step, snap_rotation_offset, snap_rotation_step);
grid_step_multiplier = 0;
- viewport_base->update();
viewport->update();
}
@@ -1111,7 +662,7 @@ void CanvasItemEditor::_selection_result_pressed(int p_result) {
CanvasItem *item = selection_results[p_result].item;
if (item)
- _select_click_on_item(item, Point2(), additive_selection, false);
+ _select_click_on_item(item, Point2(), selection_menu_additive_selection);
}
void CanvasItemEditor::_selection_menu_hide() {
@@ -1121,124 +672,16 @@ void CanvasItemEditor::_selection_menu_hide() {
selection_menu->set_size(Vector2(0, 0));
}
-void CanvasItemEditor::_list_select(const Ref<InputEventMouseButton> &b) {
-
- Point2 click = viewport_scrollable->get_transform().affine_inverse().xform(b->get_position());
-
- Node *scene = editor->get_edited_scene();
- if (!scene)
- return;
-
- _find_canvas_items_at_pos(click, scene, transform, Transform2D(), selection_results);
-
- for (int i = 0; i < selection_results.size(); i++) {
- CanvasItem *item = selection_results[i].item;
- if (item != scene && item->get_owner() != scene && !scene->is_editable_instance(item->get_owner())) {
- //invalid result
- selection_results.remove(i);
- i--;
- }
- }
-
- if (selection_results.size() == 1) {
-
- CanvasItem *item = selection_results[0].item;
- selection_results.clear();
-
- additive_selection = b->get_shift();
-
- if (!_select_click_on_item(item, click, additive_selection, false))
- return;
-
- } else if (!selection_results.empty()) {
-
- selection_results.sort();
-
- NodePath root_path = get_tree()->get_edited_scene_root()->get_path();
- StringName root_name = root_path.get_name(root_path.get_name_count() - 1);
-
- for (int i = 0; i < selection_results.size(); i++) {
-
- CanvasItem *item = selection_results[i].item;
-
- Ref<Texture> icon;
- if (item->has_meta("_editor_icon"))
- icon = item->get_meta("_editor_icon");
- else
- icon = get_icon(has_icon(item->get_class(), "EditorIcons") ? item->get_class() : String("Object"), "EditorIcons");
-
- String node_path = "/" + root_name + "/" + root_path.rel_path_to(item->get_path());
-
- selection_menu->add_item(item->get_name());
- selection_menu->set_item_icon(i, icon);
- selection_menu->set_item_metadata(i, node_path);
- selection_menu->set_item_tooltip(i, String(item->get_name()) + "\nType: " + item->get_class() + "\nPath: " + node_path);
- }
-
- additive_selection = b->get_shift();
-
- selection_menu->set_global_position(b->get_global_position());
- selection_menu->popup();
- selection_menu->call_deferred("grab_click_focus");
- selection_menu->set_invalidate_click_until_motion();
-
- return;
- }
-}
-
-void CanvasItemEditor::_update_cursor() {
-
- CursorShape c = CURSOR_ARROW;
- switch (drag) {
- case DRAG_NONE:
- if (Input::get_singleton()->is_mouse_button_pressed(BUTTON_MIDDLE) || Input::get_singleton()->is_key_pressed(KEY_SPACE)) {
- c = CURSOR_DRAG;
- } else {
- switch (tool) {
- case TOOL_MOVE:
- c = CURSOR_MOVE;
- break;
- case TOOL_EDIT_PIVOT:
- c = CURSOR_CROSS;
- break;
- case TOOL_PAN:
- c = CURSOR_DRAG;
- break;
- }
- }
- break;
- case DRAG_LEFT:
- case DRAG_RIGHT:
- c = CURSOR_HSIZE;
- break;
- case DRAG_TOP:
- case DRAG_BOTTOM:
- c = CURSOR_VSIZE;
- break;
- case DRAG_TOP_LEFT:
- case DRAG_BOTTOM_RIGHT:
- c = CURSOR_FDIAGSIZE;
- break;
- case DRAG_TOP_RIGHT:
- case DRAG_BOTTOM_LEFT:
- c = CURSOR_BDIAGSIZE;
- break;
- case DRAG_ALL:
- case DRAG_NODE_2D:
- c = CURSOR_MOVE;
- break;
- }
- viewport->set_default_cursor_shape(c);
-}
-
-void CanvasItemEditor::_gui_input_viewport_base(const Ref<InputEvent> &p_event) {
-
+bool CanvasItemEditor::_gui_input_rulers_and_guides(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseButton> b = p_event;
- if (b.is_valid()) {
- if (b->get_button_index() == BUTTON_LEFT && b->is_pressed()) {
+ Ref<InputEventMouseMotion> m = p_event;
+
+ // Start draging a guide
+ if (drag_type == DRAG_NONE) {
+ if (b.is_valid() && b->get_button_index() == BUTTON_LEFT && b->is_pressed()) {
if (show_guides && show_rulers && EditorNode::get_singleton()->get_edited_scene()) {
Transform2D xform = viewport_scrollable->get_transform() * transform;
- // Retrieve the guide lists
+ // Retreive the guide lists
Array vguides;
if (EditorNode::get_singleton()->get_edited_scene()->has_meta("_edit_vertical_guides_")) {
vguides = EditorNode::get_singleton()->get_edited_scene()->get_meta("_edit_vertical_guides_");
@@ -1251,48 +694,64 @@ void CanvasItemEditor::_gui_input_viewport_base(const Ref<InputEvent> &p_event)
// Press button
if (b->get_position().x < RULER_WIDTH && b->get_position().y < RULER_WIDTH) {
// Drag a new double guide
- drag = DRAG_DOUBLE_GUIDE;
- edited_guide_index = -1;
+ drag_type = DRAG_DOUBLE_GUIDE;
+ dragged_guide_index = -1;
+ return true;
} else if (b->get_position().x < RULER_WIDTH) {
// Check if we drag an existing horizontal guide
float minimum = 1e20;
- edited_guide_index = -1;
+ dragged_guide_index = -1;
for (int i = 0; i < hguides.size(); i++) {
if (ABS(xform.xform(Point2(0, hguides[i])).y - b->get_position().y) < MIN(minimum, 8)) {
- edited_guide_index = i;
+ dragged_guide_index = i;
}
}
- if (edited_guide_index >= 0) {
+ if (dragged_guide_index >= 0) {
// Drag an existing horizontal guide
- drag = DRAG_H_GUIDE;
+ drag_type = DRAG_H_GUIDE;
} else {
// Drag a new vertical guide
- drag = DRAG_V_GUIDE;
+ drag_type = DRAG_V_GUIDE;
}
+ return true;
} else if (b->get_position().y < RULER_WIDTH) {
// Check if we drag an existing vertical guide
float minimum = 1e20;
- edited_guide_index = -1;
+ dragged_guide_index = -1;
for (int i = 0; i < vguides.size(); i++) {
if (ABS(xform.xform(Point2(vguides[i], 0)).x - b->get_position().x) < MIN(minimum, 8)) {
- edited_guide_index = i;
+ dragged_guide_index = i;
}
}
- if (edited_guide_index >= 0) {
+ if (dragged_guide_index >= 0) {
// Drag an existing vertical guide
- drag = DRAG_V_GUIDE;
+ drag_type = DRAG_V_GUIDE;
} else {
// Drag a new vertical guide
- drag = DRAG_H_GUIDE;
+ drag_type = DRAG_H_GUIDE;
}
+ drag_from = xform.affine_inverse().xform(b->get_position());
+ return true;
}
}
}
+ }
- if (b->get_button_index() == BUTTON_LEFT && !b->is_pressed()) {
- // Release button
+ if (drag_type == DRAG_DOUBLE_GUIDE || drag_type == DRAG_V_GUIDE || drag_type == DRAG_H_GUIDE) {
+ // Move the guide
+ if (m.is_valid()) {
+ Transform2D xform = viewport_scrollable->get_transform() * transform;
+ drag_to = xform.affine_inverse().xform(m->get_position());
+
+ dragged_guide_pos = xform.xform(snap_point(drag_to, SNAP_GRID | SNAP_PIXEL | SNAP_OTHER_NODES));
+ viewport->update();
+ return true;
+ }
+
+ // Release confirms the guide move
+ if (b.is_valid() && b->get_button_index() == BUTTON_LEFT && !b->is_pressed()) {
if (show_guides && EditorNode::get_singleton()->get_edited_scene()) {
Transform2D xform = viewport_scrollable->get_transform() * transform;
@@ -1307,65 +766,65 @@ void CanvasItemEditor::_gui_input_viewport_base(const Ref<InputEvent> &p_event)
}
Point2 edited = snap_point(xform.affine_inverse().xform(b->get_position()), SNAP_GRID | SNAP_PIXEL | SNAP_OTHER_NODES);
- if (drag == DRAG_V_GUIDE) {
+ if (drag_type == DRAG_V_GUIDE) {
Array prev_vguides = vguides.duplicate();
if (b->get_position().x > RULER_WIDTH) {
// Adds a new vertical guide
- if (edited_guide_index >= 0) {
- vguides[edited_guide_index] = edited.x;
+ if (dragged_guide_index >= 0) {
+ vguides[dragged_guide_index] = edited.x;
undo_redo->create_action(TTR("Move vertical guide"));
undo_redo->add_do_method(EditorNode::get_singleton()->get_edited_scene(), "set_meta", "_edit_vertical_guides_", vguides);
undo_redo->add_undo_method(EditorNode::get_singleton()->get_edited_scene(), "set_meta", "_edit_vertical_guides_", prev_vguides);
- undo_redo->add_undo_method(viewport_base, "update");
+ undo_redo->add_undo_method(viewport, "update");
undo_redo->commit_action();
} else {
vguides.push_back(edited.x);
undo_redo->create_action(TTR("Create new vertical guide"));
undo_redo->add_do_method(EditorNode::get_singleton()->get_edited_scene(), "set_meta", "_edit_vertical_guides_", vguides);
undo_redo->add_undo_method(EditorNode::get_singleton()->get_edited_scene(), "set_meta", "_edit_vertical_guides_", prev_vguides);
- undo_redo->add_undo_method(viewport_base, "update");
+ undo_redo->add_undo_method(viewport, "update");
undo_redo->commit_action();
}
} else {
- if (edited_guide_index >= 0) {
- vguides.remove(edited_guide_index);
+ if (dragged_guide_index >= 0) {
+ vguides.remove(dragged_guide_index);
undo_redo->create_action(TTR("Remove vertical guide"));
undo_redo->add_do_method(EditorNode::get_singleton()->get_edited_scene(), "set_meta", "_edit_vertical_guides_", vguides);
undo_redo->add_undo_method(EditorNode::get_singleton()->get_edited_scene(), "set_meta", "_edit_vertical_guides_", prev_vguides);
- undo_redo->add_undo_method(viewport_base, "update");
+ undo_redo->add_undo_method(viewport, "update");
undo_redo->commit_action();
}
}
- } else if (drag == DRAG_H_GUIDE) {
+ } else if (drag_type == DRAG_H_GUIDE) {
Array prev_hguides = hguides.duplicate();
if (b->get_position().y > RULER_WIDTH) {
// Adds a new horizontal guide
- if (edited_guide_index >= 0) {
- hguides[edited_guide_index] = edited.y;
+ if (dragged_guide_index >= 0) {
+ hguides[dragged_guide_index] = edited.y;
undo_redo->create_action(TTR("Move horizontal guide"));
undo_redo->add_do_method(EditorNode::get_singleton()->get_edited_scene(), "set_meta", "_edit_horizontal_guides_", hguides);
undo_redo->add_undo_method(EditorNode::get_singleton()->get_edited_scene(), "set_meta", "_edit_horizontal_guides_", prev_hguides);
- undo_redo->add_undo_method(viewport_base, "update");
+ undo_redo->add_undo_method(viewport, "update");
undo_redo->commit_action();
} else {
hguides.push_back(edited.y);
undo_redo->create_action(TTR("Create new horizontal guide"));
undo_redo->add_do_method(EditorNode::get_singleton()->get_edited_scene(), "set_meta", "_edit_horizontal_guides_", hguides);
undo_redo->add_undo_method(EditorNode::get_singleton()->get_edited_scene(), "set_meta", "_edit_horizontal_guides_", prev_hguides);
- undo_redo->add_undo_method(viewport_base, "update");
+ undo_redo->add_undo_method(viewport, "update");
undo_redo->commit_action();
}
} else {
- if (edited_guide_index >= 0) {
- hguides.remove(edited_guide_index);
+ if (dragged_guide_index >= 0) {
+ hguides.remove(dragged_guide_index);
undo_redo->create_action(TTR("Remove horizontal guide"));
undo_redo->add_do_method(EditorNode::get_singleton()->get_edited_scene(), "set_meta", "_edit_horizontal_guides_", hguides);
undo_redo->add_undo_method(EditorNode::get_singleton()->get_edited_scene(), "set_meta", "_edit_horizontal_guides_", prev_hguides);
- undo_redo->add_undo_method(viewport_base, "update");
+ undo_redo->add_undo_method(viewport, "update");
undo_redo->commit_action();
}
}
- } else if (drag == DRAG_DOUBLE_GUIDE) {
+ } else if (drag_type == DRAG_DOUBLE_GUIDE) {
Array prev_hguides = hguides.duplicate();
Array prev_vguides = vguides.duplicate();
if (b->get_position().x > RULER_WIDTH && b->get_position().y > RULER_WIDTH) {
@@ -1377,96 +836,22 @@ void CanvasItemEditor::_gui_input_viewport_base(const Ref<InputEvent> &p_event)
undo_redo->add_do_method(EditorNode::get_singleton()->get_edited_scene(), "set_meta", "_edit_horizontal_guides_", hguides);
undo_redo->add_undo_method(EditorNode::get_singleton()->get_edited_scene(), "set_meta", "_edit_vertical_guides_", prev_vguides);
undo_redo->add_undo_method(EditorNode::get_singleton()->get_edited_scene(), "set_meta", "_edit_horizontal_guides_", prev_hguides);
- undo_redo->add_undo_method(viewport_base, "update");
+ undo_redo->add_undo_method(viewport, "update");
undo_redo->commit_action();
}
}
}
- if (drag == DRAG_DOUBLE_GUIDE || drag == DRAG_V_GUIDE || drag == DRAG_H_GUIDE) {
- drag = DRAG_NONE;
- viewport_base->update();
- }
- }
- }
-
- Ref<InputEventMouseMotion> m = p_event;
- if (m.is_valid()) {
- if (!viewport_base->has_focus() && (!get_focus_owner() || !get_focus_owner()->is_text_field())) {
- viewport_base->call_deferred("grab_focus");
- }
- if (drag == DRAG_DOUBLE_GUIDE || drag == DRAG_H_GUIDE || drag == DRAG_V_GUIDE) {
- Transform2D xform = viewport_scrollable->get_transform() * transform;
- Point2 mouse_pos = m->get_position();
- mouse_pos = xform.affine_inverse().xform(mouse_pos);
- mouse_pos = xform.xform(snap_point(mouse_pos, SNAP_GRID | SNAP_PIXEL | SNAP_OTHER_NODES));
-
- edited_guide_pos = mouse_pos;
- viewport_base->update();
- }
- }
-
- Ref<InputEventKey> k = p_event;
- if (k.is_valid()) {
- if (k->is_pressed() && drag == DRAG_NONE) {
- // Move the object with the arrow keys
- KeyMoveMODE move_mode = MOVE_VIEW_BASE;
- if (k->get_alt()) move_mode = MOVE_LOCAL_BASE;
- if (k->get_control() || k->get_metakey()) move_mode = MOVE_LOCAL_WITH_ROT;
-
- if (k->get_scancode() == KEY_UP)
- _key_move(Vector2(0, -1), k->get_shift(), move_mode);
- else if (k->get_scancode() == KEY_DOWN)
- _key_move(Vector2(0, 1), k->get_shift(), move_mode);
- else if (k->get_scancode() == KEY_LEFT)
- _key_move(Vector2(-1, 0), k->get_shift(), move_mode);
- else if (k->get_scancode() == KEY_RIGHT)
- _key_move(Vector2(1, 0), k->get_shift(), move_mode);
- else if (k->get_scancode() == KEY_ESCAPE) {
- editor_selection->clear();
- viewport->update();
- } else
- return;
-
- accept_event();
+ drag_type = DRAG_NONE;
+ viewport->update();
+ return true;
}
}
+ return false;
}
-void CanvasItemEditor::_gui_input_viewport(const Ref<InputEvent> &p_event) {
-
- {
- EditorNode *en = editor;
- EditorPluginList *over_plugin_list = en->get_editor_plugins_over();
-
- if (!over_plugin_list->empty()) {
- bool discard = over_plugin_list->forward_gui_input(p_event);
- if (discard) {
- accept_event();
- return;
- }
- }
- }
-
- Ref<InputEventMagnifyGesture> magnify_gesture = p_event;
- if (magnify_gesture.is_valid()) {
-
- _zoom_on_position(zoom * magnify_gesture->get_factor(), magnify_gesture->get_position());
- return;
- }
-
- Ref<InputEventPanGesture> pan_gesture = p_event;
- if (pan_gesture.is_valid()) {
-
- const Vector2 delta = (int(EditorSettings::get_singleton()->get("editors/2d/pan_speed")) / zoom) * pan_gesture->get_delta();
- h_scroll->set_value(h_scroll->get_value() + delta.x);
- v_scroll->set_value(v_scroll->get_value() + delta.y);
- return;
- }
-
+bool CanvasItemEditor::_gui_input_zoom_or_pan(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseButton> b = p_event;
if (b.is_valid()) {
- // Button event
-
if (b->get_button_index() == BUTTON_WHEEL_DOWN) {
// Scroll or pan down
if (bool(EditorSettings::get_singleton()->get("editors/2d/scroll_to_pan"))) {
@@ -1476,8 +861,7 @@ void CanvasItemEditor::_gui_input_viewport(const Ref<InputEvent> &p_event) {
} else {
_zoom_on_position(zoom * (1 - (0.05 * b->get_factor())), b->get_position());
}
-
- return;
+ return true;
}
if (b->get_button_index() == BUTTON_WHEEL_UP) {
@@ -1489,768 +873,988 @@ void CanvasItemEditor::_gui_input_viewport(const Ref<InputEvent> &p_event) {
} else {
_zoom_on_position(zoom * ((0.95 + (0.05 * b->get_factor())) / 0.95), b->get_position());
}
-
- return;
+ return true;
}
if (b->get_button_index() == BUTTON_WHEEL_LEFT) {
// Pan left
if (bool(EditorSettings::get_singleton()->get("editors/2d/scroll_to_pan"))) {
-
h_scroll->set_value(h_scroll->get_value() - int(EditorSettings::get_singleton()->get("editors/2d/pan_speed")) / zoom * b->get_factor());
+ return true;
}
}
if (b->get_button_index() == BUTTON_WHEEL_RIGHT) {
// Pan right
if (bool(EditorSettings::get_singleton()->get("editors/2d/scroll_to_pan"))) {
-
h_scroll->set_value(h_scroll->get_value() + int(EditorSettings::get_singleton()->get("editors/2d/pan_speed")) / zoom * b->get_factor());
+ return true;
}
}
+ }
- if (b->get_button_index() == BUTTON_RIGHT) {
+ Ref<InputEventMouseMotion> m = p_event;
+ if (m.is_valid()) {
+ if (drag_type == DRAG_NONE) {
+ if (((m->get_button_mask() & BUTTON_MASK_LEFT) && tool == TOOL_PAN) ||
+ (m->get_button_mask() & BUTTON_MASK_MIDDLE) ||
+ ((m->get_button_mask() & BUTTON_MASK_LEFT) && Input::get_singleton()->is_key_pressed(KEY_SPACE)) ||
+ (EditorSettings::get_singleton()->get("editors/2d/simple_spacebar_panning") && Input::get_singleton()->is_key_pressed(KEY_SPACE))) {
+ // Pan the viewport
+ Point2i relative;
+ if (bool(EditorSettings::get_singleton()->get("editors/2d/warped_mouse_panning"))) {
+ relative = Input::get_singleton()->warp_mouse_motion(m, viewport->get_global_rect());
+ } else {
+ relative = m->get_relative();
+ }
- if (b->is_pressed() && (tool == TOOL_SELECT && b->get_alt())) {
- // Open the selection list
- _list_select(b);
- return;
+ h_scroll->set_value(h_scroll->get_value() - relative.x / zoom);
+ v_scroll->set_value(v_scroll->get_value() - relative.y / zoom);
+ return true;
}
+ }
+ }
- if (get_item_count() > 0 && drag != DRAG_NONE) {
- // Cancel a drag
- if (bone_ik_list.size()) {
- for (List<BoneIK>::Element *E = bone_ik_list.back(); E; E = E->prev()) {
- E->get().node->_edit_set_state(E->get().orig_state);
- }
+ Ref<InputEventMagnifyGesture> magnify_gesture = p_event;
+ if (magnify_gesture.is_valid()) {
+ // Zoom gesture
+ _zoom_on_position(zoom * magnify_gesture->get_factor(), magnify_gesture->get_position());
+ return true;
+ }
- bone_ik_list.clear();
+ Ref<InputEventPanGesture> pan_gesture = p_event;
+ if (pan_gesture.is_valid()) {
+ // Pan gesture
+ const Vector2 delta = (int(EditorSettings::get_singleton()->get("editors/2d/pan_speed")) / zoom) * pan_gesture->get_delta();
+ h_scroll->set_value(h_scroll->get_value() + delta.x);
+ v_scroll->set_value(v_scroll->get_value() + delta.y);
+ return true;
+ }
- } else {
- List<Node *> selection = editor_selection->get_selected_node_list();
-
- for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
- if (!canvas_item || !canvas_item->is_visible_in_tree())
- continue;
- if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
- continue;
-
- CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item);
- if (!se)
- continue;
-
- canvas_item->_edit_set_state(se->undo_state);
- if (Object::cast_to<Node2D>(canvas_item))
- Object::cast_to<Node2D>(canvas_item)->_edit_set_pivot(se->undo_pivot);
- if (Object::cast_to<Control>(canvas_item))
- Object::cast_to<Control>(canvas_item)->set_pivot_offset(se->undo_pivot);
- }
- }
+ return false;
+}
- drag = DRAG_NONE;
- viewport->update();
- can_move_pivot = false;
+bool CanvasItemEditor::_gui_input_pivot(const Ref<InputEvent> &p_event) {
+ Ref<InputEventMouseMotion> m = p_event;
+ Ref<InputEventMouseButton> b = p_event;
+ Ref<InputEventKey> k = p_event;
- } else if (box_selecting) {
- // Cancel box selection
- box_selecting = false;
- viewport->update();
+ // Drag the pivot (in pivot mode / with V key)
+ if (drag_type == DRAG_NONE) {
+ if ((b.is_valid() && b->is_pressed() && b->get_button_index() == BUTTON_LEFT && tool == TOOL_EDIT_PIVOT) ||
+ (k.is_valid() && k->is_pressed() && !k->is_echo() && k->get_scancode() == KEY_V)) {
+ List<CanvasItem *> selection = _get_edited_canvas_items();
+
+ // Filters the selection with nodes that allow setting the pivot
+ drag_selection = List<CanvasItem *>();
+ for (List<CanvasItem *>::Element *E = selection.front(); E; E = E->next()) {
+ CanvasItem *canvas_item = E->get();
+ if (canvas_item->_edit_use_pivot()) {
+ drag_selection.push_back(canvas_item);
+ }
}
- return;
- }
- if (b->get_button_index() == BUTTON_LEFT && tool == TOOL_LIST_SELECT) {
- if (b->is_pressed())
- // Open the selection list
- _list_select(b);
- return;
- }
+ // Start dragging if we still have nodes
+ if (drag_selection.size() > 0) {
+ drag_from = transform.affine_inverse().xform((b.is_valid()) ? b->get_position() : viewport->get_local_mouse_position());
+ Vector2 new_pos;
+ if (drag_selection.size() == 1)
+ new_pos = snap_point(drag_from, SNAP_NODE_SIDES | SNAP_NODE_CENTER | SNAP_NODE_ANCHORS | SNAP_OTHER_NODES | SNAP_GRID | SNAP_PIXEL, drag_selection[0]);
+ else
+ new_pos = snap_point(drag_from, SNAP_OTHER_NODES | SNAP_GRID | SNAP_PIXEL);
+ for (List<CanvasItem *>::Element *E = drag_selection.front(); E; E = E->next()) {
+ CanvasItem *canvas_item = E->get();
+ canvas_item->_edit_set_pivot(canvas_item->get_global_transform_with_canvas().affine_inverse().xform(new_pos));
+ }
- if (b->get_button_index() == BUTTON_LEFT && tool == TOOL_EDIT_PIVOT) {
- if (b->is_pressed()) {
- // Set the pivot point
- Point2 mouse_pos = b->get_position();
- mouse_pos = transform.affine_inverse().xform(mouse_pos);
- mouse_pos = snap_point(mouse_pos, SNAP_DEFAULT, _get_single_item());
- _edit_set_pivot(mouse_pos);
+ drag_type = DRAG_PIVOT;
+ _save_canvas_item_state(drag_selection);
}
- return;
+ return true;
}
+ }
- if (tool == TOOL_PAN || b->get_button_index() != BUTTON_LEFT || Input::get_singleton()->is_key_pressed(KEY_SPACE))
- // Pan the view
- return;
-
- // -- From now we consider that the button is BUTTON_LEFT --
+ if (drag_type == DRAG_PIVOT) {
+ // Move the pivot
+ if (m.is_valid()) {
+ drag_to = transform.affine_inverse().xform(m->get_position());
+ _restore_canvas_item_state(drag_selection);
+ Vector2 new_pos;
+ if (drag_selection.size() == 1)
+ new_pos = snap_point(drag_to, SNAP_NODE_SIDES | SNAP_NODE_CENTER | SNAP_NODE_ANCHORS | SNAP_OTHER_NODES | SNAP_GRID | SNAP_PIXEL, drag_selection[0]);
+ else
+ new_pos = snap_point(drag_to, SNAP_OTHER_NODES | SNAP_GRID | SNAP_PIXEL);
+ for (List<CanvasItem *>::Element *E = drag_selection.front(); E; E = E->next()) {
+ CanvasItem *canvas_item = E->get();
+ canvas_item->_edit_set_pivot(canvas_item->get_global_transform_with_canvas().affine_inverse().xform(new_pos));
+ }
+ return true;
+ }
- if (!b->is_pressed()) {
+ // Confirm the pivot move
+ if ((b.is_valid() && !b->is_pressed() && b->get_button_index() == BUTTON_LEFT && tool == TOOL_EDIT_PIVOT) ||
+ (k.is_valid() && !k->is_pressed() && k->get_scancode() == KEY_V)) {
+ _commit_canvas_item_state(drag_selection, TTR("Move pivot"));
+ drag_type = DRAG_NONE;
+ return true;
+ }
- if (drag != DRAG_NONE) {
- // Stop dragging
- if (undo_redo) {
+ // Cancel a drag
+ if (b.is_valid() && b->get_button_index() == BUTTON_RIGHT && b->is_pressed()) {
+ _restore_canvas_item_state(drag_selection);
+ drag_type = DRAG_NONE;
+ viewport->update();
+ return true;
+ }
+ }
+ return false;
+}
- if (bone_ik_list.size()) {
- undo_redo->create_action(TTR("Edit IK Chain"));
+void CanvasItemEditor::_solve_IK(Node2D *leaf_node, Point2 target_position) {
+ CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(leaf_node);
+ if (se && !se->pre_drag_bones_undo_state.empty()) {
+
+ // Build the node list
+ Point2 leaf_pos = target_position;
+
+ List<Node2D *> joints_list;
+ List<Point2> joints_pos;
+ Node2D *joint = leaf_node;
+ Transform2D joint_transform = leaf_node->get_global_transform_with_canvas();
+ for (int i = 0; i < se->pre_drag_bones_undo_state.size() + 1; i++) {
+ joints_list.push_back(joint);
+ joints_pos.push_back(joint_transform.get_origin());
+ joint_transform = joint_transform * joint->get_transform().affine_inverse();
+ joint = Object::cast_to<Node2D>(joint->get_parent());
+ }
+ Point2 root_pos = joints_list.back()->get()->get_global_transform_with_canvas().get_origin();
- for (List<BoneIK>::Element *E = bone_ik_list.back(); E; E = E->prev()) {
+ // Restraints the node to a maximum distance is necessary
+ float total_len = 0;
+ for (List<float>::Element *E = se->pre_drag_bones_length.front(); E; E = E->next()) {
+ total_len += E->get();
+ }
+ if ((root_pos.distance_to(leaf_pos)) > total_len) {
+ Vector2 rel = leaf_pos - root_pos;
+ rel = rel.normalized() * total_len;
+ leaf_pos = root_pos + rel;
+ }
+ joints_pos[0] = leaf_pos;
+
+ // Run the solver
+ int solver_iterations = 64;
+ float solver_k = 0.3;
+
+ // Build the position list
+ for (int i = 0; i < solver_iterations; i++) {
+ // Handle the leaf joint
+ int node_id = 0;
+ for (List<float>::Element *E = se->pre_drag_bones_length.front(); E; E = E->next()) {
+ Vector2 direction = (joints_pos[node_id + 1] - joints_pos[node_id]).normalized();
+ int len = E->get();
+ if (E == se->pre_drag_bones_length.front()) {
+ joints_pos[1] = joints_pos[1].linear_interpolate(joints_pos[0] + len * direction, solver_k);
+ } else if (E == se->pre_drag_bones_length.back()) {
+ joints_pos[node_id] = joints_pos[node_id].linear_interpolate(joints_pos[node_id + 1] - len * direction, solver_k);
+ } else {
+ Vector2 center = (joints_pos[node_id + 1] + joints_pos[node_id]) / 2.0;
+ joints_pos[node_id] = joints_pos[node_id].linear_interpolate(center - (direction * len) / 2.0, solver_k);
+ joints_pos[node_id + 1] = joints_pos[node_id + 1].linear_interpolate(center + (direction * len) / 2.0, solver_k);
+ }
+ node_id++;
+ }
+ }
- undo_redo->add_do_method(E->get().node, "_edit_set_state", E->get().node->_edit_get_state());
- undo_redo->add_undo_method(E->get().node, "_edit_set_state", E->get().orig_state);
- }
+ // Set the position
+ float total_rot = 0.0f;
+ for (int node_id = joints_list.size() - 1; node_id > 0; node_id--) {
+ Point2 current = (joints_list[node_id - 1]->get_global_position() - joints_list[node_id]->get_global_position()).normalized();
+ Point2 target = (joints_pos[node_id - 1] - joints_list[node_id]->get_global_position()).normalized();
+ float rot = current.angle_to(target);
+ if (joints_list[node_id]->get_global_transform().basis_determinant() < 0) {
+ rot = -rot;
+ }
+ joints_list[node_id]->rotate(rot);
+ total_rot += rot;
+ }
- undo_redo->add_do_method(viewport, "update");
- undo_redo->add_undo_method(viewport, "update");
+ joints_list[0]->rotate(-total_rot);
+ }
+}
- bone_ik_list.clear();
+bool CanvasItemEditor::_gui_input_rotate(const Ref<InputEvent> &p_event) {
+ Ref<InputEventMouseButton> b = p_event;
+ Ref<InputEventMouseMotion> m = p_event;
- undo_redo->commit_action();
- } else {
- undo_redo->create_action(TTR("Edit CanvasItem"));
-
- List<Node *> selection = editor_selection->get_selected_node_list();
-
- for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
- CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
- if (!canvas_item || !canvas_item->is_visible_in_tree())
- continue;
- if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
- continue;
-
- CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item);
- if (!se)
- continue;
-
- Variant state = canvas_item->_edit_get_state();
- undo_redo->add_do_method(canvas_item, "_edit_set_state", state);
- undo_redo->add_undo_method(canvas_item, "_edit_set_state", se->undo_state);
- {
- Node2D *pvt = Object::cast_to<Node2D>(canvas_item);
- if (pvt && pvt->_edit_use_pivot()) {
- undo_redo->add_do_method(canvas_item, "_edit_set_pivot", pvt->_edit_get_pivot());
- undo_redo->add_undo_method(canvas_item, "_edit_set_pivot", se->undo_pivot);
- }
-
- Control *cnt = Object::cast_to<Control>(canvas_item);
- if (cnt) {
- undo_redo->add_do_method(canvas_item, "set_pivot_offset", cnt->get_pivot_offset());
- undo_redo->add_undo_method(canvas_item, "set_pivot_offset", se->undo_pivot);
- }
- }
- }
- undo_redo->commit_action();
- }
+ // Start rotation
+ if (drag_type == DRAG_NONE) {
+ if (b.is_valid() && b->get_button_index() == BUTTON_LEFT && b->is_pressed()) {
+ drag_selection = _get_edited_canvas_items();
+ if (drag_selection.size() > 0 && ((b->get_control() && tool == TOOL_SELECT) || tool == TOOL_ROTATE)) {
+ drag_type = DRAG_ROTATE;
+ drag_from = transform.affine_inverse().xform(b->get_position());
+ CanvasItem *canvas_item = drag_selection[0];
+ if (canvas_item->_edit_use_pivot()) {
+ drag_rotation_center = canvas_item->get_global_transform_with_canvas().xform(canvas_item->_edit_get_pivot());
+ } else {
+ drag_rotation_center = canvas_item->get_global_transform_with_canvas().get_origin();
}
+ _save_canvas_item_state(drag_selection);
+ return true;
+ }
+ }
+ }
- drag = DRAG_NONE;
+ if (drag_type == DRAG_ROTATE) {
+ // Rotate the node
+ if (m.is_valid()) {
+ _restore_canvas_item_state(drag_selection);
+ for (List<CanvasItem *>::Element *E = drag_selection.front(); E; E = E->next()) {
+ CanvasItem *canvas_item = E->get();
+ drag_to = transform.affine_inverse().xform(m->get_position());
+ canvas_item->_edit_set_rotation(snap_angle(canvas_item->_edit_get_rotation() + (drag_from - drag_rotation_center).angle_to(drag_to - drag_rotation_center), canvas_item->_edit_get_rotation()));
viewport->update();
- can_move_pivot = false;
}
+ return true;
+ }
- if (box_selecting) {
- // Stop box selection
- Node *scene = editor->get_edited_scene();
- if (scene) {
-
- List<CanvasItem *> selitems;
-
- Point2 bsfrom = transform.xform(drag_from);
- Point2 bsto = transform.xform(box_selecting_to);
- if (bsfrom.x > bsto.x)
- SWAP(bsfrom.x, bsto.x);
- if (bsfrom.y > bsto.y)
- SWAP(bsfrom.y, bsto.y);
-
- _find_canvas_items_at_rect(Rect2(bsfrom, bsto - bsfrom), scene, transform, Transform2D(), &selitems);
+ // Confirms the node rotation
+ if (b.is_valid() && b->get_button_index() == BUTTON_LEFT && !b->is_pressed()) {
+ _commit_canvas_item_state(drag_selection, TTR("Rotate CanvasItem"));
+ drag_type = DRAG_NONE;
+ return true;
+ }
- for (List<CanvasItem *>::Element *E = selitems.front(); E; E = E->next()) {
+ // Cancel a drag
+ if (b.is_valid() && b->get_button_index() == BUTTON_RIGHT && b->is_pressed()) {
+ _restore_canvas_item_state(drag_selection);
+ drag_type = DRAG_NONE;
+ viewport->update();
+ return true;
+ }
+ }
+ return false;
+}
- _append_canvas_item(E->get());
- }
- }
+bool CanvasItemEditor::_gui_input_open_scene_on_double_click(const Ref<InputEvent> &p_event) {
+ Ref<InputEventMouseButton> b = p_event;
- box_selecting = false;
- viewport->update();
+ // Open a sub-scene on double-click
+ if (b.is_valid() && b->get_button_index() == BUTTON_LEFT && b->is_pressed() && b->is_doubleclick() && tool == TOOL_SELECT) {
+ List<CanvasItem *> selection = _get_edited_canvas_items();
+ if (selection.size() == 1) {
+ CanvasItem *canvas_item = selection[0];
+ if (canvas_item->get_filename() != "" && canvas_item != editor->get_edited_scene()) {
+ editor->open_request(canvas_item->get_filename());
+ return true;
}
- return;
}
+ }
+ return false;
+}
- // -- From now we consider that the button is BUTTON_LEFT and that it is pressed --
+bool CanvasItemEditor::_gui_input_anchors(const Ref<InputEvent> &p_event) {
+ Ref<InputEventMouseButton> b = p_event;
+ Ref<InputEventMouseMotion> m = p_event;
- Map<ObjectID, BoneList>::Element *Cbone = NULL; //closest
+ // Starts anchor dragging if needed
+ if (drag_type == DRAG_NONE) {
+ if (b.is_valid() && b->get_button_index() == BUTTON_LEFT && b->is_pressed() && tool == TOOL_SELECT && show_helpers) {
+ List<CanvasItem *> selection = _get_edited_canvas_items();
+ if (selection.size() == 1) {
+ Control *control = Object::cast_to<Control>(selection[0]);
+ if (control && !Object::cast_to<Container>(control->get_parent())) {
+ Vector2 anchor_pos[4];
+ anchor_pos[0] = Vector2(control->get_anchor(MARGIN_LEFT), control->get_anchor(MARGIN_TOP));
+ anchor_pos[1] = Vector2(control->get_anchor(MARGIN_RIGHT), control->get_anchor(MARGIN_TOP));
+ anchor_pos[2] = Vector2(control->get_anchor(MARGIN_RIGHT), control->get_anchor(MARGIN_BOTTOM));
+ anchor_pos[3] = Vector2(control->get_anchor(MARGIN_LEFT), control->get_anchor(MARGIN_BOTTOM));
- {
- bone_ik_list.clear();
- float closest_dist = 1e20;
- int bone_width = EditorSettings::get_singleton()->get("editors/2d/bone_width");
- for (Map<ObjectID, BoneList>::Element *E = bone_list.front(); E; E = E->next()) {
+ Rect2 anchor_rects[4];
+ for (int i = 0; i < 4; i++) {
+ anchor_pos[i] = (transform * control->get_global_transform_with_canvas()).xform(_anchor_to_position(control, anchor_pos[i]));
+ anchor_rects[i] = Rect2(anchor_pos[i], anchor_handle->get_size());
+ anchor_rects[i].position -= anchor_handle->get_size() * Vector2(i == 0 || i == 3, i <= 1);
+ }
- if (E->get().from == E->get().to)
- continue;
- Vector2 s[2] = {
- E->get().from,
- E->get().to
- };
+ DragType dragger[] = {
+ DRAG_ANCHOR_TOP_LEFT,
+ DRAG_ANCHOR_TOP_RIGHT,
+ DRAG_ANCHOR_BOTTOM_RIGHT,
+ DRAG_ANCHOR_BOTTOM_LEFT,
+ };
- Vector2 p = Geometry::get_closest_point_to_segment_2d(b->get_position(), s);
- float d = p.distance_to(b->get_position());
- if (d < bone_width && d < closest_dist) {
- Cbone = E;
- closest_dist = d;
+ for (int i = 0; i < 4; i++) {
+ if (anchor_rects[i].has_point(b->get_position())) {
+ if ((anchor_pos[0] == anchor_pos[2]) && (anchor_pos[0].distance_to(b->get_position()) < anchor_handle->get_size().length() / 3.0)) {
+ drag_type = DRAG_ANCHOR_ALL;
+ } else {
+ drag_type = dragger[i];
+ }
+ drag_from = transform.affine_inverse().xform(b->get_position());
+ drag_selection = List<CanvasItem *>();
+ drag_selection.push_back(control);
+ _save_canvas_item_state(drag_selection);
+ return true;
+ }
+ }
}
}
+ }
+ }
- if (Cbone) {
- Node2D *b = Object::cast_to<Node2D>(ObjectDB::get_instance(Cbone->get().bone));
+ if (drag_type == DRAG_ANCHOR_TOP_LEFT || drag_type == DRAG_ANCHOR_TOP_RIGHT || drag_type == DRAG_ANCHOR_BOTTOM_RIGHT || drag_type == DRAG_ANCHOR_BOTTOM_LEFT || drag_type == DRAG_ANCHOR_ALL) {
+ // Drag the anchor
+ if (m.is_valid()) {
+ _restore_canvas_item_state(drag_selection);
+ Control *control = Object::cast_to<Control>(drag_selection[0]);
- if (b) {
+ drag_to = transform.affine_inverse().xform(m->get_position());
- bool ik_found = false;
+ Transform2D xform = control->get_global_transform_with_canvas().affine_inverse();
- bool first = true;
+ Point2 previous_anchor;
+ previous_anchor.x = (drag_type == DRAG_ANCHOR_TOP_LEFT || drag_type == DRAG_ANCHOR_BOTTOM_LEFT) ? control->get_anchor(MARGIN_LEFT) : control->get_anchor(MARGIN_RIGHT);
+ previous_anchor.y = (drag_type == DRAG_ANCHOR_TOP_LEFT || drag_type == DRAG_ANCHOR_TOP_RIGHT) ? control->get_anchor(MARGIN_TOP) : control->get_anchor(MARGIN_BOTTOM);
+ previous_anchor = xform.affine_inverse().xform(_anchor_to_position(control, previous_anchor));
- while (b) {
+ Vector2 new_anchor = xform.xform(snap_point(previous_anchor + (drag_to - drag_from), SNAP_GRID | SNAP_OTHER_NODES, control, SNAP_NODE_PARENT | SNAP_NODE_SIDES | SNAP_NODE_CENTER));
+ new_anchor = _position_to_anchor(control, new_anchor).snapped(Vector2(0.001, 0.001));
- CanvasItem *pi = b->get_parent_item();
- if (!pi)
- break;
+ bool use_single_axis = m->get_shift();
+ Vector2 drag_vector = xform.xform(drag_to) - xform.xform(drag_from);
+ bool use_y = Math::abs(drag_vector.y) > Math::abs(drag_vector.x);
- float len = pi->get_global_transform().get_origin().distance_to(b->get_global_position());
- b = Object::cast_to<Node2D>(pi);
- if (!b)
- break;
+ switch (drag_type) {
+ case DRAG_ANCHOR_TOP_LEFT:
+ if (!use_single_axis || (use_single_axis && !use_y)) control->set_anchor(MARGIN_LEFT, new_anchor.x, false, false);
+ if (!use_single_axis || (use_single_axis && use_y)) control->set_anchor(MARGIN_TOP, new_anchor.y, false, false);
+ break;
+ case DRAG_ANCHOR_TOP_RIGHT:
+ if (!use_single_axis || (use_single_axis && !use_y)) control->set_anchor(MARGIN_RIGHT, new_anchor.x, false, false);
+ if (!use_single_axis || (use_single_axis && use_y)) control->set_anchor(MARGIN_TOP, new_anchor.y, false, false);
+ break;
+ case DRAG_ANCHOR_BOTTOM_RIGHT:
+ if (!use_single_axis || (use_single_axis && !use_y)) control->set_anchor(MARGIN_RIGHT, new_anchor.x, false, false);
+ if (!use_single_axis || (use_single_axis && use_y)) control->set_anchor(MARGIN_BOTTOM, new_anchor.y, false, false);
+ break;
+ case DRAG_ANCHOR_BOTTOM_LEFT:
+ if (!use_single_axis || (use_single_axis && !use_y)) control->set_anchor(MARGIN_LEFT, new_anchor.x, false, false);
+ if (!use_single_axis || (use_single_axis && use_y)) control->set_anchor(MARGIN_BOTTOM, new_anchor.y, false, false);
+ break;
+ case DRAG_ANCHOR_ALL:
+ if (!use_single_axis || (use_single_axis && !use_y)) control->set_anchor(MARGIN_LEFT, new_anchor.x, false, true);
+ if (!use_single_axis || (use_single_axis && !use_y)) control->set_anchor(MARGIN_RIGHT, new_anchor.x, false, true);
+ if (!use_single_axis || (use_single_axis && use_y)) control->set_anchor(MARGIN_TOP, new_anchor.y, false, true);
+ if (!use_single_axis || (use_single_axis && use_y)) control->set_anchor(MARGIN_BOTTOM, new_anchor.y, false, true);
+ break;
+ default:
+ break;
+ }
+ return true;
+ }
- if (first) {
+ // Confirms new anchor position
+ if (b.is_valid() && b->get_button_index() == BUTTON_LEFT && !b->is_pressed()) {
+ _commit_canvas_item_state(drag_selection, TTR("Move anchor"));
+ drag_type = DRAG_NONE;
+ return true;
+ }
- bone_orig_xform = b->get_global_transform();
- first = false;
- }
+ // Cancel a drag
+ if (b.is_valid() && b->get_button_index() == BUTTON_RIGHT && b->is_pressed()) {
+ _restore_canvas_item_state(drag_selection);
+ drag_type = DRAG_NONE;
+ viewport->update();
+ return true;
+ }
+ }
+ return false;
+}
- BoneIK bik;
- bik.node = b;
- bik.len = len;
- bik.orig_state = b->_edit_get_state();
+bool CanvasItemEditor::_gui_input_resize(const Ref<InputEvent> &p_event) {
+ Ref<InputEventMouseButton> b = p_event;
+ Ref<InputEventMouseMotion> m = p_event;
- bone_ik_list.push_back(bik);
+ // Drag resize handles
+ if (drag_type == DRAG_NONE) {
+ if (b.is_valid() && b->get_button_index() == BUTTON_LEFT && b->is_pressed() && tool == TOOL_SELECT) {
+ List<CanvasItem *> selection = _get_edited_canvas_items();
+ if (selection.size() == 1) {
+ CanvasItem *canvas_item = selection[0];
+
+ Rect2 rect = canvas_item->_edit_get_rect();
+ Transform2D xform = transform * canvas_item->get_global_transform_with_canvas();
+
+ Vector2 endpoints[4] = {
+ xform.xform(rect.position),
+ xform.xform(rect.position + Vector2(rect.size.x, 0)),
+ xform.xform(rect.position + rect.size),
+ xform.xform(rect.position + Vector2(0, rect.size.y))
+ };
- if (b->has_meta("_edit_ik_")) {
+ DragType dragger[] = {
+ DRAG_TOP_LEFT,
+ DRAG_TOP,
+ DRAG_TOP_RIGHT,
+ DRAG_RIGHT,
+ DRAG_BOTTOM_RIGHT,
+ DRAG_BOTTOM,
+ DRAG_BOTTOM_LEFT,
+ DRAG_LEFT
+ };
- ik_found = bone_ik_list.size() > 1;
- break;
- }
+ DragType resize_drag = DRAG_NONE;
+ float radius = (select_handle->get_size().width / 2) * 1.5;
- if (!pi->has_meta("_edit_bone_"))
- break;
- }
+ for (int i = 0; i < 4; i++) {
+ int prev = (i + 3) % 4;
+ int next = (i + 1) % 4;
- if (!ik_found)
- bone_ik_list.clear();
+ Vector2 ofs = ((endpoints[i] - endpoints[prev]).normalized() + ((endpoints[i] - endpoints[next]).normalized())).normalized();
+ ofs *= (select_handle->get_size().width / 2);
+ ofs += endpoints[i];
+ if (ofs.distance_to(b->get_position()) < radius)
+ resize_drag = dragger[i * 2];
+
+ ofs = (endpoints[i] + endpoints[next]) / 2;
+ ofs += (endpoints[next] - endpoints[i]).tangent().normalized() * (select_handle->get_size().width / 2);
+ if (ofs.distance_to(b->get_position()) < radius)
+ resize_drag = dragger[i * 2 + 1];
+ }
+
+ if (resize_drag != DRAG_NONE) {
+ drag_type = resize_drag;
+ drag_from = transform.affine_inverse().xform(b->get_position());
+ drag_selection = List<CanvasItem *>();
+ drag_selection.push_back(canvas_item);
+ _save_canvas_item_state(drag_selection);
+ return true;
}
}
}
+ }
- // Single selected item
- CanvasItem *canvas_item = _get_single_item();
- if (canvas_item) {
+ if (drag_type == DRAG_LEFT || drag_type == DRAG_RIGHT || drag_type == DRAG_TOP || drag_type == DRAG_BOTTOM ||
+ drag_type == DRAG_TOP_LEFT || drag_type == DRAG_TOP_RIGHT || drag_type == DRAG_BOTTOM_LEFT || drag_type == DRAG_BOTTOM_RIGHT) {
+ // Resize the node
+ if (m.is_valid()) {
+ CanvasItem *canvas_item = drag_selection[0];
CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item);
- ERR_FAIL_COND(!se);
-
- Point2 click = b->get_position();
-
- // Rotation
- if ((b->get_control() && tool == TOOL_SELECT) || tool == TOOL_ROTATE) {
- drag = DRAG_ROTATE;
- drag_from = transform.affine_inverse().xform(click);
- se->undo_state = canvas_item->_edit_get_state();
- if (Object::cast_to<Node2D>(canvas_item))
- se->undo_pivot = Object::cast_to<Node2D>(canvas_item)->_edit_get_pivot();
- if (Object::cast_to<Control>(canvas_item))
- se->undo_pivot = Object::cast_to<Control>(canvas_item)->get_pivot_offset();
- se->pre_drag_xform = canvas_item->get_global_transform_with_canvas();
- se->pre_drag_rect = canvas_item->_edit_get_rect();
- return;
+ //Reset state
+ canvas_item->_edit_set_state(se->undo_state);
+
+ bool uniform = m->get_shift();
+ bool symmetric = m->get_alt();
+
+ Rect2 local_rect = canvas_item->_edit_get_rect();
+ float aspect = local_rect.get_size().y / local_rect.get_size().x;
+ Point2 current_begin = local_rect.get_position();
+ Point2 current_end = local_rect.get_position() + local_rect.get_size();
+ Point2 max_begin = (symmetric) ? (current_begin + current_end - canvas_item->_edit_get_minimum_size()) / 2.0 : current_end - canvas_item->_edit_get_minimum_size();
+ Point2 min_end = (symmetric) ? (current_begin + current_end + canvas_item->_edit_get_minimum_size()) / 2.0 : current_begin + canvas_item->_edit_get_minimum_size();
+ Point2 center = (current_begin + current_end) / 2.0;
+
+ drag_to = transform.affine_inverse().xform(m->get_position());
+
+ Transform2D xform = canvas_item->get_global_transform_with_canvas().affine_inverse();
+
+ Point2 drag_to_snapped_begin = snap_point(xform.affine_inverse().xform(current_begin) + (drag_to - drag_from), SNAP_NODE_ANCHORS | SNAP_NODE_PARENT | SNAP_OTHER_NODES | SNAP_GRID | SNAP_PIXEL, canvas_item);
+ Point2 drag_to_snapped_end = snap_point(xform.affine_inverse().xform(current_end) + (drag_to - drag_from), SNAP_NODE_ANCHORS | SNAP_NODE_PARENT | SNAP_OTHER_NODES | SNAP_GRID | SNAP_PIXEL, canvas_item);
+ Point2 drag_begin = xform.xform(drag_to_snapped_begin);
+ Point2 drag_end = xform.xform(drag_to_snapped_end);
+
+ // Horizontal resize
+ if (drag_type == DRAG_LEFT || drag_type == DRAG_TOP_LEFT || drag_type == DRAG_BOTTOM_LEFT) {
+ current_begin.x = MIN(drag_begin.x, max_begin.x);
+ } else if (drag_type == DRAG_RIGHT || drag_type == DRAG_TOP_RIGHT || drag_type == DRAG_BOTTOM_RIGHT) {
+ current_end.x = MAX(drag_end.x, min_end.x);
}
- if (tool == TOOL_SELECT) {
- // Open a sub-scene on double-click
- if (b->is_doubleclick()) {
- if (canvas_item->get_filename() != "" && canvas_item != editor->get_edited_scene()) {
- editor->open_request(canvas_item->get_filename());
- return;
+ // Vertical resize
+ if (drag_type == DRAG_TOP || drag_type == DRAG_TOP_LEFT || drag_type == DRAG_TOP_RIGHT) {
+ current_begin.y = MIN(drag_begin.y, max_begin.y);
+ } else if (drag_type == DRAG_BOTTOM || drag_type == DRAG_BOTTOM_LEFT || drag_type == DRAG_BOTTOM_RIGHT) {
+ current_end.y = MAX(drag_end.y, min_end.y);
+ }
+
+ // Uniform resize
+ if (uniform) {
+ if (drag_type == DRAG_LEFT || drag_type == DRAG_RIGHT) {
+ current_end.y = current_begin.y + aspect * (current_end.x - current_begin.x);
+ } else if (drag_type == DRAG_TOP || drag_type == DRAG_BOTTOM) {
+ current_end.x = current_begin.x + (current_end.y - current_begin.y) / aspect;
+ } else {
+ if (aspect >= 1.0) {
+ if (drag_type == DRAG_TOP_LEFT || drag_type == DRAG_TOP_RIGHT) {
+ current_begin.y = current_end.y - aspect * (current_end.x - current_begin.x);
+ } else {
+ current_end.y = current_begin.y + aspect * (current_end.x - current_begin.x);
+ }
+ } else {
+ if (drag_type == DRAG_TOP_LEFT || drag_type == DRAG_BOTTOM_LEFT) {
+ current_begin.x = current_end.x - (current_end.y - current_begin.y) / aspect;
+ } else {
+ current_end.x = current_begin.x + (current_end.y - current_begin.y) / aspect;
+ }
}
}
+ }
- // Drag resize handles
- drag = _get_resize_handle_drag_type(click, drag_point_from);
- if (drag != DRAG_NONE) {
- drag_from = transform.affine_inverse().xform(click);
- se->undo_state = canvas_item->_edit_get_state();
- if (Object::cast_to<Node2D>(canvas_item))
- se->undo_pivot = Object::cast_to<Node2D>(canvas_item)->_edit_get_pivot();
- if (Object::cast_to<Control>(canvas_item))
- se->undo_pivot = Object::cast_to<Control>(canvas_item)->get_pivot_offset();
- se->pre_drag_xform = canvas_item->get_global_transform_with_canvas();
- se->pre_drag_rect = canvas_item->_edit_get_rect();
- return;
+ // Symmetric resize
+ if (symmetric) {
+ if (drag_type == DRAG_LEFT || drag_type == DRAG_TOP_LEFT || drag_type == DRAG_BOTTOM_LEFT) {
+ current_end.x = 2.0 * center.x - current_begin.x;
+ } else if (drag_type == DRAG_RIGHT || drag_type == DRAG_TOP_RIGHT || drag_type == DRAG_BOTTOM_RIGHT) {
+ current_begin.x = 2.0 * center.x - current_end.x;
}
-
- // Drag anchor handles
- Control *control = Object::cast_to<Control>(canvas_item);
- if (control && show_helpers && !Object::cast_to<Container>(control->get_parent())) {
- drag = _get_anchor_handle_drag_type(click, drag_point_from);
- if (drag != DRAG_NONE) {
- drag_from = transform.affine_inverse().xform(click);
- se->undo_state = canvas_item->_edit_get_state();
- se->pre_drag_xform = canvas_item->get_global_transform_with_canvas();
- se->pre_drag_rect = canvas_item->_edit_get_rect();
- return;
- }
+ if (drag_type == DRAG_TOP || drag_type == DRAG_TOP_LEFT || drag_type == DRAG_TOP_RIGHT) {
+ current_end.y = 2.0 * center.y - current_begin.y;
+ } else if (drag_type == DRAG_BOTTOM || drag_type == DRAG_BOTTOM_LEFT || drag_type == DRAG_BOTTOM_RIGHT) {
+ current_begin.y = 2.0 * center.y - current_end.y;
}
}
+ canvas_item->_edit_set_rect(Rect2(current_begin, current_end - current_begin));
+ return true;
}
- // Multiple selected items
- Point2 click = b->get_position();
-
- if ((b->get_alt() || tool == TOOL_MOVE) && get_item_count()) {
- // Drag the nodes
- _prepare_drag(click);
+ // Confirm resize
+ if (b.is_valid() && b->get_button_index() == BUTTON_LEFT && !b->is_pressed()) {
+ _commit_canvas_item_state(drag_selection, TTR("Resize CanvasItem"));
+ drag_type = DRAG_NONE;
viewport->update();
- return;
+ return true;
}
- CanvasItem *c = NULL;
- if (Cbone) {
- c = Object::cast_to<CanvasItem>(ObjectDB::get_instance(Cbone->get().bone));
- if (c)
- c = c->get_parent_item();
+ // Cancel a drag
+ if (b.is_valid() && b->get_button_index() == BUTTON_RIGHT && b->is_pressed()) {
+ _restore_canvas_item_state(drag_selection);
+ drag_type = DRAG_NONE;
+ viewport->update();
+ return true;
}
+ }
+ return false;
+}
- Node *scene = editor->get_edited_scene();
- if (!scene)
- return;
- // Find the item to select
- if (!c) {
- Vector<_SelectResult> selection;
- _find_canvas_items_at_pos(click, scene, transform, Transform2D(), selection, 1);
- if (!selection.empty())
- c = selection[0].item;
+bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) {
+ Ref<InputEventMouseButton> b = p_event;
+ Ref<InputEventMouseMotion> m = p_event;
+ Ref<InputEventKey> k = p_event;
- CanvasItem *cn = c;
- while (cn) {
- if (cn->has_meta("_edit_group_")) {
- c = cn;
- }
- cn = cn->get_parent_item();
+ if (drag_type == DRAG_NONE) {
+ //Start moving the nodes
+ if (b.is_valid() && b->get_button_index() == BUTTON_LEFT && b->is_pressed()) {
+ List<CanvasItem *> selection = _get_edited_canvas_items();
+ if ((b->get_alt() || tool == TOOL_MOVE) && selection.size() > 0) {
+ drag_type = DRAG_ALL;
+ drag_from = transform.affine_inverse().xform(b->get_position());
+ drag_selection = selection;
+ _save_canvas_item_state(drag_selection);
+ return true;
}
}
+ }
- Node *n = c;
- while ((n && n != scene && n->get_owner() != scene) || (n && !n->is_class("CanvasItem"))) {
- n = n->get_parent();
- };
+ if (drag_type == DRAG_ALL) {
+ // Move the nodes
+ if (m.is_valid()) {
+ _restore_canvas_item_state(drag_selection, true);
- if (n) {
- c = Object::cast_to<CanvasItem>(n);
- } else {
- c = NULL;
- }
+ drag_to = transform.affine_inverse().xform(m->get_position());
+ Point2 previous_pos;
+ if (drag_selection.size() == 1) {
+ Transform2D xform = drag_selection[0]->get_global_transform_with_canvas() * drag_selection[0]->get_transform().affine_inverse();
+ previous_pos = xform.xform(drag_selection[0]->_edit_get_position());
+ } else {
+ previous_pos = _get_encompassing_rect_from_list(drag_selection).position;
+ }
+ Point2 new_pos = snap_point(previous_pos + (drag_to - drag_from), SNAP_GRID | SNAP_GUIDES | SNAP_PIXEL | SNAP_NODE_PARENT | SNAP_NODE_ANCHORS | SNAP_OTHER_NODES);
+ bool single_axis = m->get_shift();
+ if (single_axis) {
+ if (ABS(new_pos.x - previous_pos.x) > ABS(new_pos.y - previous_pos.y)) {
+ new_pos.y = previous_pos.y;
+ } else {
+ new_pos.x = previous_pos.x;
+ }
+ }
- // Select the item
- additive_selection = b->get_shift();
- if (!c) {
- _select_click_on_empty_area(click, additive_selection, true);
- } else if (!_select_click_on_item(c, click, additive_selection, true)) {
- return;
+ bool force_no_IK = m->get_alt();
+ for (List<CanvasItem *>::Element *E = drag_selection.front(); E; E = E->next()) {
+ CanvasItem *canvas_item = E->get();
+ CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item);
+ Transform2D xform = canvas_item->get_global_transform_with_canvas().affine_inverse() * canvas_item->get_transform();
+
+ Node2D *node2d = Object::cast_to<Node2D>(canvas_item);
+ if (node2d && se->pre_drag_bones_undo_state.size() > 0 && !force_no_IK) {
+ _solve_IK(node2d, new_pos);
+ } else {
+ canvas_item->_edit_set_position(canvas_item->_edit_get_position() + xform.xform(new_pos) - xform.xform(previous_pos));
+ }
+ }
+ return true;
}
- }
- Ref<InputEventMouseMotion> m = p_event;
- if (m.is_valid()) {
- // Mouse motion event
- _update_cursor();
+ // Confirm the move (only if it was moved)
+ if (b.is_valid() && !b->is_pressed() && b->get_button_index() == BUTTON_LEFT && (drag_type == DRAG_ALL)) {
+ if (transform.affine_inverse().xform(b->get_position()) != drag_from) {
+ _commit_canvas_item_state(drag_selection, TTR("Move CanvasItem"), true);
+ }
- if (box_selecting) {
- // Update box selection
- box_selecting_to = transform.affine_inverse().xform(m->get_position());
+ drag_type = DRAG_NONE;
viewport->update();
- return;
+ return true;
}
- if (drag == DRAG_NONE) {
- bool space_pressed = Input::get_singleton()->is_key_pressed(KEY_SPACE);
- bool simple_panning = EditorSettings::get_singleton()->get("editors/2d/simple_spacebar_panning");
- int button = m->get_button_mask();
+ // Cancel a drag
+ if (b.is_valid() && b->get_button_index() == BUTTON_RIGHT && b->is_pressed()) {
+ _restore_canvas_item_state(drag_selection, true);
+ drag_type = DRAG_NONE;
+ viewport->update();
+ return true;
+ }
+ }
- // Check if any of the panning triggers are activated
- bool panning_tool = (button & BUTTON_MASK_LEFT) && tool == TOOL_PAN;
- bool panning_middle_button = button & BUTTON_MASK_MIDDLE;
- bool panning_spacebar = (button & BUTTON_MASK_LEFT) && space_pressed;
- bool panning_spacebar_simple = space_pressed && simple_panning;
+ // Move the canvas items with the arrow keys
+ if (k.is_valid() && k->is_pressed() && tool == TOOL_SELECT &&
+ (k->get_scancode() == KEY_UP || k->get_scancode() == KEY_DOWN || k->get_scancode() == KEY_LEFT || k->get_scancode() == KEY_RIGHT)) {
+ if (!k->is_echo()) {
+ // Start moving the canvas items with the keyboard
+ drag_selection = _get_edited_canvas_items();
+ drag_type = DRAG_KEY_MOVE;
+ drag_from = Vector2();
+ drag_to = Vector2();
+ _save_canvas_item_state(drag_selection, true);
+ }
- if (panning_tool || panning_middle_button || panning_spacebar || panning_spacebar_simple) {
- // Pan the viewport
- Point2i relative;
- if (bool(EditorSettings::get_singleton()->get("editors/2d/warped_mouse_panning"))) {
- relative = Input::get_singleton()->warp_mouse_motion(m, viewport->get_global_rect());
- } else {
- relative = m->get_relative();
- }
+ _restore_canvas_item_state(drag_selection, true);
+
+ bool move_local_base = k->get_alt();
+ bool move_local_base_rotated = k->get_control() || k->get_metakey();
+
+ Vector2 dir;
+ if (k->get_scancode() == KEY_UP)
+ dir += Vector2(0, -1);
+ else if (k->get_scancode() == KEY_DOWN)
+ dir += Vector2(0, 1);
+ else if (k->get_scancode() == KEY_LEFT)
+ dir += Vector2(-1, 0);
+ else if (k->get_scancode() == KEY_RIGHT)
+ dir += Vector2(1, 0);
+ if (k->get_shift())
+ dir *= grid_step * Math::pow(2.0, grid_step_multiplier);
+
+ drag_to += dir;
+ if (k->get_shift())
+ drag_to = drag_to.snapped(grid_step * Math::pow(2.0, grid_step_multiplier));
+
+ Point2 previous_pos;
+ if (drag_selection.size() == 1) {
+ Transform2D xform = drag_selection[0]->get_global_transform_with_canvas() * drag_selection[0]->get_transform().affine_inverse();
+ previous_pos = xform.xform(drag_selection[0]->_edit_get_position());
+ } else {
+ previous_pos = _get_encompassing_rect_from_list(drag_selection).position;
+ }
- h_scroll->set_value(h_scroll->get_value() - relative.x / zoom);
- v_scroll->set_value(v_scroll->get_value() - relative.y / zoom);
+ Point2 new_pos;
+ if (drag_selection.size() == 1) {
+ Node2D *node_2d = Object::cast_to<Node2D>(drag_selection[0]);
+ if (node_2d && move_local_base_rotated) {
+ Transform2D m;
+ m.rotate(node_2d->get_rotation());
+ new_pos += m.xform(drag_to);
+ } else if (move_local_base) {
+ new_pos += drag_to;
+ } else {
+ new_pos = previous_pos + (drag_to - drag_from);
}
-
- return;
+ } else {
+ new_pos = previous_pos + (drag_to - drag_from);
}
- List<Node *> selection = editor_selection->get_selected_node_list();
- for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
- CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
- if (!canvas_item || !canvas_item->is_visible_in_tree())
- continue;
- if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
- continue;
-
+ for (List<CanvasItem *>::Element *E = drag_selection.front(); E; E = E->next()) {
+ CanvasItem *canvas_item = E->get();
CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item);
- if (!se)
- continue;
-
- bool dragging_bone = drag == DRAG_ALL && selection.size() == 1 && bone_ik_list.size();
+ Transform2D xform = canvas_item->get_global_transform_with_canvas().affine_inverse() * canvas_item->get_transform();
- if (!dragging_bone) {
- canvas_item->_edit_set_state(se->undo_state); //reset state and reapply
- if (Object::cast_to<Node2D>(canvas_item))
- Object::cast_to<Node2D>(canvas_item)->_edit_set_pivot(se->undo_pivot);
- if (Object::cast_to<Control>(canvas_item))
- Object::cast_to<Control>(canvas_item)->set_pivot_offset(se->undo_pivot);
+ Node2D *node2d = Object::cast_to<Node2D>(canvas_item);
+ if (node2d && se->pre_drag_bones_undo_state.size() > 0) {
+ _solve_IK(node2d, new_pos);
+ } else {
+ canvas_item->_edit_set_position(canvas_item->_edit_get_position() + xform.xform(new_pos) - xform.xform(previous_pos));
}
+ }
+ return true;
+ }
- Vector2 dfrom = drag_from;
- Vector2 dto = transform.affine_inverse().xform(m->get_position());
- if (canvas_item->has_meta("_edit_lock_"))
- continue;
+ if (k.is_valid() && !k->is_pressed() && drag_type == DRAG_KEY_MOVE && tool == TOOL_SELECT &&
+ (k->get_scancode() == KEY_UP || k->get_scancode() == KEY_DOWN || k->get_scancode() == KEY_LEFT || k->get_scancode() == KEY_RIGHT)) {
+ // Confirm canvas items move by arrow keys
+ if ((!Input::get_singleton()->is_key_pressed(KEY_UP)) &&
+ (!Input::get_singleton()->is_key_pressed(KEY_DOWN)) &&
+ (!Input::get_singleton()->is_key_pressed(KEY_LEFT)) &&
+ (!Input::get_singleton()->is_key_pressed(KEY_RIGHT))) {
+ _commit_canvas_item_state(drag_selection, TTR("Move CanvasItem"), true);
+ drag_type = DRAG_NONE;
+ }
+ viewport->update();
+ return true;
+ }
- if (drag == DRAG_ROTATE) {
- // Rotate the node
- Vector2 center = canvas_item->get_global_transform_with_canvas().get_origin();
- {
- Node2D *node = Object::cast_to<Node2D>(canvas_item);
-
- if (node) {
- real_t angle = node->get_rotation();
- node->set_rotation(snap_angle(angle + (dfrom - center).angle_to(dto - center), angle));
- display_rotate_to = dto;
- display_rotate_from = center;
- viewport->update();
- }
- }
+ if (k.is_valid() && (k->get_scancode() == KEY_UP || k->get_scancode() == KEY_DOWN || k->get_scancode() == KEY_LEFT || k->get_scancode() == KEY_RIGHT)) {
+ // Accept the key event in any case
+ return true;
+ }
+ return false;
+}
- {
- Control *node = Object::cast_to<Control>(canvas_item);
+bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) {
+ Ref<InputEventMouseButton> b = p_event;
+ Ref<InputEventMouseMotion> m = p_event;
+ Ref<InputEventKey> k = p_event;
- if (node) {
- real_t angle = node->get_rotation();
- display_rotate_to = dto;
- display_rotate_from = center + node->get_pivot_offset().rotated(angle);
- node->set_rotation(snap_angle(angle + (dfrom - display_rotate_from).angle_to(display_rotate_to - display_rotate_from), angle));
- viewport->update();
- }
+ if (drag_type == DRAG_NONE) {
+ if (b.is_valid() &&
+ ((b->get_button_index() == BUTTON_LEFT && b->get_alt() && tool == TOOL_SELECT) ||
+ (b->get_button_index() == BUTTON_LEFT && tool == TOOL_LIST_SELECT))) {
+ // Popup the selection menu list
+ Point2 click = transform.xform(b->get_position());
+
+ Node *scene = editor->get_edited_scene();
+
+ _find_canvas_items_at_pos(click, scene, selection_results);
+ for (int i = 0; i < selection_results.size(); i++) {
+ CanvasItem *item = selection_results[i].item;
+ if (item != scene && item->get_owner() != scene && !scene->is_editable_instance(item->get_owner())) {
+ //invalid result
+ selection_results.remove(i);
+ i--;
}
-
- continue;
}
- bool uniform = m->get_shift();
- bool symmetric = m->get_alt();
+ if (selection_results.size() == 1) {
+ CanvasItem *item = selection_results[0].item;
+ selection_results.clear();
- Vector2 drag_vector =
- canvas_item->get_global_transform_with_canvas().affine_inverse().xform(dto) -
- canvas_item->get_global_transform_with_canvas().affine_inverse().xform(dfrom);
-
- switch (drag) {
- case DRAG_ALL:
- case DRAG_NODE_2D:
- dto -= drag_from - drag_point_from;
- if (uniform) {
- if (ABS(dto.x - drag_point_from.x) > ABS(dto.y - drag_point_from.y)) {
- dto.y = drag_point_from.y;
- } else {
- dto.x = drag_point_from.x;
- }
- }
- break;
- }
+ _select_click_on_item(item, click, b->get_shift());
- Control *control = Object::cast_to<Control>(canvas_item);
- if (control) {
- // Drag and snap the anchor
- Transform2D c_trans_rev = canvas_item->get_global_transform_with_canvas().affine_inverse();
+ return true;
+ } else if (!selection_results.empty()) {
+ selection_results.sort();
- Vector2 anchor = c_trans_rev.xform(dto - drag_from + drag_point_from);
- anchor = _position_to_anchor(control, anchor);
+ NodePath root_path = get_tree()->get_edited_scene_root()->get_path();
+ StringName root_name = root_path.get_name(root_path.get_name_count() - 1);
- Vector2 anchor_snapped = c_trans_rev.xform(snap_point(dto - drag_from + drag_point_from, SNAP_GRID | SNAP_GUIDES | SNAP_OTHER_NODES, _get_single_item(), SNAP_NODE_PARENT | SNAP_NODE_SIDES));
- anchor_snapped = _position_to_anchor(control, anchor_snapped).snapped(Vector2(0.00001, 0.00001));
+ for (int i = 0; i < selection_results.size(); i++) {
+ CanvasItem *item = selection_results[i].item;
- bool use_y = Math::abs(drag_vector.y) > Math::abs(drag_vector.x);
+ Ref<Texture> icon;
+ if (item->has_meta("_editor_icon"))
+ icon = item->get_meta("_editor_icon");
+ else
+ icon = get_icon(has_icon(item->get_class(), "EditorIcons") ? item->get_class() : String("Object"), "EditorIcons");
+ String node_path = "/" + root_name + "/" + root_path.rel_path_to(item->get_path());
- switch (drag) {
- case DRAG_ANCHOR_TOP_LEFT:
- if (!uniform || (uniform && !use_y)) control->set_anchor(MARGIN_LEFT, anchor_snapped.x, false);
- if (!uniform || (uniform && use_y)) control->set_anchor(MARGIN_TOP, anchor_snapped.y, false);
- continue;
- break;
- case DRAG_ANCHOR_TOP_RIGHT:
- if (!uniform || (uniform && !use_y)) control->set_anchor(MARGIN_RIGHT, anchor_snapped.x, false);
- if (!uniform || (uniform && use_y)) control->set_anchor(MARGIN_TOP, anchor_snapped.y, false);
- continue;
- break;
- case DRAG_ANCHOR_BOTTOM_RIGHT:
- if (!uniform || (uniform && !use_y)) control->set_anchor(MARGIN_RIGHT, anchor_snapped.x, false);
- if (!uniform || (uniform && use_y)) control->set_anchor(MARGIN_BOTTOM, anchor_snapped.y, false);
- break;
- case DRAG_ANCHOR_BOTTOM_LEFT:
- if (!uniform || (uniform && !use_y)) control->set_anchor(MARGIN_LEFT, anchor_snapped.x, false);
- if (!uniform || (uniform && use_y)) control->set_anchor(MARGIN_BOTTOM, anchor_snapped.y, false);
- continue;
- break;
- case DRAG_ANCHOR_ALL:
- if (!uniform || (uniform && !use_y)) control->set_anchor(MARGIN_LEFT, anchor_snapped.x, false);
- if (!uniform || (uniform && !use_y)) control->set_anchor(MARGIN_RIGHT, anchor_snapped.x, false);
- if (!uniform || (uniform && use_y)) control->set_anchor(MARGIN_TOP, anchor_snapped.y, false);
- if (!uniform || (uniform && use_y)) control->set_anchor(MARGIN_BOTTOM, anchor_snapped.y, false);
- continue;
- break;
+ selection_menu->add_item(item->get_name());
+ selection_menu->set_item_icon(i, icon);
+ selection_menu->set_item_metadata(i, node_path);
+ selection_menu->set_item_tooltip(i, String(item->get_name()) + "\nType: " + item->get_class() + "\nPath: " + node_path);
}
- }
-
- dfrom = drag_point_from;
- dto = snap_point(dto, SNAP_NODE_ANCHORS | SNAP_NODE_PARENT | SNAP_OTHER_NODES | SNAP_GRID | SNAP_GUIDES | SNAP_PIXEL, _get_single_item());
- drag_vector =
- canvas_item->get_global_transform_with_canvas().affine_inverse().xform(dto) -
- canvas_item->get_global_transform_with_canvas().affine_inverse().xform(dfrom);
-
- Rect2 local_rect = canvas_item->_edit_get_rect();
- Vector2 begin = local_rect.position;
- Vector2 end = local_rect.position + local_rect.size;
- Vector2 minsize = canvas_item->_edit_get_minimum_size();
-
- if (uniform) {
- // Keep the height/width ratio of the item
- float aspect = local_rect.size.aspect();
- switch (drag) {
- case DRAG_LEFT:
- drag_vector.y = -drag_vector.x / aspect;
- break;
- case DRAG_RIGHT:
- drag_vector.y = drag_vector.x / aspect;
- break;
- case DRAG_TOP:
- drag_vector.x = -drag_vector.y * aspect;
- break;
- case DRAG_BOTTOM:
- drag_vector.x = drag_vector.y * aspect;
- break;
- case DRAG_BOTTOM_LEFT:
- case DRAG_TOP_RIGHT:
- if (aspect > 1.0) { // width > height, take x as reference
- drag_vector.y = -drag_vector.x / aspect;
- } else { // height > width, take y as reference
- drag_vector.x = -drag_vector.y * aspect;
- }
- break;
- case DRAG_BOTTOM_RIGHT:
- case DRAG_TOP_LEFT:
- if (aspect > 1.0) { // width > height, take x as reference
- drag_vector.y = drag_vector.x / aspect;
- } else { // height > width, take y as reference
- drag_vector.x = drag_vector.y * aspect;
- }
- break;
- }
- } else {
- switch (drag) {
- case DRAG_RIGHT:
- case DRAG_LEFT:
- drag_vector.y = 0;
- break;
- case DRAG_TOP:
- case DRAG_BOTTOM:
- drag_vector.x = 0;
- break;
- }
+ selection_menu_additive_selection = b->get_shift();
+ selection_menu->set_global_position(b->get_global_position());
+ selection_menu->popup();
+ selection_menu->call_deferred("grab_click_focus");
+ selection_menu->set_invalidate_click_until_motion();
+ return true;
}
+ }
- switch (drag) {
- case DRAG_ALL:
- begin += drag_vector;
- end += drag_vector;
- break;
- case DRAG_RIGHT:
- case DRAG_BOTTOM:
- case DRAG_BOTTOM_RIGHT:
- incend(begin.x, end.x, drag_vector.x, minsize.x, symmetric);
- incend(begin.y, end.y, drag_vector.y, minsize.y, symmetric);
- break;
- case DRAG_TOP_LEFT:
- incbeg(begin.x, end.x, drag_vector.x, minsize.x, symmetric);
- incbeg(begin.y, end.y, drag_vector.y, minsize.y, symmetric);
- break;
- case DRAG_TOP:
- case DRAG_TOP_RIGHT:
- incbeg(begin.y, end.y, drag_vector.y, minsize.y, symmetric);
- incend(begin.x, end.x, drag_vector.x, minsize.x, symmetric);
- break;
- case DRAG_LEFT:
- case DRAG_BOTTOM_LEFT:
- incbeg(begin.x, end.x, drag_vector.x, minsize.x, symmetric);
- incend(begin.y, end.y, drag_vector.y, minsize.y, symmetric);
- break;
+ if (b.is_valid() && b->get_button_index() == BUTTON_LEFT && b->is_pressed() && tool == TOOL_SELECT) {
+ // Single item selection
+ Point2 click = transform.affine_inverse().xform(b->get_position());
- case DRAG_PIVOT:
+ Node *scene = editor->get_edited_scene();
+ if (!scene)
+ return true;
- if (Object::cast_to<Node2D>(canvas_item)) {
- Node2D *n2d = Object::cast_to<Node2D>(canvas_item);
- n2d->_edit_set_pivot(se->undo_pivot + drag_vector);
- }
- if (Object::cast_to<Control>(canvas_item)) {
- Object::cast_to<Control>(canvas_item)->set_pivot_offset(se->undo_pivot + drag_vector);
- }
- continue;
- break;
- case DRAG_NODE_2D:
+ // Find the item to select
+ CanvasItem *canvas_item = NULL;
+ Vector<_SelectResult> selection;
+ _find_canvas_items_at_pos(click, scene, selection, 1);
+ if (!selection.empty())
+ canvas_item = selection[0].item;
- ERR_FAIL_COND(!Object::cast_to<Node2D>(canvas_item));
- Object::cast_to<Node2D>(canvas_item)->set_global_position(dto);
- continue;
- break;
+ // Check if the canvas item is in a group, and select the group instead if it is the case
+ CanvasItem *canvas_item_tmp = canvas_item;
+ while (canvas_item_tmp) {
+ if (canvas_item->has_meta("_edit_group_")) {
+ canvas_item = canvas_item_tmp;
+ }
+ canvas_item_tmp = canvas_item_tmp->get_parent_item();
}
- if (!dragging_bone) {
+ // Make sure the selected node is in the current scene
+ Node *node = canvas_item;
+ while (node && ((node != scene && node->get_owner() != scene) || !node->is_class("CanvasItem"))) {
+ node = node->get_parent();
+ };
+ canvas_item = Object::cast_to<CanvasItem>(node);
- local_rect.position = begin;
- local_rect.size = end - begin;
- canvas_item->_edit_set_rect(local_rect);
+ if (!canvas_item) {
+ // Start a box selection
+ if (!b->get_shift()) {
+ // Clear the selection if not additive
+ editor_selection->clear();
+ viewport->update();
+ };
+ drag_from = click;
+ drag_type = DRAG_BOX_SELECTION;
+ box_selecting_to = drag_from;
+ return true;
} else {
- //ok, all that had to be done was done, now solve IK
-
- Node2D *n2d = Object::cast_to<Node2D>(canvas_item);
- Transform2D final_xform = bone_orig_xform;
-
- if (n2d) {
-
- float total_len = 0;
- for (List<BoneIK>::Element *E = bone_ik_list.front(); E; E = E->next()) {
- if (E->prev())
- total_len += E->get().len;
- E->get().pos = E->get().node->get_global_transform().get_origin();
- }
-
- {
-
- final_xform.elements[2] += dto - dfrom; //final_xform.affine_inverse().basis_xform_inv(drag_vector);
- //n2d->set_global_transform(final_xform);
- }
-
- CanvasItem *last = bone_ik_list.back()->get().node;
- if (!last)
- break;
-
- Vector2 root_pos = last->get_global_transform().get_origin();
- Vector2 leaf_pos = final_xform.get_origin();
-
- if ((leaf_pos.distance_to(root_pos)) > total_len) {
- //oops dude you went too far
- //print_line("TOO FAR!");
- Vector2 rel = leaf_pos - root_pos;
- rel = rel.normalized() * total_len;
- leaf_pos = root_pos + rel;
- }
-
- bone_ik_list.front()->get().pos = leaf_pos;
-
- //print_line("BONE IK LIST "+itos(bone_ik_list.size()));
-
- if (bone_ik_list.size() > 2) {
- int solver_iterations = 64;
- float solver_k = 0.3;
-
- for (int i = 0; i < solver_iterations; i++) {
-
- for (List<BoneIK>::Element *E = bone_ik_list.front(); E; E = E->next()) {
-
- if (E == bone_ik_list.back()) {
-
- break;
- }
-
- float len = E->next()->get().len;
-
- if (E->next() == bone_ik_list.back()) {
-
- //print_line("back");
+ bool still_selected = _select_click_on_item(canvas_item, click, b->get_shift());
+ // Start dragging
+ if (still_selected) {
+ // Drag the node(s) if requested
+ List<CanvasItem *> selection = _get_edited_canvas_items();
+
+ drag_type = DRAG_ALL;
+ drag_selection = selection;
+ drag_from = click;
+ _save_canvas_item_state(drag_selection);
+ }
+ // Select the item
+ return true;
+ }
+ }
+ }
- Vector2 rel = E->get().pos - E->next()->get().pos;
- //print_line("PREV "+E->get().pos);
- Vector2 desired = E->next()->get().pos + rel.normalized() * len;
- //print_line("DESIRED "+desired);
- E->get().pos = E->get().pos.linear_interpolate(desired, solver_k);
- //print_line("POST "+E->get().pos);
+ if (drag_type == DRAG_BOX_SELECTION) {
+ if (b.is_valid() && !b->is_pressed() && b->get_button_index() == BUTTON_LEFT) {
+ // Confirms box selection
+ Node *scene = editor->get_edited_scene();
+ if (scene) {
+ List<CanvasItem *> selitems;
- } else if (E == bone_ik_list.front()) {
- //only adjust parent
- //print_line("front");
- Vector2 rel = E->next()->get().pos - E->get().pos;
- //print_line("PREV "+E->next()->get().pos);
- Vector2 desired = E->get().pos + rel.normalized() * len;
- //print_line("DESIRED "+desired);
- E->next()->get().pos = E->next()->get().pos.linear_interpolate(desired, solver_k);
- //print_line("POST "+E->next()->get().pos);
- } else {
+ Point2 bsfrom = drag_from;
+ Point2 bsto = box_selecting_to;
+ if (bsfrom.x > bsto.x)
+ SWAP(bsfrom.x, bsto.x);
+ if (bsfrom.y > bsto.y)
+ SWAP(bsfrom.y, bsto.y);
- Vector2 rel = E->next()->get().pos - E->get().pos;
- Vector2 cen = (E->next()->get().pos + E->get().pos) * 0.5;
- rel = rel.linear_interpolate(rel.normalized() * len, solver_k);
- rel *= 0.5;
- E->next()->get().pos = cen + rel;
- E->get().pos = cen - rel;
- //print_line("mid");
- }
- }
- }
- }
+ _find_canvas_items_at_rect(Rect2(bsfrom, bsto - bsfrom), scene, &selitems);
+ for (List<CanvasItem *>::Element *E = selitems.front(); E; E = E->next()) {
+ editor_selection->add_node(E->get());
}
+ }
- for (List<BoneIK>::Element *E = bone_ik_list.back(); E; E = E->prev()) {
+ drag_type = DRAG_NONE;
+ viewport->update();
+ return true;
+ }
- Node2D *n = E->get().node;
+ if (b.is_valid() && b->is_pressed() && b->get_button_index() == BUTTON_RIGHT) {
+ // Cancel box selection
+ drag_type = DRAG_NONE;
+ viewport->update();
+ return true;
+ }
- if (!E->prev()) {
- //last goes to what it was
- final_xform.set_origin(n->get_global_position());
- n->set_global_transform(final_xform);
+ if (m.is_valid()) {
+ // Update box selection
+ box_selecting_to = transform.affine_inverse().xform(m->get_position());
+ viewport->update();
+ return true;
+ }
+ }
- } else {
- Vector2 rel = (E->prev()->get().node->get_global_position() - n->get_global_position()).normalized();
- Vector2 rel2 = (E->prev()->get().pos - E->get().pos).normalized();
- float rot = rel.angle_to(rel2);
- if (n->get_global_transform().basis_determinant() < 0) {
- //mirrored, rotate the other way
- rot = -rot;
- }
+ if (k.is_valid() && k->is_pressed() && k->get_scancode() == KEY_ESCAPE && drag_type == DRAG_NONE && tool == TOOL_SELECT) {
+ // Unselect everything
+ editor_selection->clear();
+ viewport->update();
+ }
+ return false;
+}
- n->rotate(rot);
- }
+void CanvasItemEditor::_gui_input_viewport(const Ref<InputEvent> &p_event) {
+ bool accepted = false;
+ if ((accepted = _gui_input_rulers_and_guides(p_event))) {
+ //printf("Rulers and guides\n");
+ } else if ((accepted = editor->get_editor_plugins_over()->forward_gui_input(p_event))) {
+ //printf("Plugin\n");
+ } else if ((accepted = _gui_input_open_scene_on_double_click(p_event))) {
+ //printf("Open scene on double click\n");
+ } else if ((accepted = _gui_input_anchors(p_event))) {
+ //printf("Anchors\n");
+ } else if ((accepted = _gui_input_pivot(p_event))) {
+ //printf("Set pivot\n");
+ } else if ((accepted = _gui_input_resize(p_event))) {
+ //printf("Resize\n");
+ } else if ((accepted = _gui_input_rotate(p_event))) {
+ //printf("Rotate\n");
+ } else if ((accepted = _gui_input_move(p_event))) {
+ //printf("Move\n");
+ } else if ((accepted = _gui_input_select(p_event))) {
+ //printf("Selection\n");
+ } else if ((accepted = _gui_input_zoom_or_pan(p_event))) {
+ //printf("Zoom or pan\n");
+ }
+
+ if (accepted)
+ accept_event();
+
+ // Change the cursor
+ CursorShape c = CURSOR_ARROW;
+ switch (drag_type) {
+ case DRAG_NONE:
+ if (Input::get_singleton()->is_mouse_button_pressed(BUTTON_MIDDLE) || Input::get_singleton()->is_key_pressed(KEY_SPACE)) {
+ c = CURSOR_DRAG;
+ } else {
+ switch (tool) {
+ case TOOL_MOVE:
+ c = CURSOR_MOVE;
+ break;
+ case TOOL_EDIT_PIVOT:
+ c = CURSOR_CROSS;
+ break;
+ case TOOL_PAN:
+ c = CURSOR_DRAG;
+ break;
+ default:
+ break;
}
-
- break;
}
- }
+ break;
+ case DRAG_LEFT:
+ case DRAG_RIGHT:
+ c = CURSOR_HSIZE;
+ break;
+ case DRAG_TOP:
+ case DRAG_BOTTOM:
+ c = CURSOR_VSIZE;
+ break;
+ case DRAG_TOP_LEFT:
+ case DRAG_BOTTOM_RIGHT:
+ c = CURSOR_FDIAGSIZE;
+ break;
+ case DRAG_TOP_RIGHT:
+ case DRAG_BOTTOM_LEFT:
+ c = CURSOR_BDIAGSIZE;
+ break;
+ case DRAG_ALL:
+ c = CURSOR_MOVE;
+ break;
+ default:
+ break;
+ }
+ viewport->set_default_cursor_shape(c);
+
+ // Grab focus
+ if (!viewport->has_focus() && (!get_focus_owner() || !get_focus_owner()->is_text_field())) {
+ viewport->call_deferred("grab_focus");
}
}
@@ -2292,8 +1896,8 @@ void CanvasItemEditor::_draw_percentage_at_position(float p_value, Point2 p_posi
void CanvasItemEditor::_draw_focus() {
// Draw the focus around the base viewport
- if (viewport_base->has_focus()) {
- get_stylebox("Focus", "EditorStyles")->draw(viewport_base->get_canvas_item(), Rect2(Point2(), viewport_base->get_size()));
+ if (viewport->has_focus()) {
+ get_stylebox("Focus", "EditorStyles")->draw(viewport->get_canvas_item(), Rect2(Point2(), viewport->get_size()));
}
}
@@ -2306,63 +1910,61 @@ void CanvasItemEditor::_draw_guides() {
if (EditorNode::get_singleton()->get_edited_scene() && EditorNode::get_singleton()->get_edited_scene()->has_meta("_edit_vertical_guides_")) {
Array vguides = EditorNode::get_singleton()->get_edited_scene()->get_meta("_edit_vertical_guides_");
for (int i = 0; i < vguides.size(); i++) {
- if (drag == DRAG_V_GUIDE && i == edited_guide_index)
+ if (drag_type == DRAG_V_GUIDE && i == dragged_guide_index)
continue;
float x = xform.xform(Point2(vguides[i], 0)).x;
- viewport_base->draw_line(Point2(x, 0), Point2(x, viewport_base->get_size().y), guide_color);
+ viewport->draw_line(Point2(x, 0), Point2(x, viewport->get_size().y), guide_color);
}
}
if (EditorNode::get_singleton()->get_edited_scene() && EditorNode::get_singleton()->get_edited_scene()->has_meta("_edit_horizontal_guides_")) {
Array hguides = EditorNode::get_singleton()->get_edited_scene()->get_meta("_edit_horizontal_guides_");
for (int i = 0; i < hguides.size(); i++) {
- if (drag == DRAG_H_GUIDE && i == edited_guide_index)
+ if (drag_type == DRAG_H_GUIDE && i == dragged_guide_index)
continue;
float y = xform.xform(Point2(0, hguides[i])).y;
- viewport_base->draw_line(Point2(0, y), Point2(viewport_base->get_size().x, y), guide_color);
+ viewport->draw_line(Point2(0, y), Point2(viewport->get_size().x, y), guide_color);
}
}
// Dragged guide
Color text_color = get_color("font_color", "Editor");
text_color.a = 0.5;
- if (drag == DRAG_DOUBLE_GUIDE || drag == DRAG_V_GUIDE) {
- String str = vformat("%d px", xform.affine_inverse().xform(edited_guide_pos).x);
+ if (drag_type == DRAG_DOUBLE_GUIDE || drag_type == DRAG_V_GUIDE) {
+ String str = vformat("%d px", xform.affine_inverse().xform(dragged_guide_pos).x);
Ref<Font> font = get_font("font", "Label");
Size2 text_size = font->get_string_size(str);
- viewport_base->draw_string(font, Point2(edited_guide_pos.x + 10, RULER_WIDTH + text_size.y / 2 + 10), str, text_color);
- viewport_base->draw_line(Point2(edited_guide_pos.x, 0), Point2(edited_guide_pos.x, viewport_base->get_size().y), guide_color);
+ viewport->draw_string(font, Point2(dragged_guide_pos.x + 10, RULER_WIDTH + text_size.y / 2 + 10), str, text_color);
+ viewport->draw_line(Point2(dragged_guide_pos.x, 0), Point2(dragged_guide_pos.x, viewport->get_size().y), guide_color);
}
- if (drag == DRAG_DOUBLE_GUIDE || drag == DRAG_H_GUIDE) {
- String str = vformat("%d px", xform.affine_inverse().xform(edited_guide_pos).y);
+ if (drag_type == DRAG_DOUBLE_GUIDE || drag_type == DRAG_H_GUIDE) {
+ String str = vformat("%d px", xform.affine_inverse().xform(dragged_guide_pos).y);
Ref<Font> font = get_font("font", "Label");
Size2 text_size = font->get_string_size(str);
- viewport_base->draw_string(font, Point2(RULER_WIDTH + 10, edited_guide_pos.y + text_size.y / 2 + 10), str, text_color);
- viewport_base->draw_line(Point2(0, edited_guide_pos.y), Point2(viewport_base->get_size().x, edited_guide_pos.y), guide_color);
+ viewport->draw_string(font, Point2(RULER_WIDTH + 10, dragged_guide_pos.y + text_size.y / 2 + 10), str, text_color);
+ viewport->draw_line(Point2(0, dragged_guide_pos.y), Point2(viewport->get_size().x, dragged_guide_pos.y), guide_color);
}
}
void CanvasItemEditor::_draw_rulers() {
- Color graduation_color = get_color("font_color", "Editor");
- graduation_color.a = 0.5;
Color bg_color = get_color("dark_color_2", "Editor");
+ Color graduation_color = get_color("font_color", "Editor").linear_interpolate(bg_color, 0.5);
Color font_color = get_color("font_color", "Editor");
font_color.a = 0.8;
Ref<Font> font = get_font("rulers", "EditorFonts");
// The rule transform
- Transform2D ruler_transform;
- if (show_grid || snap_grid) {
- ruler_transform = Transform2D();
- if (snap_relative && get_item_count() > 0) {
- ruler_transform.translate(_find_topleftmost_point());
+ Transform2D ruler_transform = Transform2D();
+ if (show_grid || (snap_active && snap_grid)) {
+ List<CanvasItem *> selection = _get_edited_canvas_items();
+ if (snap_relative && selection.size() > 0) {
+ ruler_transform.translate(_get_encompassing_rect_from_list(selection).position);
ruler_transform.scale_basis(grid_step * Math::pow(2.0, grid_step_multiplier));
} else {
ruler_transform.translate(grid_offset);
ruler_transform.scale_basis(grid_step * Math::pow(2.0, grid_step_multiplier));
}
while ((transform * ruler_transform).get_scale().x < 50 || (transform * ruler_transform).get_scale().y < 50) {
-
ruler_transform.scale_basis(Point2(2, 2));
}
} else {
@@ -2373,7 +1975,6 @@ void CanvasItemEditor::_draw_rulers() {
for (int i = 0; basic_rule * zoom < 100; i++) {
basic_rule *= (i % 2) ? 2.0 : 5.0;
}
- ruler_transform = Transform2D();
ruler_transform.scale(Size2(basic_rule, basic_rule));
}
@@ -2387,43 +1988,43 @@ void CanvasItemEditor::_draw_rulers() {
minor_subdivide.scale(Size2(1.0 / minor_subdivision, 1.0 / minor_subdivision));
// First and last graduations to draw (in the ruler space)
- Point2 first = (transform * ruler_transform * major_subdivide * minor_subdivide).affine_inverse().xform(Point2());
+ Point2 first = (transform * ruler_transform * major_subdivide * minor_subdivide).affine_inverse().xform(Point2(RULER_WIDTH, RULER_WIDTH));
Point2 last = (transform * ruler_transform * major_subdivide * minor_subdivide).affine_inverse().xform(viewport->get_size());
// Draw top ruler
- viewport_base->draw_rect(Rect2(Point2(RULER_WIDTH, 0), Size2(viewport->get_size().x, RULER_WIDTH)), bg_color);
+ viewport->draw_rect(Rect2(Point2(RULER_WIDTH, 0), Size2(viewport->get_size().x, RULER_WIDTH)), bg_color);
for (int i = Math::ceil(first.x); i < last.x; i++) {
Point2 position = (transform * ruler_transform * major_subdivide * minor_subdivide).xform(Point2(i, 0));
if (i % (major_subdivision * minor_subdivision) == 0) {
- viewport_base->draw_line(Point2(position.x + RULER_WIDTH, 0), Point2(position.x + RULER_WIDTH, RULER_WIDTH), graduation_color);
+ viewport->draw_line(Point2(position.x, 0), Point2(position.x, RULER_WIDTH), graduation_color);
float val = (ruler_transform * major_subdivide * minor_subdivide).xform(Point2(i, 0)).x;
- viewport_base->draw_string(font, Point2(position.x + RULER_WIDTH + 2, font->get_height()), vformat(((int)val == val) ? "%d" : "%.1f", val), font_color);
+ viewport->draw_string(font, Point2(position.x + 2, font->get_height()), vformat(((int)val == val) ? "%d" : "%.1f", val), font_color);
} else {
if (i % minor_subdivision == 0) {
- viewport_base->draw_line(Point2(position.x + RULER_WIDTH, RULER_WIDTH * 0.33), Point2(position.x + RULER_WIDTH, RULER_WIDTH), graduation_color);
+ viewport->draw_line(Point2(position.x, RULER_WIDTH * 0.33), Point2(position.x, RULER_WIDTH), graduation_color);
} else {
- viewport_base->draw_line(Point2(position.x + RULER_WIDTH, RULER_WIDTH * 0.66), Point2(position.x + RULER_WIDTH, RULER_WIDTH), graduation_color);
+ viewport->draw_line(Point2(position.x, RULER_WIDTH * 0.66), Point2(position.x, RULER_WIDTH), graduation_color);
}
}
}
// Draw left ruler
- viewport_base->draw_rect(Rect2(Point2(0, RULER_WIDTH), Size2(RULER_WIDTH, viewport->get_size().y)), bg_color);
+ viewport->draw_rect(Rect2(Point2(0, RULER_WIDTH), Size2(RULER_WIDTH, viewport->get_size().y)), bg_color);
for (int i = Math::ceil(first.y); i < last.y; i++) {
Point2 position = (transform * ruler_transform * major_subdivide * minor_subdivide).xform(Point2(0, i));
if (i % (major_subdivision * minor_subdivision) == 0) {
- viewport_base->draw_line(Point2(0, position.y + RULER_WIDTH), Point2(RULER_WIDTH, position.y + RULER_WIDTH), graduation_color);
+ viewport->draw_line(Point2(0, position.y), Point2(RULER_WIDTH, position.y), graduation_color);
float val = (ruler_transform * major_subdivide * minor_subdivide).xform(Point2(0, i)).y;
- viewport_base->draw_string(font, Point2(2, position.y + RULER_WIDTH + 2 + font->get_height()), vformat(((int)val == val) ? "%d" : "%.1f", val), font_color);
+ viewport->draw_string(font, Point2(2, position.y + 2 + font->get_height()), vformat(((int)val == val) ? "%d" : "%.1f", val), font_color);
} else {
if (i % minor_subdivision == 0) {
- viewport_base->draw_line(Point2(RULER_WIDTH * 0.33, position.y + RULER_WIDTH), Point2(RULER_WIDTH, position.y + RULER_WIDTH), graduation_color);
+ viewport->draw_line(Point2(RULER_WIDTH * 0.33, position.y), Point2(RULER_WIDTH, position.y), graduation_color);
} else {
- viewport_base->draw_line(Point2(RULER_WIDTH * 0.66, position.y + RULER_WIDTH), Point2(RULER_WIDTH, position.y + RULER_WIDTH), graduation_color);
+ viewport->draw_line(Point2(RULER_WIDTH * 0.66, position.y), Point2(RULER_WIDTH, position.y), graduation_color);
}
}
}
- viewport_base->draw_rect(Rect2(Point2(), Size2(RULER_WIDTH, RULER_WIDTH)), graduation_color);
+ viewport->draw_rect(Rect2(Point2(), Size2(RULER_WIDTH, RULER_WIDTH)), graduation_color);
}
void CanvasItemEditor::_draw_grid() {
@@ -2434,8 +2035,9 @@ void CanvasItemEditor::_draw_grid() {
Transform2D xform = transform.affine_inverse();
Vector2 real_grid_offset;
- if (snap_relative && get_item_count() > 0) {
- Vector2 topleft = _find_topleftmost_point();
+ List<CanvasItem *> selection = _get_edited_canvas_items();
+ if (snap_relative && selection.size() > 0) {
+ Vector2 topleft = _get_encompassing_rect_from_list(selection).position;
real_grid_offset.x = fmod(topleft.x, grid_step.x * (real_t)Math::pow(2.0, grid_step_multiplier));
real_grid_offset.y = fmod(topleft.y, grid_step.y * (real_t)Math::pow(2.0, grid_step_multiplier));
} else {
@@ -2468,26 +2070,23 @@ void CanvasItemEditor::_draw_grid() {
}
void CanvasItemEditor::_draw_selection() {
- bool pivot_found = false;
Ref<Texture> pivot_icon = get_icon("EditorPivot", "EditorIcons");
- bool single = _get_single_item() != NULL;
RID ci = viewport->get_canvas_item();
- Map<Node *, Object *> &selection = editor_selection->get_selection();
- for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) {
+ List<CanvasItem *> selection = _get_edited_canvas_items(false, false);
- CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->key());
- if (!canvas_item || !canvas_item->is_visible_in_tree())
- continue;
- if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
- continue;
+ bool single = selection.size() == 1;
+ for (List<CanvasItem *>::Element *E = selection.front(); E; E = E->next()) {
+ CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item);
- if (!se)
- continue;
Rect2 rect = canvas_item->_edit_get_rect();
- if (show_helpers && drag != DRAG_NONE && drag != DRAG_PIVOT) {
+ // Draw the previous position if we are dragging the node
+ if (show_helpers &&
+ (drag_type == DRAG_ALL || drag_type == DRAG_ROTATE ||
+ drag_type == DRAG_LEFT || drag_type == DRAG_RIGHT || drag_type == DRAG_TOP || drag_type == DRAG_BOTTOM ||
+ drag_type == DRAG_TOP_LEFT || drag_type == DRAG_TOP_RIGHT || drag_type == DRAG_BOTTOM_LEFT || drag_type == DRAG_BOTTOM_RIGHT)) {
const Transform2D pre_drag_xform = transform * se->pre_drag_xform;
const Color pre_drag_color = Color(0.4, 0.6, 1, 0.7);
@@ -2507,8 +2106,8 @@ void CanvasItemEditor::_draw_selection() {
Transform2D xform = transform * canvas_item->get_global_transform_with_canvas();
VisualServer::get_singleton()->canvas_item_add_set_transform(ci, xform);
+ // Draw the selected items surrounding boxes
Vector2 endpoints[4] = {
-
xform.xform(rect.position),
xform.xform(rect.position + Vector2(rect.size.x, 0)),
xform.xform(rect.position + rect.size),
@@ -2524,25 +2123,13 @@ void CanvasItemEditor::_draw_selection() {
}
if (single && (tool == TOOL_SELECT || tool == TOOL_MOVE || tool == TOOL_ROTATE || tool == TOOL_EDIT_PIVOT)) { //kind of sucks
-
- Node2D *node2d = Object::cast_to<Node2D>(canvas_item);
- if (node2d) {
- if (node2d->_edit_use_pivot()) {
- viewport->draw_texture(pivot_icon, xform.get_origin() + (-pivot_icon->get_size() / 2).floor());
- can_move_pivot = true;
- pivot_found = true;
- }
+ // Draw the pivot
+ if (canvas_item->_edit_get_pivot() != Vector2() || drag_type == DRAG_PIVOT || tool == TOOL_EDIT_PIVOT) { // This is not really clean :/
+ viewport->draw_texture(pivot_icon, xform.xform(canvas_item->_edit_get_pivot()) + (-pivot_icon->get_size() / 2).floor());
}
Control *control = Object::cast_to<Control>(canvas_item);
if (control) {
- Vector2 pivot_ofs = control->get_pivot_offset();
- if (pivot_ofs != Vector2()) {
- viewport->draw_texture(pivot_icon, xform.xform(pivot_ofs) + (-pivot_icon->get_size() / 2).floor());
- }
- can_move_pivot = true;
- pivot_found = true;
-
if (tool == TOOL_SELECT && show_helpers && !Object::cast_to<Container>(control->get_parent())) {
// Draw the helpers
Color color_base = Color(0.8, 0.8, 0.8, 0.5);
@@ -2561,10 +2148,9 @@ void CanvasItemEditor::_draw_selection() {
anchors_pos[i] = xform.xform(_anchor_to_position(control, anchors[i]));
}
- Map<Node *, Object *> &selection = editor_selection->get_selection();
// Get which anchor is dragged
int dragged_anchor = -1;
- switch (drag) {
+ switch (drag_type) {
case DRAG_ANCHOR_ALL:
case DRAG_ANCHOR_TOP_LEFT:
dragged_anchor = 0;
@@ -2578,6 +2164,8 @@ void CanvasItemEditor::_draw_selection() {
case DRAG_ANCHOR_BOTTOM_LEFT:
dragged_anchor = 3;
break;
+ default:
+ break;
}
if (dragged_anchor >= 0) {
@@ -2639,56 +2227,65 @@ void CanvasItemEditor::_draw_selection() {
node_pos_in_parent[2] = control->get_anchor(MARGIN_RIGHT) * control->get_parent_area_size().width + control->get_margin(MARGIN_RIGHT);
node_pos_in_parent[3] = control->get_anchor(MARGIN_BOTTOM) * control->get_parent_area_size().height + control->get_margin(MARGIN_BOTTOM);
- switch (drag) {
+ Point2 start, end;
+ switch (drag_type) {
case DRAG_LEFT:
case DRAG_TOP_LEFT:
case DRAG_BOTTOM_LEFT:
_draw_margin_at_position(control->get_size().width, parent_transform.xform(Vector2((node_pos_in_parent[0] + node_pos_in_parent[2]) / 2, node_pos_in_parent[3])) + Vector2(0, 5), MARGIN_BOTTOM);
case DRAG_ALL:
- Point2 start = Vector2(node_pos_in_parent[0], Math::lerp(node_pos_in_parent[1], node_pos_in_parent[3], ratio));
- Point2 end = start - Vector2(control->get_margin(MARGIN_LEFT), 0);
+ start = Vector2(node_pos_in_parent[0], Math::lerp(node_pos_in_parent[1], node_pos_in_parent[3], ratio));
+ end = start - Vector2(control->get_margin(MARGIN_LEFT), 0);
_draw_margin_at_position(control->get_margin(MARGIN_LEFT), parent_transform.xform((start + end) / 2), MARGIN_TOP);
viewport->draw_line(parent_transform.xform(start), parent_transform.xform(end), color_base, 1);
break;
+ default:
+ break;
}
- switch (drag) {
+ switch (drag_type) {
case DRAG_RIGHT:
case DRAG_TOP_RIGHT:
case DRAG_BOTTOM_RIGHT:
_draw_margin_at_position(control->get_size().width, parent_transform.xform(Vector2((node_pos_in_parent[0] + node_pos_in_parent[2]) / 2, node_pos_in_parent[3])) + Vector2(0, 5), MARGIN_BOTTOM);
case DRAG_ALL:
- Point2 start = Vector2(node_pos_in_parent[2], Math::lerp(node_pos_in_parent[3], node_pos_in_parent[1], ratio));
- Point2 end = start - Vector2(control->get_margin(MARGIN_RIGHT), 0);
+ start = Vector2(node_pos_in_parent[2], Math::lerp(node_pos_in_parent[3], node_pos_in_parent[1], ratio));
+ end = start - Vector2(control->get_margin(MARGIN_RIGHT), 0);
_draw_margin_at_position(control->get_margin(MARGIN_RIGHT), parent_transform.xform((start + end) / 2), MARGIN_BOTTOM);
viewport->draw_line(parent_transform.xform(start), parent_transform.xform(end), color_base, 1);
break;
+ default:
+ break;
}
- switch (drag) {
+ switch (drag_type) {
case DRAG_TOP:
case DRAG_TOP_LEFT:
case DRAG_TOP_RIGHT:
_draw_margin_at_position(control->get_size().height, parent_transform.xform(Vector2(node_pos_in_parent[2], (node_pos_in_parent[1] + node_pos_in_parent[3]) / 2)) + Vector2(5, 0), MARGIN_RIGHT);
case DRAG_ALL:
- Point2 start = Vector2(Math::lerp(node_pos_in_parent[0], node_pos_in_parent[2], ratio), node_pos_in_parent[1]);
- Point2 end = start - Vector2(0, control->get_margin(MARGIN_TOP));
+ start = Vector2(Math::lerp(node_pos_in_parent[0], node_pos_in_parent[2], ratio), node_pos_in_parent[1]);
+ end = start - Vector2(0, control->get_margin(MARGIN_TOP));
_draw_margin_at_position(control->get_margin(MARGIN_TOP), parent_transform.xform((start + end) / 2), MARGIN_LEFT);
viewport->draw_line(parent_transform.xform(start), parent_transform.xform(end), color_base, 1);
break;
+ default:
+ break;
}
- switch (drag) {
+ switch (drag_type) {
case DRAG_BOTTOM:
case DRAG_BOTTOM_LEFT:
case DRAG_BOTTOM_RIGHT:
_draw_margin_at_position(control->get_size().height, parent_transform.xform(Vector2(node_pos_in_parent[2], (node_pos_in_parent[1] + node_pos_in_parent[3]) / 2) + Vector2(5, 0)), MARGIN_RIGHT);
case DRAG_ALL:
- Point2 start = Vector2(Math::lerp(node_pos_in_parent[2], node_pos_in_parent[0], ratio), node_pos_in_parent[3]);
- Point2 end = start - Vector2(0, control->get_margin(MARGIN_BOTTOM));
+ start = Vector2(Math::lerp(node_pos_in_parent[2], node_pos_in_parent[0], ratio), node_pos_in_parent[3]);
+ end = start - Vector2(0, control->get_margin(MARGIN_BOTTOM));
_draw_margin_at_position(control->get_margin(MARGIN_BOTTOM), parent_transform.xform((start + end) / 2), MARGIN_RIGHT);
viewport->draw_line(parent_transform.xform(start), parent_transform.xform(end), color_base, 1);
break;
+ default:
+ break;
}
- switch (drag) {
+ switch (drag_type) {
//Draw the ghost rect if the node if rotated/scaled
case DRAG_LEFT:
case DRAG_TOP_LEFT:
@@ -2704,14 +2301,15 @@ void CanvasItemEditor::_draw_selection() {
viewport->draw_rect(parent_transform.xform(rect), color_base, false);
}
break;
+ default:
+ break;
}
}
}
if (tool == TOOL_SELECT) {
-
for (int i = 0; i < 4; i++) {
-
+ // Draw the resize handles
int prev = (i + 3) % 4;
int next = (i + 1) % 4;
@@ -2728,9 +2326,9 @@ void CanvasItemEditor::_draw_selection() {
}
}
}
- pivot_button->set_disabled(!pivot_found);
- if (box_selecting) {
+ if (drag_type == DRAG_BOX_SELECTION) {
+ // Draw the dragging box
Point2 bsfrom = transform.xform(drag_from);
Point2 bsto = transform.xform(box_selecting_to);
@@ -2738,8 +2336,50 @@ void CanvasItemEditor::_draw_selection() {
}
Color rotate_color(0.4, 0.7, 1.0, 0.8);
- if (drag == DRAG_ROTATE) {
- VisualServer::get_singleton()->canvas_item_add_line(ci, transform.xform(display_rotate_from), transform.xform(display_rotate_to), rotate_color);
+ if (drag_type == DRAG_ROTATE) {
+ // Draw the line when rotating a node
+ viewport->draw_line(transform.xform(drag_rotation_center), transform.xform(drag_to), rotate_color);
+ }
+}
+
+void CanvasItemEditor::_draw_straight_line(Point2 p_from, Point2 p_to, Color p_color) {
+ // Draw a line going through the whole screen from a vector
+ RID ci = viewport->get_canvas_item();
+ Vector<Point2> points;
+ Point2 from = transform.xform(p_from);
+ Point2 to = transform.xform(p_to);
+ Size2 viewport_size = viewport->get_size();
+
+ if (to.x == from.x) {
+ // Vertical line
+ points.push_back(Point2(to.x, 0));
+ points.push_back(Point2(to.x, viewport_size.y));
+ } else if (to.y == from.y) {
+ // Horizontal line
+ points.push_back(Point2(0, to.y));
+ points.push_back(Point2(viewport_size.x, to.y));
+ } else {
+ float y_for_zero_x = (to.y * from.x - from.y * to.x) / (from.x - to.x);
+ float x_for_zero_y = (to.x * from.y - from.x * to.y) / (from.y - to.y);
+ float y_for_viewport_x = ((to.y - from.y) * (viewport_size.x - from.x)) / (to.x - from.x) + from.y;
+ float x_for_viewport_y = ((to.x - from.x) * (viewport_size.y - from.y)) / (to.y - from.y) + from.x; // faux
+
+ //bool start_set = false;
+ if (y_for_zero_x >= 0 && y_for_zero_x <= viewport_size.y) {
+ points.push_back(Point2(0, y_for_zero_x));
+ }
+ if (x_for_zero_y >= 0 && x_for_zero_y <= viewport_size.x) {
+ points.push_back(Point2(x_for_zero_y, 0));
+ }
+ if (y_for_viewport_x >= 0 && y_for_viewport_x <= viewport_size.y) {
+ points.push_back(Point2(viewport_size.x, y_for_viewport_x));
+ }
+ if (x_for_viewport_y >= 0 && x_for_viewport_y <= viewport_size.x) {
+ points.push_back(Point2(x_for_viewport_y, viewport_size.y));
+ }
+ }
+ if (points.size() >= 2) {
+ VisualServer::get_singleton()->canvas_item_add_line(ci, points[0], points[1], p_color);
}
}
@@ -2750,9 +2390,8 @@ void CanvasItemEditor::_draw_axis() {
Color y_axis_color(0.4, 1.0, 0.4, 0.6);
Color area_axis_color(0.4, 0.4, 1.0, 0.4);
- Point2 origin = transform.get_origin();
- VisualServer::get_singleton()->canvas_item_add_line(ci, Point2(0, origin.y), Point2(viewport->get_size().x, origin.y), x_axis_color);
- VisualServer::get_singleton()->canvas_item_add_line(ci, Point2(origin.x, 0), Point2(origin.x, viewport->get_size().y), y_axis_color);
+ _draw_straight_line(Point2(), Point2(1, 0), x_axis_color);
+ _draw_straight_line(Point2(), Point2(0, 1), y_axis_color);
Size2 screen_size = Size2(ProjectSettings::get_singleton()->get("display/window/size/width"), ProjectSettings::get_singleton()->get("display/window/size/height"));
@@ -2783,7 +2422,7 @@ void CanvasItemEditor::_draw_bones() {
E->get().from = Vector2();
E->get().to = Vector2();
- Node2D *n2d = Object::cast_to<Node2D>(ObjectDB::get_instance(E->get().bone));
+ Node2D *n2d = Object::cast_to<Node2D>(ObjectDB::get_instance(E->key()));
if (!n2d)
continue;
@@ -2881,7 +2520,6 @@ void CanvasItemEditor::_build_bones_list(Node *p_node) {
ObjectID id = c->get_instance_id();
if (!bone_list.has(id)) {
BoneList bone;
- bone.bone = id;
bone_list[id] = bone;
}
@@ -2890,32 +2528,6 @@ void CanvasItemEditor::_build_bones_list(Node *p_node) {
}
}
-void CanvasItemEditor::_get_encompassing_rect(Node *p_node, Rect2 &r_rect, const Transform2D &p_xform) {
- ERR_FAIL_COND(!p_node);
-
- for (int i = 0; i < p_node->get_child_count(); i++) {
- _get_encompassing_rect(p_node->get_child(i), r_rect, p_xform);
- }
-
- CanvasItem *c = Object::cast_to<CanvasItem>(p_node);
- if (c && c->is_visible_in_tree()) {
- Rect2 rect = c->_edit_get_rect();
- Transform2D xform = p_xform * c->get_transform();
- r_rect.expand_to(xform.xform(rect.position));
- r_rect.expand_to(xform.xform(rect.position + Point2(rect.size.x, 0)));
- r_rect.expand_to(xform.xform(rect.position + Point2(0, rect.size.y)));
- r_rect.expand_to(xform.xform(rect.position + rect.size));
- }
-}
-
-void CanvasItemEditor::_draw_viewport_base() {
- if (show_rulers)
- _draw_rulers();
- if (show_guides)
- _draw_guides();
- _draw_focus();
-}
-
void CanvasItemEditor::_draw_viewport() {
// hide/show buttons depending on the selection
@@ -2968,36 +2580,25 @@ void CanvasItemEditor::_draw_viewport() {
}
_draw_bones();
+ if (show_rulers)
+ _draw_rulers();
+ if (show_guides)
+ _draw_guides();
+ _draw_focus();
}
void CanvasItemEditor::_notification(int p_what) {
if (p_what == NOTIFICATION_PHYSICS_PROCESS) {
-
EditorNode::get_singleton()->get_scene_root()->set_snap_controls_to_pixels(GLOBAL_GET("gui/common/snap_controls_to_pixels"));
- List<Node *> selection = editor_selection->get_selected_node_list();
-
- bool all_control = true;
- bool has_control = false;
-
- for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
- CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
- if (!canvas_item || !canvas_item->is_visible_in_tree())
- continue;
-
- if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
- continue;
-
- if (Object::cast_to<Control>(canvas_item))
- has_control = true;
- else
- all_control = false;
+ int nb_control = 0;
+ int nb_having_pivot = 0;
+ List<CanvasItem *> selection = _get_edited_canvas_items();
+ for (List<CanvasItem *>::Element *E = selection.front(); E; E = E->next()) {
+ CanvasItem *canvas_item = E->get();
CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item);
- if (!se)
- continue;
Rect2 r = canvas_item->_edit_get_rect();
Transform2D xform = canvas_item->get_transform();
@@ -3008,36 +2609,41 @@ void CanvasItemEditor::_notification(int p_what) {
se->prev_xform = xform;
}
- if (Object::cast_to<Control>(canvas_item)) {
+ Control *control = Object::cast_to<Control>(canvas_item);
+ if (control) {
float anchors[4];
Vector2 pivot;
- pivot = Object::cast_to<Control>(canvas_item)->get_pivot_offset();
- anchors[MARGIN_LEFT] = Object::cast_to<Control>(canvas_item)->get_anchor(MARGIN_LEFT);
- anchors[MARGIN_RIGHT] = Object::cast_to<Control>(canvas_item)->get_anchor(MARGIN_RIGHT);
- anchors[MARGIN_TOP] = Object::cast_to<Control>(canvas_item)->get_anchor(MARGIN_TOP);
- anchors[MARGIN_BOTTOM] = Object::cast_to<Control>(canvas_item)->get_anchor(MARGIN_BOTTOM);
+ pivot = control->get_pivot_offset();
+ anchors[MARGIN_LEFT] = control->get_anchor(MARGIN_LEFT);
+ anchors[MARGIN_RIGHT] = control->get_anchor(MARGIN_RIGHT);
+ anchors[MARGIN_TOP] = control->get_anchor(MARGIN_TOP);
+ anchors[MARGIN_BOTTOM] = control->get_anchor(MARGIN_BOTTOM);
if (pivot != se->prev_pivot || anchors[MARGIN_LEFT] != se->prev_anchors[MARGIN_LEFT] || anchors[MARGIN_RIGHT] != se->prev_anchors[MARGIN_RIGHT] || anchors[MARGIN_TOP] != se->prev_anchors[MARGIN_TOP] || anchors[MARGIN_BOTTOM] != se->prev_anchors[MARGIN_BOTTOM]) {
- viewport->update();
- viewport_base->update();
se->prev_pivot = pivot;
se->prev_anchors[MARGIN_LEFT] = anchors[MARGIN_LEFT];
se->prev_anchors[MARGIN_RIGHT] = anchors[MARGIN_RIGHT];
se->prev_anchors[MARGIN_TOP] = anchors[MARGIN_TOP];
se->prev_anchors[MARGIN_BOTTOM] = anchors[MARGIN_BOTTOM];
+ viewport->update();
}
+ nb_control++;
+ }
+
+ if (canvas_item->_edit_use_pivot()) {
+ nb_having_pivot++;
}
}
+ // Activate / Deactivate the pivot tool
+ pivot_button->set_disabled(nb_having_pivot == 0);
- if (all_control && has_control)
- presets_menu->show();
- else
- presets_menu->hide();
+ // Show / Hide the layout button
+ presets_menu->set_visible(nb_control > 0 && nb_control == selection.size());
for (Map<ObjectID, BoneList>::Element *E = bone_list.front(); E; E = E->next()) {
- Object *b = ObjectDB::get_instance(E->get().bone);
+ Object *b = ObjectDB::get_instance(E->key());
if (!b) {
viewport->update();
@@ -3150,63 +2756,60 @@ void CanvasItemEditor::_notification(int p_what) {
void CanvasItemEditor::edit(CanvasItem *p_canvas_item) {
- drag = DRAG_NONE;
+ drag_type = DRAG_NONE;
// Clear the selection
editor_selection->clear(); //_clear_canvas_items();
editor_selection->add_node(p_canvas_item);
- //_add_canvas_item(p_canvas_item);
viewport->update();
- viewport_base->update();
}
void CanvasItemEditor::_update_scrollbars() {
updating_scroll = true;
- if (show_rulers)
- viewport_scrollable->set_begin(Point2(RULER_WIDTH, RULER_WIDTH));
- else
- viewport_scrollable->set_begin(Point2());
+ Point2 zoom_hb_begin = Point2(5, 5);
+ zoom_hb_begin += (show_rulers) ? Point2(RULER_WIDTH, RULER_WIDTH) : Point2();
+ zoom_hb->set_begin(zoom_hb_begin);
Size2 size = viewport->get_size();
Size2 hmin = h_scroll->get_minimum_size();
Size2 vmin = v_scroll->get_minimum_size();
- v_scroll->set_begin(Point2(size.width - vmin.width, 0));
+ v_scroll->set_begin(Point2(size.width - vmin.width, (show_rulers) ? RULER_WIDTH : 0));
v_scroll->set_end(Point2(size.width, size.height));
- h_scroll->set_begin(Point2(0, size.height - hmin.height));
+ h_scroll->set_begin(Point2((show_rulers) ? RULER_WIDTH : 0, size.height - hmin.height));
h_scroll->set_end(Point2(size.width - vmin.width, size.height));
Size2 screen_rect = Size2(ProjectSettings::get_singleton()->get("display/window/size/width"), ProjectSettings::get_singleton()->get("display/window/size/height"));
Rect2 local_rect = Rect2(Point2(), viewport->get_size() - Size2(vmin.width, hmin.height));
- Rect2 canvas_item_rect = Rect2(Point2(), screen_rect);
-
bone_last_frame++;
if (editor->get_edited_scene()) {
_build_bones_list(editor->get_edited_scene());
- _get_encompassing_rect(editor->get_edited_scene(), canvas_item_rect, Transform2D());
}
List<Map<ObjectID, BoneList>::Element *> bone_to_erase;
-
for (Map<ObjectID, BoneList>::Element *E = bone_list.front(); E; E = E->next()) {
-
if (E->get().last_pass != bone_last_frame) {
bone_to_erase.push_back(E);
}
}
-
while (bone_to_erase.size()) {
bone_list.erase(bone_to_erase.front()->get());
bone_to_erase.pop_front();
}
- //expand area so it's easier to do animations and stuff at 0,0
+ // Calculate scrollable area
+ Rect2 canvas_item_rect = Rect2(Point2(), screen_rect);
+ if (editor->get_edited_scene()) {
+ Rect2 content_rect = _get_scene_encompassing_rect();
+ canvas_item_rect.expand_to(content_rect.position);
+ canvas_item_rect.expand_to(content_rect.position + content_rect.size);
+ }
canvas_item_rect.size += screen_rect * 2;
canvas_item_rect.position -= screen_rect;
@@ -3273,48 +2876,42 @@ void CanvasItemEditor::_update_scroll(float) {
editor->get_scene_root()->set_global_canvas_transform(transform);
viewport->update();
- viewport_base->update();
}
void CanvasItemEditor::_set_anchors_and_margins_preset(Control::LayoutPreset p_preset) {
List<Node *> selection = editor_selection->get_selected_node_list();
undo_redo->create_action(TTR("Change Anchors and Margins"));
+
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- Control *c = Object::cast_to<Control>(E->get());
-
- undo_redo->add_do_method(c, "set_anchors_preset", p_preset);
- switch (p_preset) {
- case PRESET_TOP_LEFT:
- case PRESET_TOP_RIGHT:
- case PRESET_BOTTOM_LEFT:
- case PRESET_BOTTOM_RIGHT:
- case PRESET_CENTER_LEFT:
- case PRESET_CENTER_TOP:
- case PRESET_CENTER_RIGHT:
- case PRESET_CENTER_BOTTOM:
- case PRESET_CENTER:
- undo_redo->add_do_method(c, "set_margins_preset", p_preset, Control::PRESET_MODE_KEEP_SIZE);
- break;
- case PRESET_LEFT_WIDE:
- case PRESET_TOP_WIDE:
- case PRESET_RIGHT_WIDE:
- case PRESET_BOTTOM_WIDE:
- case PRESET_VCENTER_WIDE:
- case PRESET_HCENTER_WIDE:
- case PRESET_WIDE:
- undo_redo->add_do_method(c, "set_margins_preset", p_preset, Control::PRESET_MODE_MINSIZE);
- break;
+ Control *control = Object::cast_to<Control>(E->get());
+ if (control) {
+ undo_redo->add_do_method(control, "set_anchors_preset", p_preset);
+ switch (p_preset) {
+ case PRESET_TOP_LEFT:
+ case PRESET_TOP_RIGHT:
+ case PRESET_BOTTOM_LEFT:
+ case PRESET_BOTTOM_RIGHT:
+ case PRESET_CENTER_LEFT:
+ case PRESET_CENTER_TOP:
+ case PRESET_CENTER_RIGHT:
+ case PRESET_CENTER_BOTTOM:
+ case PRESET_CENTER:
+ undo_redo->add_do_method(control, "set_margins_preset", p_preset, Control::PRESET_MODE_KEEP_SIZE);
+ break;
+ case PRESET_LEFT_WIDE:
+ case PRESET_TOP_WIDE:
+ case PRESET_RIGHT_WIDE:
+ case PRESET_BOTTOM_WIDE:
+ case PRESET_VCENTER_WIDE:
+ case PRESET_HCENTER_WIDE:
+ case PRESET_WIDE:
+ undo_redo->add_do_method(control, "set_margins_preset", p_preset, Control::PRESET_MODE_MINSIZE);
+ break;
+ }
+ undo_redo->add_undo_method(control, "_edit_set_state", control->_edit_get_state());
}
- undo_redo->add_undo_method(c, "set_anchor", MARGIN_LEFT, c->get_anchor(MARGIN_LEFT));
- undo_redo->add_undo_method(c, "set_anchor", MARGIN_TOP, c->get_anchor(MARGIN_TOP));
- undo_redo->add_undo_method(c, "set_anchor", MARGIN_RIGHT, c->get_anchor(MARGIN_RIGHT));
- undo_redo->add_undo_method(c, "set_anchor", MARGIN_BOTTOM, c->get_anchor(MARGIN_BOTTOM));
- undo_redo->add_undo_method(c, "set_margin", MARGIN_LEFT, c->get_margin(MARGIN_LEFT));
- undo_redo->add_undo_method(c, "set_margin", MARGIN_TOP, c->get_margin(MARGIN_TOP));
- undo_redo->add_undo_method(c, "set_margin", MARGIN_RIGHT, c->get_margin(MARGIN_RIGHT));
- undo_redo->add_undo_method(c, "set_margin", MARGIN_BOTTOM, c->get_margin(MARGIN_BOTTOM));
}
undo_redo->commit_action();
@@ -3326,13 +2923,11 @@ void CanvasItemEditor::_set_anchors_preset(Control::LayoutPreset p_preset) {
undo_redo->create_action(TTR("Change Anchors"));
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- Control *c = Object::cast_to<Control>(E->get());
-
- undo_redo->add_do_method(c, "set_anchors_preset", p_preset);
- undo_redo->add_undo_method(c, "set_anchor", MARGIN_LEFT, c->get_anchor(MARGIN_LEFT));
- undo_redo->add_undo_method(c, "set_anchor", MARGIN_TOP, c->get_anchor(MARGIN_TOP));
- undo_redo->add_undo_method(c, "set_anchor", MARGIN_RIGHT, c->get_anchor(MARGIN_RIGHT));
- undo_redo->add_undo_method(c, "set_anchor", MARGIN_BOTTOM, c->get_anchor(MARGIN_BOTTOM));
+ Control *control = Object::cast_to<Control>(E->get());
+ if (control) {
+ undo_redo->add_do_method(control, "set_anchors_preset", p_preset);
+ undo_redo->add_undo_method(control, "_edit_set_state", control->_edit_get_state());
+ }
}
undo_redo->commit_action();
@@ -3351,25 +2946,34 @@ void CanvasItemEditor::_zoom_on_position(float p_zoom, Point2 p_position) {
_update_scroll(0);
viewport->update();
- viewport_base->update();
}
-void CanvasItemEditor::_zoom_minus() {
+void CanvasItemEditor::_button_zoom_minus() {
_zoom_on_position(zoom / 2.0, viewport_scrollable->get_size() / 2.0);
}
-void CanvasItemEditor::_zoom_reset() {
+void CanvasItemEditor::_button_zoom_reset() {
_zoom_on_position(1.0, viewport_scrollable->get_size() / 2.0);
}
-void CanvasItemEditor::_zoom_plus() {
+void CanvasItemEditor::_button_zoom_plus() {
_zoom_on_position(zoom * 2.0, viewport_scrollable->get_size() / 2.0);
}
-void CanvasItemEditor::_toggle_snap(bool p_status) {
+void CanvasItemEditor::_button_toggle_snap(bool p_status) {
snap_active = p_status;
viewport->update();
- viewport_base->update();
+}
+
+void CanvasItemEditor::_button_tool_select(int p_index) {
+
+ ToolButton *tb[TOOL_MAX] = { select_button, list_select_button, move_button, rotate_button, pivot_button, pan_button };
+ for (int i = 0; i < TOOL_MAX; i++) {
+ tb[i]->set_pressed(i == p_index);
+ }
+
+ viewport->update();
+ tool = (Tool)p_index;
}
void CanvasItemEditor::_popup_callback(int p_op) {
@@ -3382,7 +2986,6 @@ void CanvasItemEditor::_popup_callback(int p_op) {
int idx = view_menu->get_popup()->get_item_index(SHOW_GRID);
view_menu->get_popup()->set_item_checked(idx, show_grid);
viewport->update();
- viewport_base->update();
} break;
case SNAP_USE_NODE_PARENT: {
snap_node_parent = !snap_node_parent;
@@ -3399,6 +3002,11 @@ void CanvasItemEditor::_popup_callback(int p_op) {
int idx = smartsnap_config_popup->get_item_index(SNAP_USE_NODE_SIDES);
smartsnap_config_popup->set_item_checked(idx, snap_node_sides);
} break;
+ case SNAP_USE_NODE_CENTER: {
+ snap_node_center = !snap_node_center;
+ int idx = smartsnap_config_popup->get_item_index(SNAP_USE_NODE_CENTER);
+ smartsnap_config_popup->set_item_checked(idx, snap_node_center);
+ } break;
case SNAP_USE_OTHER_NODES: {
snap_other_nodes = !snap_other_nodes;
int idx = smartsnap_config_popup->get_item_index(SNAP_USE_OTHER_NODES);
@@ -3424,7 +3032,6 @@ void CanvasItemEditor::_popup_callback(int p_op) {
int idx = snap_config_menu->get_popup()->get_item_index(SNAP_RELATIVE);
snap_config_menu->get_popup()->set_item_checked(idx, snap_relative);
viewport->update();
- viewport_base->update();
} break;
case SNAP_USE_PIXEL: {
snap_pixel = !snap_pixel;
@@ -3452,26 +3059,19 @@ void CanvasItemEditor::_popup_callback(int p_op) {
int idx = view_menu->get_popup()->get_item_index(SHOW_RULERS);
view_menu->get_popup()->set_item_checked(idx, show_rulers);
viewport->update();
- viewport_base->update();
} break;
case SHOW_GUIDES: {
show_guides = !show_guides;
int idx = view_menu->get_popup()->get_item_index(SHOW_GUIDES);
view_menu->get_popup()->set_item_checked(idx, show_guides);
viewport->update();
- viewport_base->update();
} break;
-
case LOCK_SELECTED: {
-
List<Node *> selection = editor_selection->get_selected_node_list();
-
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
if (!canvas_item || !canvas_item->is_inside_tree())
continue;
-
if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
continue;
@@ -3481,35 +3081,25 @@ void CanvasItemEditor::_popup_callback(int p_op) {
viewport->update();
} break;
case UNLOCK_SELECTED: {
-
List<Node *> selection = editor_selection->get_selected_node_list();
-
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
if (!canvas_item || !canvas_item->is_inside_tree())
continue;
-
if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
continue;
canvas_item->set_meta("_edit_lock_", Variant());
emit_signal("item_lock_status_changed");
}
-
viewport->update();
-
} break;
case GROUP_SELECTED: {
-
List<Node *> selection = editor_selection->get_selected_node_list();
-
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
if (!canvas_item || !canvas_item->is_inside_tree())
continue;
-
if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
continue;
@@ -3519,26 +3109,19 @@ void CanvasItemEditor::_popup_callback(int p_op) {
viewport->update();
} break;
case UNGROUP_SELECTED: {
-
List<Node *> selection = editor_selection->get_selected_node_list();
-
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
-
CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
if (!canvas_item || !canvas_item->is_inside_tree())
continue;
-
if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
continue;
canvas_item->set_meta("_edit_group_", Variant());
emit_signal("item_group_status_changed");
}
-
viewport->update();
-
} break;
-
case ANCHORS_AND_MARGINS_PRESET_TOP_LEFT: {
_set_anchors_and_margins_preset(PRESET_TOP_LEFT);
} break;
@@ -3723,28 +3306,6 @@ void CanvasItemEditor::_popup_callback(int p_op) {
key_scale = key_scale_button->is_pressed();
} break;
- /*
- case ANIM_INSERT_POS_ROT
- case ANIM_INSERT_POS_SCALE:
- case ANIM_INSERT_ROT_SCALE:
- case ANIM_INSERT_POS_ROT_SCALE: {
- static const bool key_toggles[7][3]={
- {true,false,false},
- {false,true,false},
- {false,false,true},
- {true,true,false},
- {true,false,true},
- {false,true,true},
- {true,true,true}
- };
- key_pos=key_toggles[p_op-ANIM_INSERT_POS][0];
- key_rot=key_toggles[p_op-ANIM_INSERT_POS][1];
- key_scale=key_toggles[p_op-ANIM_INSERT_POS][2];
- for(int i=ANIM_INSERT_POS;i<=ANIM_INSERT_POS_ROT_SCALE;i++) {
- int idx = animation_menu->get_popup()->get_item_index(i);
- animation_menu->get_popup()->set_item_checked(idx,i==p_op);
- }
- } break;*/
case ANIM_COPY_POSE: {
pose_clipboard.clear();
@@ -3823,9 +3384,9 @@ void CanvasItemEditor::_popup_callback(int p_op) {
if (key_pos)
ctrl->set_position(Point2());
/*
- if (key_scale)
- AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(ctrl,"rect/size",ctrl->get_size());
- */
+ if (key_scale)
+ AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(ctrl,"rect/size",ctrl->get_size());
+ */
}
}
@@ -3974,20 +3535,18 @@ void CanvasItemEditor::_focus_selection(int p_op) {
void CanvasItemEditor::_bind_methods() {
- ClassDB::bind_method("_zoom_minus", &CanvasItemEditor::_zoom_minus);
- ClassDB::bind_method("_zoom_reset", &CanvasItemEditor::_zoom_reset);
- ClassDB::bind_method("_zoom_plus", &CanvasItemEditor::_zoom_plus);
- ClassDB::bind_method("_toggle_snap", &CanvasItemEditor::_toggle_snap);
+ ClassDB::bind_method("_button_zoom_minus", &CanvasItemEditor::_button_zoom_minus);
+ ClassDB::bind_method("_button_zoom_reset", &CanvasItemEditor::_button_zoom_reset);
+ ClassDB::bind_method("_button_zoom_plus", &CanvasItemEditor::_button_zoom_plus);
+ ClassDB::bind_method("_button_toggle_snap", &CanvasItemEditor::_button_toggle_snap);
ClassDB::bind_method("_update_scroll", &CanvasItemEditor::_update_scroll);
ClassDB::bind_method("_popup_callback", &CanvasItemEditor::_popup_callback);
ClassDB::bind_method("_get_editor_data", &CanvasItemEditor::_get_editor_data);
- ClassDB::bind_method("_tool_select", &CanvasItemEditor::_tool_select);
+ ClassDB::bind_method("_button_tool_select", &CanvasItemEditor::_button_tool_select);
ClassDB::bind_method("_keying_changed", &CanvasItemEditor::_keying_changed);
ClassDB::bind_method("_unhandled_key_input", &CanvasItemEditor::_unhandled_key_input);
ClassDB::bind_method("_draw_viewport", &CanvasItemEditor::_draw_viewport);
- ClassDB::bind_method("_draw_viewport_base", &CanvasItemEditor::_draw_viewport_base);
ClassDB::bind_method("_gui_input_viewport", &CanvasItemEditor::_gui_input_viewport);
- ClassDB::bind_method("_gui_input_viewport_base", &CanvasItemEditor::_gui_input_viewport_base);
ClassDB::bind_method("_snap_changed", &CanvasItemEditor::_snap_changed);
ClassDB::bind_method(D_METHOD("_selection_result_pressed"), &CanvasItemEditor::_selection_result_pressed);
ClassDB::bind_method(D_METHOD("_selection_menu_hide"), &CanvasItemEditor::_selection_menu_hide);
@@ -3997,6 +3556,162 @@ void CanvasItemEditor::_bind_methods() {
ADD_SIGNAL(MethodInfo("item_group_status_changed"));
}
+Dictionary CanvasItemEditor::get_state() const {
+
+ Dictionary state;
+ state["zoom"] = zoom;
+ state["ofs"] = Point2(h_scroll->get_value(), v_scroll->get_value());
+ state["grid_offset"] = grid_offset;
+ state["grid_step"] = grid_step;
+ state["snap_rotation_offset"] = snap_rotation_offset;
+ state["snap_rotation_step"] = snap_rotation_step;
+ state["snap_active"] = snap_active;
+ state["snap_node_parent"] = snap_node_parent;
+ state["snap_node_anchors"] = snap_node_anchors;
+ state["snap_node_sides"] = snap_node_sides;
+ state["snap_node_center"] = snap_node_center;
+ state["snap_other_nodes"] = snap_other_nodes;
+ state["snap_grid"] = snap_grid;
+ state["snap_guides"] = snap_guides;
+ state["show_grid"] = show_grid;
+ state["show_rulers"] = show_rulers;
+ state["show_guides"] = show_guides;
+ state["show_helpers"] = show_helpers;
+ state["snap_rotation"] = snap_rotation;
+ state["snap_relative"] = snap_relative;
+ state["snap_pixel"] = snap_pixel;
+ state["skeleton_show_bones"] = skeleton_show_bones;
+ return state;
+}
+
+void CanvasItemEditor::set_state(const Dictionary &p_state) {
+
+ Dictionary state = p_state;
+ if (state.has("zoom")) {
+ zoom = p_state["zoom"];
+ }
+
+ if (state.has("ofs")) {
+ _update_scrollbars(); // i wonder how safe is calling this here..
+ Point2 ofs = p_state["ofs"];
+ h_scroll->set_value(ofs.x);
+ v_scroll->set_value(ofs.y);
+ }
+
+ if (state.has("grid_offset")) {
+ grid_offset = state["grid_offset"];
+ }
+
+ if (state.has("grid_step")) {
+ grid_step = state["grid_step"];
+ }
+
+ if (state.has("snap_rotation_step")) {
+ snap_rotation_step = state["snap_rotation_step"];
+ }
+
+ if (state.has("snap_rotation_offset")) {
+ snap_rotation_offset = state["snap_rotation_offset"];
+ }
+
+ if (state.has("snap_active")) {
+ snap_active = state["snap_active"];
+ snap_button->set_pressed(snap_active);
+ }
+
+ if (state.has("snap_node_parent")) {
+ snap_node_parent = state["snap_node_parent"];
+ int idx = smartsnap_config_popup->get_item_index(SNAP_USE_NODE_PARENT);
+ smartsnap_config_popup->set_item_checked(idx, snap_node_parent);
+ }
+
+ if (state.has("snap_node_anchors")) {
+ snap_node_anchors = state["snap_node_anchors"];
+ int idx = smartsnap_config_popup->get_item_index(SNAP_USE_NODE_ANCHORS);
+ smartsnap_config_popup->set_item_checked(idx, snap_node_anchors);
+ }
+
+ if (state.has("snap_node_sides")) {
+ snap_node_sides = state["snap_node_sides"];
+ int idx = smartsnap_config_popup->get_item_index(SNAP_USE_NODE_SIDES);
+ smartsnap_config_popup->set_item_checked(idx, snap_node_sides);
+ }
+
+ if (state.has("snap_node_center")) {
+ snap_node_center = state["snap_node_center"];
+ int idx = smartsnap_config_popup->get_item_index(SNAP_USE_NODE_CENTER);
+ smartsnap_config_popup->set_item_checked(idx, snap_node_center);
+ }
+
+ if (state.has("snap_other_nodes")) {
+ snap_other_nodes = state["snap_other_nodes"];
+ int idx = smartsnap_config_popup->get_item_index(SNAP_USE_OTHER_NODES);
+ smartsnap_config_popup->set_item_checked(idx, snap_other_nodes);
+ }
+
+ if (state.has("snap_guides")) {
+ snap_guides = state["snap_guides"];
+ int idx = smartsnap_config_popup->get_item_index(SNAP_USE_GUIDES);
+ smartsnap_config_popup->set_item_checked(idx, snap_guides);
+ }
+
+ if (state.has("snap_grid")) {
+ snap_grid = state["snap_grid"];
+ int idx = snap_config_menu->get_popup()->get_item_index(SNAP_USE_GRID);
+ snap_config_menu->get_popup()->set_item_checked(idx, snap_grid);
+ }
+
+ if (state.has("show_grid")) {
+ show_grid = state["show_grid"];
+ int idx = view_menu->get_popup()->get_item_index(SHOW_GRID);
+ view_menu->get_popup()->set_item_checked(idx, show_grid);
+ }
+
+ if (state.has("show_rulers")) {
+ show_rulers = state["show_rulers"];
+ int idx = view_menu->get_popup()->get_item_index(SHOW_RULERS);
+ view_menu->get_popup()->set_item_checked(idx, show_rulers);
+ }
+
+ if (state.has("show_guides")) {
+ show_guides = state["show_guides"];
+ int idx = view_menu->get_popup()->get_item_index(SHOW_GUIDES);
+ view_menu->get_popup()->set_item_checked(idx, show_guides);
+ }
+
+ if (state.has("show_helpers")) {
+ show_helpers = state["show_helpers"];
+ int idx = view_menu->get_popup()->get_item_index(SHOW_HELPERS);
+ view_menu->get_popup()->set_item_checked(idx, show_helpers);
+ }
+
+ if (state.has("snap_rotation")) {
+ snap_rotation = state["snap_rotation"];
+ int idx = snap_config_menu->get_popup()->get_item_index(SNAP_USE_ROTATION);
+ snap_config_menu->get_popup()->set_item_checked(idx, snap_rotation);
+ }
+
+ if (state.has("snap_relative")) {
+ snap_relative = state["snap_relative"];
+ int idx = snap_config_menu->get_popup()->get_item_index(SNAP_RELATIVE);
+ snap_config_menu->get_popup()->set_item_checked(idx, snap_relative);
+ }
+
+ if (state.has("snap_pixel")) {
+ snap_pixel = state["snap_pixel"];
+ int idx = snap_config_menu->get_popup()->get_item_index(SNAP_USE_PIXEL);
+ snap_config_menu->get_popup()->set_item_checked(idx, snap_pixel);
+ }
+
+ if (state.has("skeleton_show_bones")) {
+ skeleton_show_bones = state["skeleton_show_bones"];
+ int idx = skeleton_menu->get_popup()->get_item_index(SKELETON_SHOW_BONES);
+ skeleton_menu->get_popup()->set_item_checked(idx, skeleton_show_bones);
+ }
+
+ viewport->update();
+}
+
void CanvasItemEditor::add_control_to_menu_panel(Control *p_control) {
hb->add_child(p_control);
@@ -4042,21 +3757,12 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
bottom_split->add_child(palette_split);
palette_split->set_v_size_flags(SIZE_EXPAND_FILL);
- viewport_base = memnew(Control);
- palette_split->add_child(viewport_base);
- viewport_base->set_clip_contents(true);
- viewport_base->connect("draw", this, "_draw_viewport_base");
- viewport_base->connect("gui_input", this, "_gui_input_viewport_base");
- viewport_base->set_focus_mode(FOCUS_ALL);
- viewport_base->set_v_size_flags(SIZE_EXPAND_FILL);
- viewport_base->set_h_size_flags(SIZE_EXPAND_FILL);
-
viewport_scrollable = memnew(Control);
- viewport_base->add_child(viewport_scrollable);
+ palette_split->add_child(viewport_scrollable);
viewport_scrollable->set_mouse_filter(MOUSE_FILTER_PASS);
- viewport_scrollable->set_draw_behind_parent(true);
- viewport_scrollable->set_anchors_and_margins_preset(Control::PRESET_WIDE);
- viewport_scrollable->set_begin(Point2(RULER_WIDTH, RULER_WIDTH));
+ viewport_scrollable->set_clip_contents(true);
+ viewport_scrollable->set_v_size_flags(SIZE_EXPAND_FILL);
+ viewport_scrollable->set_h_size_flags(SIZE_EXPAND_FILL);
ViewportContainer *scene_tree = memnew(ViewportContainer);
viewport_scrollable->add_child(scene_tree);
@@ -4069,6 +3775,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
viewport->set_mouse_filter(MOUSE_FILTER_PASS);
viewport->set_anchors_and_margins_preset(Control::PRESET_WIDE);
viewport->set_clip_contents(true);
+ viewport->set_focus_mode(FOCUS_ALL);
viewport->connect("draw", this, "_draw_viewport");
viewport->connect("gui_input", this, "_gui_input_viewport");
@@ -4082,33 +3789,32 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
v_scroll->connect("value_changed", this, "_update_scroll", Vector<Variant>(), Object::CONNECT_DEFERRED);
v_scroll->hide();
- HBoxContainer *zoom_hb = memnew(HBoxContainer);
+ zoom_hb = memnew(HBoxContainer);
viewport->add_child(zoom_hb);
zoom_hb->set_begin(Point2(5, 5));
zoom_minus = memnew(ToolButton);
zoom_hb->add_child(zoom_minus);
- zoom_minus->connect("pressed", this, "_zoom_minus");
+ zoom_minus->connect("pressed", this, "_button_zoom_minus");
zoom_minus->set_focus_mode(FOCUS_NONE);
zoom_reset = memnew(ToolButton);
zoom_hb->add_child(zoom_reset);
- zoom_reset->connect("pressed", this, "_zoom_reset");
+ zoom_reset->connect("pressed", this, "_button_zoom_reset");
zoom_reset->set_focus_mode(FOCUS_NONE);
zoom_plus = memnew(ToolButton);
zoom_hb->add_child(zoom_plus);
- zoom_plus->connect("pressed", this, "_zoom_plus");
+ zoom_plus->connect("pressed", this, "_button_zoom_plus");
zoom_plus->set_focus_mode(FOCUS_NONE);
updating_scroll = false;
- handle_len = 10;
first_update = true;
select_button = memnew(ToolButton);
hb->add_child(select_button);
select_button->set_toggle_mode(true);
- select_button->connect("pressed", this, "_tool_select", make_binds(TOOL_SELECT));
+ select_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_SELECT));
select_button->set_pressed(true);
select_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/select_mode", TTR("Select Mode"), KEY_Q));
select_button->set_tooltip(keycode_get_string(KEY_MASK_CMD) + TTR("Drag: Rotate") + "\n" + TTR("Alt+Drag: Move") + "\n" + TTR("Press 'v' to Change Pivot, 'Shift+v' to Drag Pivot (while moving).") + "\n" + TTR("Alt+RMB: Depth list selection"));
@@ -4116,14 +3822,14 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
move_button = memnew(ToolButton);
hb->add_child(move_button);
move_button->set_toggle_mode(true);
- move_button->connect("pressed", this, "_tool_select", make_binds(TOOL_MOVE));
+ move_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_MOVE));
move_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/move_mode", TTR("Move Mode"), KEY_W));
move_button->set_tooltip(TTR("Move Mode"));
rotate_button = memnew(ToolButton);
hb->add_child(rotate_button);
rotate_button->set_toggle_mode(true);
- rotate_button->connect("pressed", this, "_tool_select", make_binds(TOOL_ROTATE));
+ rotate_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_ROTATE));
rotate_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/rotate_mode", TTR("Rotate Mode"), KEY_E));
rotate_button->set_tooltip(TTR("Rotate Mode"));
@@ -4132,19 +3838,19 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
list_select_button = memnew(ToolButton);
hb->add_child(list_select_button);
list_select_button->set_toggle_mode(true);
- list_select_button->connect("pressed", this, "_tool_select", make_binds(TOOL_LIST_SELECT));
+ list_select_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_LIST_SELECT));
list_select_button->set_tooltip(TTR("Show a list of all objects at the position clicked\n(same as Alt+RMB in select mode)."));
pivot_button = memnew(ToolButton);
hb->add_child(pivot_button);
pivot_button->set_toggle_mode(true);
- pivot_button->connect("pressed", this, "_tool_select", make_binds(TOOL_EDIT_PIVOT));
+ pivot_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_EDIT_PIVOT));
pivot_button->set_tooltip(TTR("Click to change object's rotation pivot."));
pan_button = memnew(ToolButton);
hb->add_child(pan_button);
pan_button->set_toggle_mode(true);
- pan_button->connect("pressed", this, "_tool_select", make_binds(TOOL_PAN));
+ pan_button->connect("pressed", this, "_button_tool_select", make_binds(TOOL_PAN));
pan_button->set_tooltip(TTR("Pan Mode"));
hb->add_child(memnew(VSeparator));
@@ -4152,7 +3858,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
snap_button = memnew(ToolButton);
hb->add_child(snap_button);
snap_button->set_toggle_mode(true);
- snap_button->connect("toggled", this, "_toggle_snap");
+ snap_button->connect("toggled", this, "_button_toggle_snap");
snap_button->set_tooltip(TTR("Toggles snapping"));
snap_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/use_snap", TTR("Use Snap"), KEY_S));
@@ -4179,6 +3885,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
smartsnap_config_popup->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/snap_node_parent", TTR("Snap to parent")), SNAP_USE_NODE_PARENT);
smartsnap_config_popup->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/snap_node_anchors", TTR("Snap to node anchor")), SNAP_USE_NODE_ANCHORS);
smartsnap_config_popup->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/snap_node_sides", TTR("Snap to node sides")), SNAP_USE_NODE_SIDES);
+ smartsnap_config_popup->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/snap_node_center", TTR("Snap to node center")), SNAP_USE_NODE_CENTER);
smartsnap_config_popup->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/snap_other_nodes", TTR("Snap to other nodes")), SNAP_USE_OTHER_NODES);
smartsnap_config_popup->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/snap_guides", TTR("Snap to guides")), SNAP_USE_GUIDES);
@@ -4310,9 +4017,6 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
selection_menu->connect("id_pressed", this, "_selection_result_pressed");
selection_menu->connect("popup_hide", this, "_selection_menu_hide");
- drag_pivot_shortcut = ED_SHORTCUT("canvas_item_editor/drag_pivot", TTR("Drag pivot from mouse position"), KEY_MASK_SHIFT | KEY_V);
- set_pivot_shortcut = ED_SHORTCUT("canvas_item_editor/set_pivot", TTR("Set pivot at mouse position"), KEY_V);
-
multiply_grid_step_shortcut = ED_SHORTCUT("canvas_item_editor/multiply_grid_step", TTR("Multiply grid step by 2"), KEY_KP_MULTIPLY);
divide_grid_step_shortcut = ED_SHORTCUT("canvas_item_editor/divide_grid_step", TTR("Divide grid step by 2"), KEY_KP_DIVIDE);
@@ -4320,9 +4024,6 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
key_rot = true;
key_scale = false;
- edited_guide_pos = Point2();
- edited_guide_index = -1;
-
show_grid = false;
show_helpers = false;
show_rulers = true;
@@ -4337,6 +4038,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
snap_node_parent = true;
snap_node_anchors = true;
snap_node_sides = true;
+ snap_node_center = true;
snap_other_nodes = true;
snap_grid = true;
snap_guides = true;
@@ -4344,17 +4046,19 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
snap_pixel = false;
skeleton_show_bones = true;
skeleton_menu->get_popup()->set_item_checked(skeleton_menu->get_popup()->get_item_index(SKELETON_SHOW_BONES), true);
- box_selecting = false;
- //zoom=0.5;
singleton = this;
set_process_unhandled_key_input(true);
- can_move_pivot = false;
- drag = DRAG_NONE;
+
+ drag_type = DRAG_NONE;
+ drag_from = Vector2();
+ drag_to = Vector2();
+ dragged_guide_pos = Point2();
+ dragged_guide_index = -1;
+
bone_last_frame = 0;
- additive_selection = false;
- // Update the menus checkboxes
+ // Update the menus' checkboxes
call_deferred("set_state", get_state());
}
@@ -4377,7 +4081,7 @@ void CanvasItemEditorPlugin::make_visible(bool p_visible) {
canvas_item_editor->show();
canvas_item_editor->set_physics_process(true);
VisualServer::get_singleton()->viewport_set_hide_canvas(editor->get_scene_root()->get_viewport_rid(), false);
- canvas_item_editor->viewport_base->grab_focus();
+ canvas_item_editor->viewport->grab_focus();
} else {
diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h
index ee9be86cce..adf203cf3d 100644
--- a/editor/plugins/canvas_item_editor_plugin.h
+++ b/editor/plugins/canvas_item_editor_plugin.h
@@ -50,9 +50,6 @@ class CanvasItemEditorSelectedItem : public Object {
GDCLASS(CanvasItemEditorSelectedItem, Object);
public:
- Variant undo_state;
- Vector2 undo_pivot;
-
Transform2D prev_xform;
float prev_rot;
Rect2 prev_rect;
@@ -62,6 +59,11 @@ public:
Transform2D pre_drag_xform;
Rect2 pre_drag_rect;
+ List<float> pre_drag_bones_length;
+ List<Dictionary> pre_drag_bones_undo_state;
+
+ Dictionary undo_state;
+
CanvasItemEditorSelectedItem() { prev_rot = 0; }
};
@@ -86,6 +88,7 @@ class CanvasItemEditor : public VBoxContainer {
SNAP_USE_NODE_PARENT,
SNAP_USE_NODE_ANCHORS,
SNAP_USE_NODE_SIDES,
+ SNAP_USE_NODE_CENTER,
SNAP_USE_OTHER_NODES,
SNAP_USE_GRID,
SNAP_USE_GUIDES,
@@ -169,6 +172,7 @@ class CanvasItemEditor : public VBoxContainer {
enum DragType {
DRAG_NONE,
+ DRAG_BOX_SELECTION,
DRAG_LEFT,
DRAG_TOP_LEFT,
DRAG_TOP,
@@ -185,29 +189,20 @@ class CanvasItemEditor : public VBoxContainer {
DRAG_ALL,
DRAG_ROTATE,
DRAG_PIVOT,
- DRAG_NODE_2D,
DRAG_V_GUIDE,
DRAG_H_GUIDE,
DRAG_DOUBLE_GUIDE,
- };
-
- enum KeyMoveMODE {
- MOVE_VIEW_BASE,
- MOVE_LOCAL_BASE,
- MOVE_LOCAL_WITH_ROT
+ DRAG_KEY_MOVE
};
EditorSelection *editor_selection;
- bool additive_selection;
+ bool selection_menu_additive_selection;
Tool tool;
bool first_update;
Control *viewport;
- Control *viewport_base;
Control *viewport_scrollable;
- bool can_move_pivot;
-
HScrollBar *h_scroll;
VScrollBar *v_scroll;
HBoxContainer *hb;
@@ -233,6 +228,7 @@ class CanvasItemEditor : public VBoxContainer {
bool snap_node_parent;
bool snap_node_anchors;
bool snap_node_sides;
+ bool snap_node_center;
bool snap_other_nodes;
bool snap_grid;
bool snap_guides;
@@ -240,14 +236,10 @@ class CanvasItemEditor : public VBoxContainer {
bool snap_relative;
bool snap_pixel;
bool skeleton_show_bones;
- bool box_selecting;
- Point2 box_selecting_to;
bool key_pos;
bool key_rot;
bool key_scale;
- void _tool_select(int p_index);
-
MenuOption last_option;
struct _SelectResult {
@@ -267,33 +259,17 @@ class CanvasItemEditor : public VBoxContainer {
Transform2D xform;
Vector2 from;
Vector2 to;
- ObjectID bone;
uint64_t last_pass;
};
-
uint64_t bone_last_frame;
Map<ObjectID, BoneList> bone_list;
- Transform2D bone_orig_xform;
-
- struct BoneIK {
-
- Variant orig_state;
- Vector2 pos;
- float len;
- Node2D *node;
- };
-
- List<BoneIK> bone_ik_list;
-
struct PoseClipboard {
-
Vector2 pos;
Vector2 scale;
float rot;
ObjectID id;
};
-
List<PoseClipboard> pose_clipboard;
ToolButton *select_button;
@@ -333,16 +309,17 @@ class CanvasItemEditor : public VBoxContainer {
Control *top_ruler;
Control *left_ruler;
- //PopupMenu *popup;
- DragType drag;
+ DragType drag_type;
Point2 drag_from;
- Point2 drag_point_from;
+ Point2 drag_to;
+ Point2 drag_rotation_center;
+ List<CanvasItem *> drag_selection;
+ int dragged_guide_index;
+ Point2 dragged_guide_pos;
+
bool updating_value_dialog;
- Point2 display_rotate_from;
- Point2 display_rotate_to;
- int edited_guide_index;
- Point2 edited_guide_pos;
+ Point2 box_selecting_to;
Ref<StyleBoxTexture> select_sb;
Ref<Texture> select_handle;
@@ -353,28 +330,19 @@ class CanvasItemEditor : public VBoxContainer {
Ref<ShortCut> multiply_grid_step_shortcut;
Ref<ShortCut> divide_grid_step_shortcut;
- int handle_len;
- bool _is_part_of_subscene(CanvasItem *p_item);
- void _find_canvas_items_at_pos(const Point2 &p_pos, Node *p_node, const Transform2D &p_parent_xform, const Transform2D &p_canvas_xform, Vector<_SelectResult> &r_items, int limit = 0);
- void _find_canvas_items_at_rect(const Rect2 &p_rect, Node *p_node, const Transform2D &p_parent_xform, const Transform2D &p_canvas_xform, List<CanvasItem *> *r_items);
-
- void _select_click_on_empty_area(Point2 p_click_pos, bool p_append, bool p_box_selection);
- bool _select_click_on_item(CanvasItem *item, Point2 p_click_pos, bool p_append, bool p_drag);
+ void _find_canvas_items_at_pos(const Point2 &p_pos, Node *p_node, Vector<_SelectResult> &r_items, int limit = 0, const Transform2D &p_parent_xform = Transform2D(), const Transform2D &p_canvas_xform = Transform2D());
+ void _find_canvas_items_at_rect(const Rect2 &p_rect, Node *p_node, List<CanvasItem *> *r_items, const Transform2D &p_parent_xform = Transform2D(), const Transform2D &p_canvas_xform = Transform2D());
+ bool _select_click_on_item(CanvasItem *item, Point2 p_click_pos, bool p_append);
ConfirmationDialog *snap_dialog;
CanvasItem *ref_item;
- void _edit_set_pivot(const Vector2 &mouse_pos);
void _add_canvas_item(CanvasItem *p_canvas_item);
- void _remove_canvas_item(CanvasItem *p_canvas_item);
- void _clear_canvas_items();
- void _key_move(const Vector2 &p_dir, bool p_snap, KeyMoveMODE p_move_mode);
- void _list_select(const Ref<InputEventMouseButton> &b);
- DragType _get_resize_handle_drag_type(const Point2 &p_click, Vector2 &r_point);
- void _prepare_drag(const Point2 &p_click_pos);
- DragType _get_anchor_handle_drag_type(const Point2 &p_click, Vector2 &r_point);
+ void _save_canvas_item_state(List<CanvasItem *> p_canvas_items, bool save_bones = false);
+ void _restore_canvas_item_state(List<CanvasItem *> p_canvas_items, bool restore_bones = false);
+ void _commit_canvas_item_state(List<CanvasItem *> p_canvas_items, String action_name, bool commit_bones = false);
Vector2 _anchor_to_position(const Control *p_control, Vector2 anchor);
Vector2 _position_to_anchor(const Control *p_control, Vector2 position);
@@ -383,27 +351,21 @@ class CanvasItemEditor : public VBoxContainer {
bool updating_scroll;
void _update_scroll(float);
void _update_scrollbars();
- void _update_cursor();
- void incbeg(float &beg, float &end, float inc, float minsize, bool p_symmetric);
- void incend(float &beg, float &end, float inc, float minsize, bool p_symmetric);
-
void _append_canvas_item(CanvasItem *p_item);
void _snap_changed();
void _selection_result_pressed(int);
void _selection_menu_hide();
UndoRedo *undo_redo;
-
- Point2 _find_topleftmost_point();
-
void _build_bones_list(Node *p_node);
- void _get_encompassing_rect(Node *p_node, Rect2 &r_rect, const Transform2D &p_xform);
+ List<CanvasItem *> _get_edited_canvas_items(bool retreive_locked = false, bool remove_canvas_item_if_parent_in_selection = true);
+ Rect2 _get_encompassing_rect_from_list(List<CanvasItem *> p_list);
+ void _expand_encompassing_rect_using_children(Rect2 &p_rect, Node *p_node, bool &r_first, const Transform2D &p_parent_xform = Transform2D(), const Transform2D &p_canvas_xform = Transform2D());
+ Rect2 _get_scene_encompassing_rect();
Object *_get_editor_data(Object *p_what);
- CanvasItem *_get_single_item();
- int get_item_count();
void _keying_changed();
void _unhandled_key_input(const Ref<InputEvent> &p_ev);
@@ -411,6 +373,7 @@ class CanvasItemEditor : public VBoxContainer {
void _draw_text_at_position(Point2 p_position, String p_string, Margin p_side);
void _draw_margin_at_position(int p_value, Point2 p_position, Margin p_side);
void _draw_percentage_at_position(float p_value, Point2 p_position, Margin p_side);
+ void _draw_straight_line(Point2 p_from, Point2 p_to, Color p_color);
void _draw_rulers();
void _draw_guides();
@@ -422,13 +385,23 @@ class CanvasItemEditor : public VBoxContainer {
void _draw_locks_and_groups(Node *p_node, const Transform2D &p_xform);
void _draw_viewport();
- void _draw_viewport_base();
+
+ bool _gui_input_anchors(const Ref<InputEvent> &p_event);
+ bool _gui_input_move(const Ref<InputEvent> &p_event);
+ bool _gui_input_open_scene_on_double_click(const Ref<InputEvent> &p_event);
+ bool _gui_input_pivot(const Ref<InputEvent> &p_event);
+ bool _gui_input_resize(const Ref<InputEvent> &p_event);
+ bool _gui_input_rotate(const Ref<InputEvent> &p_event);
+ bool _gui_input_select(const Ref<InputEvent> &p_event);
+ bool _gui_input_zoom_or_pan(const Ref<InputEvent> &p_event);
+ bool _gui_input_rulers_and_guides(const Ref<InputEvent> &p_event);
void _gui_input_viewport(const Ref<InputEvent> &p_event);
- void _gui_input_viewport_base(const Ref<InputEvent> &p_event);
void _focus_selection(int p_op);
+ void _solve_IK(Node2D *leaf_node, Point2 target_position);
+
void _snap_if_closer_float(float p_value, float p_target_snap, float &r_current_snap, bool &r_snapped, float p_radius = 10.0);
void _snap_if_closer_point(Point2 p_value, Point2 p_target_snap, Point2 &r_current_snap, bool (&r_snapped)[2], real_t rotation = 0.0, float p_radius = 10.0);
void _snap_other_nodes(Point2 p_value, Point2 &r_current_snap, bool (&r_snapped)[2], const Node *p_current, const CanvasItem *p_to_snap = NULL);
@@ -437,12 +410,13 @@ class CanvasItemEditor : public VBoxContainer {
void _set_margins_preset(Control::LayoutPreset p_preset);
void _set_anchors_and_margins_preset(Control::LayoutPreset p_preset);
+ HBoxContainer *zoom_hb;
void _zoom_on_position(float p_zoom, Point2 p_position = Point2());
- void _zoom_minus();
- void _zoom_reset();
- void _zoom_plus();
-
- void _toggle_snap(bool p_status);
+ void _button_zoom_minus();
+ void _button_zoom_reset();
+ void _button_zoom_plus();
+ void _button_toggle_snap(bool p_status);
+ void _button_tool_select(int p_index);
HSplitContainer *palette_split;
VSplitContainer *bottom_split;
@@ -494,9 +468,10 @@ public:
SNAP_NODE_PARENT = 1 << 3,
SNAP_NODE_ANCHORS = 1 << 4,
SNAP_NODE_SIDES = 1 << 5,
- SNAP_OTHER_NODES = 1 << 6,
+ SNAP_NODE_CENTER = 1 << 6,
+ SNAP_OTHER_NODES = 1 << 7,
- SNAP_DEFAULT = 0x07,
+ SNAP_DEFAULT = SNAP_GRID | SNAP_GUIDES | SNAP_PIXEL,
};
Point2 snap_point(Point2 p_target, unsigned int p_modes = SNAP_DEFAULT, const CanvasItem *p_canvas_item = NULL, unsigned int p_forced_modes = 0);
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index bd8c502a80..a2641738f3 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -1576,6 +1576,9 @@ void ScriptEditor::_update_script_names() {
case SORT_BY_PATH: {
sd.sort_key = path;
} break;
+ case SORT_BY_NONE: {
+ sd.sort_key = "";
+ } break;
}
switch (display_as) {
@@ -2926,7 +2929,7 @@ ScriptEditorPlugin::ScriptEditorPlugin(EditorNode *p_node) {
EDITOR_DEF("text_editor/open_scripts/script_temperature_history_size", 15);
EDITOR_DEF("text_editor/open_scripts/current_script_background_color", Color(1, 1, 1, 0.3));
EDITOR_DEF("text_editor/open_scripts/group_help_pages", true);
- EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "text_editor/open_scripts/sort_scripts_by", PROPERTY_HINT_ENUM, "Name,Path"));
+ EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "text_editor/open_scripts/sort_scripts_by", PROPERTY_HINT_ENUM, "Name,Path,None"));
EDITOR_DEF("text_editor/open_scripts/sort_scripts_by", 0);
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "text_editor/open_scripts/list_script_names_as", PROPERTY_HINT_ENUM, "Name,Parent Directory And Name,Full Path"));
EDITOR_DEF("text_editor/open_scripts/list_script_names_as", 0);
diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h
index e98a4c97a6..a5531c96b5 100644
--- a/editor/plugins/script_editor_plugin.h
+++ b/editor/plugins/script_editor_plugin.h
@@ -165,6 +165,7 @@ class ScriptEditor : public PanelContainer {
enum ScriptSortBy {
SORT_BY_NAME,
SORT_BY_PATH,
+ SORT_BY_NONE
};
enum ScriptListName {
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 87e92f0807..aeba0ff930 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -935,13 +935,27 @@ void ScriptTextEditor::_edit_option(int p_op) {
Ref<Script> scr = get_edited_script();
if (scr.is_null())
return;
-
tx->begin_complex_operation();
- int line = tx->cursor_get_line();
- tx->set_line(tx->cursor_get_line(), "");
- tx->backspace_at_cursor();
- tx->unfold_line(line);
- tx->cursor_set_line(line);
+ if (tx->is_selection_active()) {
+ int to_line = tx->get_selection_to_line();
+ int from_line = tx->get_selection_from_line();
+ int count = Math::abs(to_line - from_line) + 1;
+ while (count) {
+ tx->set_line(tx->cursor_get_line(), "");
+ tx->backspace_at_cursor();
+ count--;
+ if (count)
+ tx->unfold_line(from_line);
+ }
+ tx->cursor_set_line(from_line - 1);
+ tx->deselect();
+ } else {
+ int line = tx->cursor_get_line();
+ tx->set_line(tx->cursor_get_line(), "");
+ tx->backspace_at_cursor();
+ tx->unfold_line(line);
+ tx->cursor_set_line(line);
+ }
tx->end_complex_operation();
} break;
case EDIT_CLONE_DOWN: {
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index da283b16dc..9c3b09608b 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -304,8 +304,9 @@ private:
ProjectSettings *current = memnew(ProjectSettings);
- if (current->setup(dir, "")) {
- set_message(TTR("Couldn't get project.godot in project path."), MESSAGE_ERROR);
+ int err = current->setup(dir, "");
+ if (err != OK) {
+ set_message(vformat(TTR("Couldn't load project.godot in project path (error %d). It may be missing or corrupted."), err), MESSAGE_ERROR);
} else {
ProjectSettings::CustomMap edited_settings;
edited_settings["application/config/name"] = project_name->get_text();
@@ -530,8 +531,9 @@ public:
ProjectSettings *current = memnew(ProjectSettings);
- if (current->setup(project_path->get_text(), "")) {
- set_message(TTR("Couldn't get project.godot in the project path."), MESSAGE_ERROR);
+ int err = current->setup(project_path->get_text(), "");
+ if (err != OK) {
+ set_message(vformat(TTR("Couldn't load project.godot in project path (error %d). It may be missing or corrupted."), err), MESSAGE_ERROR);
status_rect->show();
msg->show();
get_ok()->set_disabled(true);
diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp
index fd21b83605..0a3e2da5e9 100644
--- a/editor/scene_tree_editor.cpp
+++ b/editor/scene_tree_editor.cpp
@@ -69,24 +69,10 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_i
emit_signal("open_script", script);
} else if (p_id == BUTTON_VISIBILITY) {
-
- if (n->is_class("Spatial")) {
-
- bool v = bool(n->call("is_visible"));
- undo_redo->create_action(TTR("Toggle Spatial Visible"));
- undo_redo->add_do_method(n, "set_visible", !v);
- undo_redo->add_undo_method(n, "set_visible", v);
- undo_redo->commit_action();
-
- } else if (n->is_class("CanvasItem")) {
-
- bool v = bool(n->call("is_visible"));
- undo_redo->create_action(TTR("Toggle CanvasItem Visible"));
- undo_redo->add_do_method(n, v ? "hide" : "show");
- undo_redo->add_undo_method(n, v ? "show" : "hide");
- undo_redo->commit_action();
- }
-
+ undo_redo->create_action(TTR("Toggle Visible"));
+ undo_redo->add_do_method(this, "toggle_visible", n);
+ undo_redo->add_undo_method(this, "toggle_visible", n);
+ undo_redo->commit_action();
} else if (p_id == BUTTON_LOCK) {
if (n->is_class("CanvasItem") || n->is_class("Spatial")) {
@@ -131,7 +117,34 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_i
NodeDock::singleton->show_groups();
}
}
+void SceneTreeEditor::_toggle_visible(Node *p_node) {
+ if (p_node->is_class("Spatial")) {
+ bool v = bool(p_node->call("is_visible"));
+ p_node->call("set_visible", !v);
+ } else if (p_node->is_class("CanvasItem")) {
+ bool v = bool(p_node->call("is_visible"));
+ if (v) {
+ p_node->call("hide");
+ } else {
+ p_node->call("show");
+ }
+ }
+}
+void SceneTreeEditor::toggle_visible(Node *p_node) {
+ _toggle_visible(p_node);
+ List<Node *> selection = editor_selection->get_selected_node_list();
+ if (selection.size() > 1) {
+ for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
+ Node *nv = E->get();
+ ERR_FAIL_COND(!nv);
+ if (nv == p_node) {
+ continue;
+ }
+ _toggle_visible(nv);
+ }
+ }
+}
bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
if (!p_node)
@@ -949,6 +962,8 @@ void SceneTreeEditor::_bind_methods() {
ClassDB::bind_method("_cell_collapsed", &SceneTreeEditor::_cell_collapsed);
ClassDB::bind_method("_rmb_select", &SceneTreeEditor::_rmb_select);
ClassDB::bind_method("_warning_changed", &SceneTreeEditor::_warning_changed);
+ ClassDB::bind_method("_toggle_visible", &SceneTreeEditor::_toggle_visible);
+ ClassDB::bind_method("toggle_visible", &SceneTreeEditor::toggle_visible);
ClassDB::bind_method("_node_script_changed", &SceneTreeEditor::_node_script_changed);
ClassDB::bind_method("_node_visibility_changed", &SceneTreeEditor::_node_visibility_changed);
diff --git a/editor/scene_tree_editor.h b/editor/scene_tree_editor.h
index 45194bb81d..b63eb2a1f0 100644
--- a/editor/scene_tree_editor.h
+++ b/editor/scene_tree_editor.h
@@ -70,6 +70,8 @@ class SceneTreeEditor : public Control {
void _compute_hash(Node *p_node, uint64_t &hash);
+ void toggle_visible(Node *p_node);
+
bool _add_nodes(Node *p_node, TreeItem *p_parent);
void _test_update_tree();
void _update_tree();
@@ -103,6 +105,7 @@ class SceneTreeEditor : public Control {
static void _bind_methods();
void _cell_button_pressed(Object *p_item, int p_column, int p_id);
+ void _toggle_visible(Node *p_node);
void _cell_multi_selected(Object *p_object, int p_cell, bool p_selected);
void _update_selection(TreeItem *item);
void _node_script_changed(Node *p_node);
diff --git a/main/main.cpp b/main/main.cpp
index f6b3bafc5a..a4ef357543 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -122,13 +122,18 @@ static bool force_lowdpi = false;
static int init_screen = -1;
static bool use_vsync = true;
static bool editor = false;
-static bool project_manager = false;
static bool show_help = false;
static bool disable_render_loop = false;
static int fixed_fps = -1;
static OS::ProcessID allow_focus_steal_pid = 0;
+static bool project_manager = false;
+
+bool Main::is_project_manager() {
+ return project_manager;
+}
+
void initialize_physics() {
/// 3D Physics Server
@@ -775,6 +780,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
OS::get_singleton()->add_logger(memnew(RotatedFileLogger(base_path, max_files)));
}
+#ifdef TOOLS_ENABLED
if (editor) {
Engine::get_singleton()->set_editor_hint(true);
main_args.push_back("--editor");
@@ -782,22 +788,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
init_maximized = true;
video_mode.maximized = true;
}
- use_custom_res = false;
- }
-
- if (bool(ProjectSettings::get_singleton()->get("application/run/disable_stdout"))) {
- quiet_stdout = true;
}
- if (bool(ProjectSettings::get_singleton()->get("application/run/disable_stderr"))) {
- _print_error_enabled = false;
- };
-
- if (quiet_stdout)
- _print_line_enabled = false;
-
- OS::get_singleton()->set_cmdline(execpath, main_args);
-
-#ifdef TOOLS_ENABLED
if (!project_manager) {
// Determine if the project manager should be requested
@@ -807,17 +798,26 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
(!ProjectSettings::get_singleton()->has_setting("application/run/main_scene") ||
String(ProjectSettings::get_singleton()->get("application/run/main_scene")) == "");
}
-
- if (project_manager) {
- use_custom_res = false; //project manager (run without arguments)
- }
-
#endif
- if (editor)
+ if (editor || project_manager) {
+ use_custom_res = false;
input_map->load_default(); //keys for editor
- else
+ } else {
input_map->load_from_globals(); //keys for game
+ }
+
+ if (bool(ProjectSettings::get_singleton()->get("application/run/disable_stdout"))) {
+ quiet_stdout = true;
+ }
+ if (bool(ProjectSettings::get_singleton()->get("application/run/disable_stderr"))) {
+ _print_error_enabled = false;
+ };
+
+ if (quiet_stdout)
+ _print_line_enabled = false;
+
+ OS::get_singleton()->set_cmdline(execpath, main_args);
//if (video_driver == "") // useless for now, so removing
// video_driver = GLOBAL_DEF("display/driver/name", Variant((const char *)OS::get_singleton()->get_video_driver_name(0)));
@@ -1099,7 +1099,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
MAIN_PRINT("Main: Create bootsplash");
#if defined(TOOLS_ENABLED) && !defined(NO_EDITOR_SPLASH)
- Ref<Image> splash = editor ? memnew(Image(boot_splash_editor_png)) : memnew(Image(boot_splash_png));
+ Ref<Image> splash = (editor || project_manager) ? memnew(Image(boot_splash_editor_png)) : memnew(Image(boot_splash_png));
#else
Ref<Image> splash = memnew(Image(boot_splash_png));
#endif
@@ -1125,7 +1125,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
ProjectSettings::get_singleton()->set_custom_property_info("application/config/icon", PropertyInfo(Variant::STRING, "application/config/icon", PROPERTY_HINT_FILE, "*.png,*.webp"));
if (bool(GLOBAL_DEF("display/window/handheld/emulate_touchscreen", false))) {
- if (!OS::get_singleton()->has_touchscreen_ui_hint() && Input::get_singleton() && !editor) {
+ if (!OS::get_singleton()->has_touchscreen_ui_hint() && Input::get_singleton() && !(editor || project_manager)) {
//only if no touchscreen ui hint, set emulation
InputDefault *id = Object::cast_to<InputDefault>(Input::get_singleton());
if (id)
@@ -1213,7 +1213,6 @@ bool Main::start() {
ERR_FAIL_COND_V(!_start_success, false);
bool hasicon = false;
- bool editor = false;
String doc_tool;
List<String> removal_docs;
bool doc_base = true;
@@ -1447,7 +1446,7 @@ bool Main::start() {
{
}
- if (!editor) {
+ if (!editor && !project_manager) {
//standard helpers that can be changed from main config
String stretch_mode = GLOBAL_DEF("display/window/stretch/mode", "disabled");
@@ -1558,7 +1557,7 @@ bool Main::start() {
#endif
}
- if (!project_manager && !editor) {
+ if (!project_manager && !editor) { // game
if (game_path != "" || script != "") {
//autoload
List<PropertyInfo> props;
@@ -1640,7 +1639,6 @@ bool Main::start() {
sml->get_root()->add_child(E->get());
}
- //singletons
}
if (game_path != "") {
diff --git a/main/main.h b/main/main.h
index 1165c79494..8b805fa1d0 100644
--- a/main/main.h
+++ b/main/main.h
@@ -56,6 +56,7 @@ public:
static bool iteration();
static void cleanup();
static void force_redraw();
+ static bool is_project_manager();
};
#endif
diff --git a/modules/bullet/doc_classes/BulletPhysicsDirectBodyState.xml b/modules/bullet/doc_classes/BulletPhysicsDirectBodyState.xml
index c7909c7d72..8c8647e097 100644
--- a/modules/bullet/doc_classes/BulletPhysicsDirectBodyState.xml
+++ b/modules/bullet/doc_classes/BulletPhysicsDirectBodyState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BulletPhysicsDirectBodyState" inherits="PhysicsDirectBodyState" category="Core" version="3.0-stable">
+<class name="BulletPhysicsDirectBodyState" inherits="PhysicsDirectBodyState" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/modules/bullet/doc_classes/BulletPhysicsServer.xml b/modules/bullet/doc_classes/BulletPhysicsServer.xml
index a59abb0ebb..8ed84e1dec 100644
--- a/modules/bullet/doc_classes/BulletPhysicsServer.xml
+++ b/modules/bullet/doc_classes/BulletPhysicsServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BulletPhysicsServer" inherits="PhysicsServer" category="Core" version="3.0-stable">
+<class name="BulletPhysicsServer" inherits="PhysicsServer" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/modules/bullet/rigid_body_bullet.cpp b/modules/bullet/rigid_body_bullet.cpp
index f96218ef46..75b4cc054a 100644
--- a/modules/bullet/rigid_body_bullet.cpp
+++ b/modules/bullet/rigid_body_bullet.cpp
@@ -114,10 +114,18 @@ Transform BulletPhysicsDirectBodyState::get_transform() const {
return body->get_transform();
}
+void BulletPhysicsDirectBodyState::add_central_force(const Vector3 &p_force) {
+ body->apply_central_force(p_force);
+}
+
void BulletPhysicsDirectBodyState::add_force(const Vector3 &p_force, const Vector3 &p_pos) {
body->apply_force(p_force, p_pos);
}
+void BulletPhysicsDirectBodyState::add_torque(const Vector3 &p_torque) {
+ body->apply_torque(p_torque);
+}
+
void BulletPhysicsDirectBodyState::apply_impulse(const Vector3 &p_pos, const Vector3 &p_j) {
body->apply_impulse(p_pos, p_j);
}
diff --git a/modules/bullet/rigid_body_bullet.h b/modules/bullet/rigid_body_bullet.h
index c4a9676bdd..2d529f6dc7 100644
--- a/modules/bullet/rigid_body_bullet.h
+++ b/modules/bullet/rigid_body_bullet.h
@@ -110,7 +110,9 @@ public:
virtual void set_transform(const Transform &p_transform);
virtual Transform get_transform() const;
+ virtual void add_central_force(const Vector3 &p_force);
virtual void add_force(const Vector3 &p_force, const Vector3 &p_pos);
+ virtual void add_torque(const Vector3 &p_torque);
virtual void apply_impulse(const Vector3 &p_pos, const Vector3 &p_j);
virtual void apply_torque_impulse(const Vector3 &p_j);
diff --git a/modules/enet/doc_classes/NetworkedMultiplayerENet.xml b/modules/enet/doc_classes/NetworkedMultiplayerENet.xml
index 23ee327cc5..55a7a1ac77 100644
--- a/modules/enet/doc_classes/NetworkedMultiplayerENet.xml
+++ b/modules/enet/doc_classes/NetworkedMultiplayerENet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NetworkedMultiplayerENet" inherits="NetworkedMultiplayerPeer" category="Core" version="3.0-stable">
+<class name="NetworkedMultiplayerENet" inherits="NetworkedMultiplayerPeer" category="Core" version="3.1-dev">
<brief_description>
PacketPeer implementation using the ENet library.
</brief_description>
diff --git a/modules/gdnative/doc_classes/ARVRInterfaceGDNative.xml b/modules/gdnative/doc_classes/ARVRInterfaceGDNative.xml
index bceb4f1f4c..998460eee1 100644
--- a/modules/gdnative/doc_classes/ARVRInterfaceGDNative.xml
+++ b/modules/gdnative/doc_classes/ARVRInterfaceGDNative.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ARVRInterfaceGDNative" inherits="ARVRInterface" category="Core" version="3.0-stable">
+<class name="ARVRInterfaceGDNative" inherits="ARVRInterface" category="Core" version="3.1-dev">
<brief_description>
GDNative wrapper for an ARVR interface
</brief_description>
diff --git a/modules/gdnative/doc_classes/GDNative.xml b/modules/gdnative/doc_classes/GDNative.xml
index 7e4d956604..4e87cbf450 100644
--- a/modules/gdnative/doc_classes/GDNative.xml
+++ b/modules/gdnative/doc_classes/GDNative.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GDNative" inherits="Reference" category="Core" version="3.0-stable">
+<class name="GDNative" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/modules/gdnative/doc_classes/GDNativeLibrary.xml b/modules/gdnative/doc_classes/GDNativeLibrary.xml
index a6874c9ae8..ca1bae0598 100644
--- a/modules/gdnative/doc_classes/GDNativeLibrary.xml
+++ b/modules/gdnative/doc_classes/GDNativeLibrary.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GDNativeLibrary" inherits="Resource" category="Core" version="3.0-stable">
+<class name="GDNativeLibrary" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/modules/gdnative/doc_classes/PluginScript.xml b/modules/gdnative/doc_classes/PluginScript.xml
index fbdd8f09e6..3783d9d0a4 100644
--- a/modules/gdnative/doc_classes/PluginScript.xml
+++ b/modules/gdnative/doc_classes/PluginScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PluginScript" inherits="Script" category="Core" version="3.0-stable">
+<class name="PluginScript" inherits="Script" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/modules/gdscript/doc_classes/GDScript.xml b/modules/gdscript/doc_classes/GDScript.xml
index 59cb00e3f6..0dc69c3688 100644
--- a/modules/gdscript/doc_classes/GDScript.xml
+++ b/modules/gdscript/doc_classes/GDScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GDScript" inherits="Script" category="Core" version="3.0-stable">
+<class name="GDScript" inherits="Script" category="Core" version="3.1-dev">
<brief_description>
A script implemented in the GDScript programming language.
</brief_description>
diff --git a/modules/gdscript/doc_classes/GDScriptFunctionState.xml b/modules/gdscript/doc_classes/GDScriptFunctionState.xml
index 8510136f68..254d968e1b 100644
--- a/modules/gdscript/doc_classes/GDScriptFunctionState.xml
+++ b/modules/gdscript/doc_classes/GDScriptFunctionState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GDScriptFunctionState" inherits="Reference" category="Core" version="3.0-stable">
+<class name="GDScriptFunctionState" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
State of a function call after yielding.
</brief_description>
diff --git a/modules/gdscript/doc_classes/GDScriptNativeClass.xml b/modules/gdscript/doc_classes/GDScriptNativeClass.xml
index 48826ec1e0..1abcc4762f 100644
--- a/modules/gdscript/doc_classes/GDScriptNativeClass.xml
+++ b/modules/gdscript/doc_classes/GDScriptNativeClass.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GDScriptNativeClass" inherits="Reference" category="Core" version="3.0-stable">
+<class name="GDScriptNativeClass" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/modules/gridmap/doc_classes/GridMap.xml b/modules/gridmap/doc_classes/GridMap.xml
index 44685220b3..36d4d7cb59 100644
--- a/modules/gridmap/doc_classes/GridMap.xml
+++ b/modules/gridmap/doc_classes/GridMap.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GridMap" inherits="Spatial" category="Core" version="3.0-stable">
+<class name="GridMap" inherits="Spatial" category="Core" version="3.1-dev">
<brief_description>
Node for 3D tile-based maps.
</brief_description>
diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp
index 7b7bc0fa2a..34d51b51e2 100644
--- a/modules/gridmap/grid_map_editor_plugin.cpp
+++ b/modules/gridmap/grid_map_editor_plugin.cpp
@@ -99,6 +99,20 @@ void GridMapEditor::_menu_option(int p_option) {
int idx = options->get_popup()->get_item_index(MENU_OPTION_X_AXIS + i);
options->get_popup()->set_item_checked(idx, i == new_axis);
}
+
+ if (edit_axis != new_axis) {
+ int item1 = options->get_popup()->get_item_id(MENU_OPTION_NEXT_LEVEL);
+ int item2 = options->get_popup()->get_item_id(MENU_OPTION_PREV_LEVEL);
+ if (edit_axis == Vector3::AXIS_Y) {
+ options->get_popup()->set_item_text(item1, TTR("Next Plane"));
+ options->get_popup()->set_item_text(item2, TTR("Previous Plane"));
+ spin_box_label->set_text(TTR("Plane:"));
+ } else if (new_axis == Vector3::AXIS_Y) {
+ options->get_popup()->set_item_text(item1, TTR("Next Floor"));
+ options->get_popup()->set_item_text(item2, TTR("Previous Floor"));
+ spin_box_label->set_text(TTR("Floor:"));
+ }
+ }
edit_axis = Vector3::Axis(new_axis);
update_grid();
_update_clip();
@@ -998,9 +1012,9 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) {
spatial_editor_hb->set_alignment(BoxContainer::ALIGN_END);
SpatialEditor::get_singleton()->add_control_to_menu_panel(spatial_editor_hb);
- Label *fl = memnew(Label);
- fl->set_text(TTR("Floor:"));
- spatial_editor_hb->add_child(fl);
+ spin_box_label = memnew(Label);
+ spin_box_label->set_text(TTR("Floor:"));
+ spatial_editor_hb->add_child(spin_box_label);
floor = memnew(SpinBox);
floor->set_min(-32767);
diff --git a/modules/gridmap/grid_map_editor_plugin.h b/modules/gridmap/grid_map_editor_plugin.h
index 3fc92bf7aa..9651770528 100644
--- a/modules/gridmap/grid_map_editor_plugin.h
+++ b/modules/gridmap/grid_map_editor_plugin.h
@@ -82,6 +82,7 @@ class GridMapEditor : public VBoxContainer {
ConfirmationDialog *settings_dialog;
VBoxContainer *settings_vbc;
SpinBox *settings_pick_distance;
+ Label *spin_box_label;
struct SetItem {
diff --git a/modules/mobile_vr/doc_classes/MobileVRInterface.xml b/modules/mobile_vr/doc_classes/MobileVRInterface.xml
index 82300e707a..d3f2548320 100644
--- a/modules/mobile_vr/doc_classes/MobileVRInterface.xml
+++ b/modules/mobile_vr/doc_classes/MobileVRInterface.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MobileVRInterface" inherits="ARVRInterface" category="Core" version="3.0-stable">
+<class name="MobileVRInterface" inherits="ARVRInterface" category="Core" version="3.1-dev">
<brief_description>
Generic mobile VR implementation
</brief_description>
diff --git a/modules/mono/doc_classes/@C#.xml b/modules/mono/doc_classes/@C#.xml
index 0f33c76eb2..0c2bb948ea 100644
--- a/modules/mono/doc_classes/@C#.xml
+++ b/modules/mono/doc_classes/@C#.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="@C#" category="Core" version="3.0-stable">
+<class name="@C#" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/modules/mono/doc_classes/CSharpScript.xml b/modules/mono/doc_classes/CSharpScript.xml
index 3efe71f1b3..9bd57f1d4d 100644
--- a/modules/mono/doc_classes/CSharpScript.xml
+++ b/modules/mono/doc_classes/CSharpScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CSharpScript" inherits="Script" category="Core" version="3.0-stable">
+<class name="CSharpScript" inherits="Script" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/modules/mono/doc_classes/GodotSharp.xml b/modules/mono/doc_classes/GodotSharp.xml
index 1e5edf2a2a..51f07523e7 100644
--- a/modules/mono/doc_classes/GodotSharp.xml
+++ b/modules/mono/doc_classes/GodotSharp.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GodotSharp" inherits="Object" category="Core" version="3.0-stable">
+<class name="GodotSharp" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp
index 62c7a94755..952e033565 100644
--- a/modules/mono/editor/bindings_generator.cpp
+++ b/modules/mono/editor/bindings_generator.cpp
@@ -2231,7 +2231,8 @@ void BindingsGenerator::_populate_builtin_type_interfaces() {
"this." BINDINGS_PTR_FIELD " = NativeCalls.godot_icall_NodePath_Ctor(path);\n" CLOSE_BLOCK_L2
MEMBER_BEGIN "public static implicit operator NodePath(string from)\n" OPEN_BLOCK_L2 "return new NodePath(from);\n" CLOSE_BLOCK_L2
MEMBER_BEGIN "public static implicit operator string(NodePath from)\n" OPEN_BLOCK_L2
- "return NativeCalls." ICALL_PREFIX "NodePath_operator_String(NodePath." CS_SMETHOD_GETINSTANCE "(from));\n" CLOSE_BLOCK_L2);
+ "return NativeCalls." ICALL_PREFIX "NodePath_operator_String(NodePath." CS_SMETHOD_GETINSTANCE "(from));\n" CLOSE_BLOCK_L2
+ MEMBER_BEGIN "public override string ToString()\n" OPEN_BLOCK_L2 "return (string)this;\n" CLOSE_BLOCK_L2);
builtin_types.insert(itype.cname, itype);
// RID
@@ -2365,7 +2366,7 @@ void BindingsGenerator::_populate_builtin_type(TypeInterface &r_itype, Variant::
imethod.name = mi.name;
imethod.cname = imethod.name;
- imethod.proxy_name = mi.name;
+ imethod.proxy_name = escape_csharp_keyword(snake_to_pascal_case(mi.name));
for (int i = 0; i < mi.arguments.size(); i++) {
ArgumentInterface iarg;
diff --git a/modules/mono/glue/cs_files/Basis.cs b/modules/mono/glue/cs_files/Basis.cs
index ea92b1641b..c6cdc069ef 100644
--- a/modules/mono/glue/cs_files/Basis.cs
+++ b/modules/mono/glue/cs_files/Basis.cs
@@ -452,9 +452,9 @@ namespace Godot
public Basis(float xx, float xy, float xz, float yx, float yy, float yz, float zx, float zy, float zz)
{
- this.x = new Vector3(xx, xy, xz);
- this.y = new Vector3(yx, yy, yz);
- this.z = new Vector3(zx, zy, zz);
+ this.x = new Vector3(xx, yx, zx);
+ this.y = new Vector3(xy, yy, zy);
+ this.z = new Vector3(xz, yz, zz);
}
public static Basis operator *(Basis left, Basis right)
diff --git a/modules/mono/mono_gd/gd_mono.cpp b/modules/mono/mono_gd/gd_mono.cpp
index f5febd415b..39474f8cbc 100644
--- a/modules/mono/mono_gd/gd_mono.cpp
+++ b/modules/mono/mono_gd/gd_mono.cpp
@@ -47,6 +47,7 @@
#ifdef TOOLS_ENABLED
#include "../editor/godotsharp_editor.h"
+#include "main/main.h"
#endif
void gdmono_unhandled_exception_hook(MonoObject *exc, void *user_data) {
@@ -94,21 +95,6 @@ static bool _wait_for_debugger_msecs(uint32_t p_msecs) {
}
#endif
-#ifdef TOOLS_ENABLED
-// temporary workaround. should be provided from Main::setup/setup2 instead
-bool _is_project_manager_requested() {
-
- List<String> cmdline_args = OS::get_singleton()->get_cmdline_args();
- for (List<String>::Element *E = cmdline_args.front(); E; E = E->next()) {
- const String &arg = E->get();
- if (arg == "-p" || arg == "--project-manager")
- return true;
- }
-
- return false;
-}
-#endif
-
#ifdef DEBUG_ENABLED
void gdmono_debug_init() {
@@ -121,7 +107,7 @@ void gdmono_debug_init() {
#ifdef TOOLS_ENABLED
if (Engine::get_singleton()->is_editor_hint() ||
ProjectSettings::get_singleton()->get_resource_path().empty() ||
- _is_project_manager_requested()) {
+ Main::is_project_manager()) {
return;
}
#endif
diff --git a/modules/mono/mono_gd/gd_mono_marshal.h b/modules/mono/mono_gd/gd_mono_marshal.h
index 6572408ab5..8fd437223f 100644
--- a/modules/mono/mono_gd/gd_mono_marshal.h
+++ b/modules/mono/mono_gd/gd_mono_marshal.h
@@ -195,9 +195,9 @@ Dictionary mono_object_to_Dictionary(MonoObject *p_dict);
// Transform
#define MARSHALLED_OUT_Transform(m_in, m_out) real_t m_out[12] = { \
- m_in.basis[0].x, m_in.basis[0].y, m_in.basis[0].z, \
- m_in.basis[1].x, m_in.basis[1].y, m_in.basis[1].z, \
- m_in.basis[2].x, m_in.basis[2].y, m_in.basis[2].z, \
+ m_in.basis[0].x, m_in.basis[1].x, m_in.basis[2].x, \
+ m_in.basis[0].y, m_in.basis[1].y, m_in.basis[2].y, \
+ m_in.basis[0].z, m_in.basis[1].z, m_in.basis[2].z, \
m_in.origin.x, m_in.origin.y, m_in.origin.z \
};
#define MARSHALLED_IN_Transform(m_in, m_out) Transform m_out( \
diff --git a/modules/regex/doc_classes/RegEx.xml b/modules/regex/doc_classes/RegEx.xml
index 2cf80acd28..36de04f293 100644
--- a/modules/regex/doc_classes/RegEx.xml
+++ b/modules/regex/doc_classes/RegEx.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RegEx" inherits="Reference" category="Core" version="3.0-stable">
+<class name="RegEx" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
Class for searching text for patterns using regular expressions.
</brief_description>
diff --git a/modules/regex/doc_classes/RegExMatch.xml b/modules/regex/doc_classes/RegExMatch.xml
index 9eba0f738b..550411d3e0 100644
--- a/modules/regex/doc_classes/RegExMatch.xml
+++ b/modules/regex/doc_classes/RegExMatch.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RegExMatch" inherits="Reference" category="Core" version="3.0-stable">
+<class name="RegExMatch" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
Contains the results of a regex search.
</brief_description>
diff --git a/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml b/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml
index 827e947a79..8d311ae1b8 100644
--- a/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml
+++ b/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamOGGVorbis" inherits="AudioStream" category="Core" version="3.0-stable">
+<class name="AudioStreamOGGVorbis" inherits="AudioStream" category="Core" version="3.1-dev">
<brief_description>
OGG Vorbis audio stream driver.
</brief_description>
diff --git a/modules/stb_vorbis/doc_classes/ResourceImporterOGGVorbis.xml b/modules/stb_vorbis/doc_classes/ResourceImporterOGGVorbis.xml
index 9a095c3ddd..5872dd35ff 100644
--- a/modules/stb_vorbis/doc_classes/ResourceImporterOGGVorbis.xml
+++ b/modules/stb_vorbis/doc_classes/ResourceImporterOGGVorbis.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceImporterOGGVorbis" inherits="ResourceImporter" category="Core" version="3.0-stable">
+<class name="ResourceImporterOGGVorbis" inherits="ResourceImporter" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/modules/theora/doc_classes/ResourceImporterTheora.xml b/modules/theora/doc_classes/ResourceImporterTheora.xml
index a280d767c3..6d2de4a9ad 100644
--- a/modules/theora/doc_classes/ResourceImporterTheora.xml
+++ b/modules/theora/doc_classes/ResourceImporterTheora.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceImporterTheora" inherits="ResourceImporter" category="Core" version="3.0-stable">
+<class name="ResourceImporterTheora" inherits="ResourceImporter" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/modules/theora/doc_classes/VideoStreamTheora.xml b/modules/theora/doc_classes/VideoStreamTheora.xml
index 9da3dc0d02..550844128d 100644
--- a/modules/theora/doc_classes/VideoStreamTheora.xml
+++ b/modules/theora/doc_classes/VideoStreamTheora.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VideoStreamTheora" inherits="VideoStream" category="Core" version="3.0-stable">
+<class name="VideoStreamTheora" inherits="VideoStream" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScript.xml b/modules/visual_script/doc_classes/VisualScript.xml
index a6a43f31b8..975b294f30 100644
--- a/modules/visual_script/doc_classes/VisualScript.xml
+++ b/modules/visual_script/doc_classes/VisualScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScript" inherits="Script" category="Core" version="3.0-stable">
+<class name="VisualScript" inherits="Script" category="Core" version="3.1-dev">
<brief_description>
A script implemented in the Visual Script programming environment.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml b/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml
index d63a6ad524..b529589b98 100644
--- a/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml
+++ b/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptBasicTypeConstant" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptBasicTypeConstant" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
A Visual Script node representing a constant from the base types.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml b/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml
index da4db29086..9c2ec3b849 100644
--- a/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml
+++ b/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptBuiltinFunc" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptBuiltinFunc" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
A Visual Script node used to call built-in functions.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptClassConstant.xml b/modules/visual_script/doc_classes/VisualScriptClassConstant.xml
index 189a6f6ad8..dc946cfcbd 100644
--- a/modules/visual_script/doc_classes/VisualScriptClassConstant.xml
+++ b/modules/visual_script/doc_classes/VisualScriptClassConstant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptClassConstant" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptClassConstant" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
Gets a constant from a given class.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptComment.xml b/modules/visual_script/doc_classes/VisualScriptComment.xml
index 5462c379ad..5c20f27ec2 100644
--- a/modules/visual_script/doc_classes/VisualScriptComment.xml
+++ b/modules/visual_script/doc_classes/VisualScriptComment.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptComment" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptComment" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
A Visual Script node used to annotate the script.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptCondition.xml b/modules/visual_script/doc_classes/VisualScriptCondition.xml
index bb70a17357..a3313a43d9 100644
--- a/modules/visual_script/doc_classes/VisualScriptCondition.xml
+++ b/modules/visual_script/doc_classes/VisualScriptCondition.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptCondition" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptCondition" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
A Visual Script node which branches the flow.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptConstant.xml b/modules/visual_script/doc_classes/VisualScriptConstant.xml
index e2ccb50bfd..274adb5423 100644
--- a/modules/visual_script/doc_classes/VisualScriptConstant.xml
+++ b/modules/visual_script/doc_classes/VisualScriptConstant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptConstant" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptConstant" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
Gets a contant's value.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptConstructor.xml b/modules/visual_script/doc_classes/VisualScriptConstructor.xml
index da6779b79d..2efe8d9bd6 100644
--- a/modules/visual_script/doc_classes/VisualScriptConstructor.xml
+++ b/modules/visual_script/doc_classes/VisualScriptConstructor.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptConstructor" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptConstructor" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
A Visual Script node which calls a base type constructor.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptCustomNode.xml b/modules/visual_script/doc_classes/VisualScriptCustomNode.xml
index 33d2f1437a..2165c403d4 100644
--- a/modules/visual_script/doc_classes/VisualScriptCustomNode.xml
+++ b/modules/visual_script/doc_classes/VisualScriptCustomNode.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptCustomNode" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptCustomNode" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
A scripted Visual Script node.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptDeconstruct.xml b/modules/visual_script/doc_classes/VisualScriptDeconstruct.xml
index 09fcba4314..f076c70715 100644
--- a/modules/visual_script/doc_classes/VisualScriptDeconstruct.xml
+++ b/modules/visual_script/doc_classes/VisualScriptDeconstruct.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptDeconstruct" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptDeconstruct" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
A Visual Script node which deconstructs a base type instance into its parts.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptEditor.xml b/modules/visual_script/doc_classes/VisualScriptEditor.xml
index 8e26758a31..1c4542336f 100644
--- a/modules/visual_script/doc_classes/VisualScriptEditor.xml
+++ b/modules/visual_script/doc_classes/VisualScriptEditor.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptEditor" inherits="Object" category="Core" version="3.0-stable">
+<class name="VisualScriptEditor" inherits="Object" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml b/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml
index 30f96011d4..7eea609db4 100644
--- a/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml
+++ b/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptEmitSignal" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptEmitSignal" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
Emits a specified signal.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptEngineSingleton.xml b/modules/visual_script/doc_classes/VisualScriptEngineSingleton.xml
index 0dc0cdf5eb..26196f278e 100644
--- a/modules/visual_script/doc_classes/VisualScriptEngineSingleton.xml
+++ b/modules/visual_script/doc_classes/VisualScriptEngineSingleton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptEngineSingleton" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptEngineSingleton" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
A Visual Script node returning a singleton from [@GlobalScope]
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptExpression.xml b/modules/visual_script/doc_classes/VisualScriptExpression.xml
index 91f55edb2b..0b93c3092c 100644
--- a/modules/visual_script/doc_classes/VisualScriptExpression.xml
+++ b/modules/visual_script/doc_classes/VisualScriptExpression.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptExpression" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptExpression" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptFunction.xml b/modules/visual_script/doc_classes/VisualScriptFunction.xml
index bd59d739ea..18daa42797 100644
--- a/modules/visual_script/doc_classes/VisualScriptFunction.xml
+++ b/modules/visual_script/doc_classes/VisualScriptFunction.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptFunction" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptFunction" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml b/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml
index e2b732a250..dc025cfb27 100644
--- a/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml
+++ b/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptFunctionCall" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptFunctionCall" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptFunctionState.xml b/modules/visual_script/doc_classes/VisualScriptFunctionState.xml
index 614176498a..05e9a6cb81 100644
--- a/modules/visual_script/doc_classes/VisualScriptFunctionState.xml
+++ b/modules/visual_script/doc_classes/VisualScriptFunctionState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptFunctionState" inherits="Reference" category="Core" version="3.0-stable">
+<class name="VisualScriptFunctionState" inherits="Reference" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptGlobalConstant.xml b/modules/visual_script/doc_classes/VisualScriptGlobalConstant.xml
index a36f7809c2..d0db8cbab3 100644
--- a/modules/visual_script/doc_classes/VisualScriptGlobalConstant.xml
+++ b/modules/visual_script/doc_classes/VisualScriptGlobalConstant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptGlobalConstant" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptGlobalConstant" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptIndexGet.xml b/modules/visual_script/doc_classes/VisualScriptIndexGet.xml
index b2d0a194e0..983d8882a7 100644
--- a/modules/visual_script/doc_classes/VisualScriptIndexGet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptIndexGet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptIndexGet" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptIndexGet" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptIndexSet.xml b/modules/visual_script/doc_classes/VisualScriptIndexSet.xml
index 7ad200afa4..bc876900f3 100644
--- a/modules/visual_script/doc_classes/VisualScriptIndexSet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptIndexSet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptIndexSet" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptIndexSet" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptInputAction.xml b/modules/visual_script/doc_classes/VisualScriptInputAction.xml
index 45c493887b..4316bf146d 100644
--- a/modules/visual_script/doc_classes/VisualScriptInputAction.xml
+++ b/modules/visual_script/doc_classes/VisualScriptInputAction.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptInputAction" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptInputAction" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptIterator.xml b/modules/visual_script/doc_classes/VisualScriptIterator.xml
index 28e8a66182..d815476e2c 100644
--- a/modules/visual_script/doc_classes/VisualScriptIterator.xml
+++ b/modules/visual_script/doc_classes/VisualScriptIterator.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptIterator" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptIterator" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
Steps through items in a given input.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptLocalVar.xml b/modules/visual_script/doc_classes/VisualScriptLocalVar.xml
index 66faf448cb..038fd8c9cd 100644
--- a/modules/visual_script/doc_classes/VisualScriptLocalVar.xml
+++ b/modules/visual_script/doc_classes/VisualScriptLocalVar.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptLocalVar" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptLocalVar" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
Gets a local variable's value.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml b/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml
index 8a816e5dd7..fa65a89c4a 100644
--- a/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptLocalVarSet" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptLocalVarSet" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
Changes a local variable's value.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptMathConstant.xml b/modules/visual_script/doc_classes/VisualScriptMathConstant.xml
index 45fa471c41..243ab03b49 100644
--- a/modules/visual_script/doc_classes/VisualScriptMathConstant.xml
+++ b/modules/visual_script/doc_classes/VisualScriptMathConstant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptMathConstant" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptMathConstant" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
Commonly used mathematical constants.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptNode.xml b/modules/visual_script/doc_classes/VisualScriptNode.xml
index e9d1cd949f..c2c5464047 100644
--- a/modules/visual_script/doc_classes/VisualScriptNode.xml
+++ b/modules/visual_script/doc_classes/VisualScriptNode.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptNode" inherits="Resource" category="Core" version="3.0-stable">
+<class name="VisualScriptNode" inherits="Resource" category="Core" version="3.1-dev">
<brief_description>
A node which is part of a [VisualScript].
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptOperator.xml b/modules/visual_script/doc_classes/VisualScriptOperator.xml
index 4538bd3c78..68a57191de 100644
--- a/modules/visual_script/doc_classes/VisualScriptOperator.xml
+++ b/modules/visual_script/doc_classes/VisualScriptOperator.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptOperator" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptOperator" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptPreload.xml b/modules/visual_script/doc_classes/VisualScriptPreload.xml
index 3dae0e4b81..19abc27053 100644
--- a/modules/visual_script/doc_classes/VisualScriptPreload.xml
+++ b/modules/visual_script/doc_classes/VisualScriptPreload.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptPreload" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptPreload" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
Creates a new [Resource] or loads one from the filesystem.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml b/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml
index 7555c83960..88aac85f59 100644
--- a/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptPropertyGet" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptPropertyGet" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptPropertySet.xml b/modules/visual_script/doc_classes/VisualScriptPropertySet.xml
index dc6a9efd83..ac962a071d 100644
--- a/modules/visual_script/doc_classes/VisualScriptPropertySet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptPropertySet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptPropertySet" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptPropertySet" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptResourcePath.xml b/modules/visual_script/doc_classes/VisualScriptResourcePath.xml
index 3789626ed0..a3144582cb 100644
--- a/modules/visual_script/doc_classes/VisualScriptResourcePath.xml
+++ b/modules/visual_script/doc_classes/VisualScriptResourcePath.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptResourcePath" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptResourcePath" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptReturn.xml b/modules/visual_script/doc_classes/VisualScriptReturn.xml
index 1172b7555b..ca50f811c3 100644
--- a/modules/visual_script/doc_classes/VisualScriptReturn.xml
+++ b/modules/visual_script/doc_classes/VisualScriptReturn.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptReturn" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptReturn" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
Exits a function and returns an optional value.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptSceneNode.xml b/modules/visual_script/doc_classes/VisualScriptSceneNode.xml
index 4c6181e040..3d4bdcfd0a 100644
--- a/modules/visual_script/doc_classes/VisualScriptSceneNode.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSceneNode.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptSceneNode" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptSceneNode" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
Node reference.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptSceneTree.xml b/modules/visual_script/doc_classes/VisualScriptSceneTree.xml
index 68cc0d0b55..c77b674b64 100644
--- a/modules/visual_script/doc_classes/VisualScriptSceneTree.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSceneTree.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptSceneTree" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptSceneTree" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptSelect.xml b/modules/visual_script/doc_classes/VisualScriptSelect.xml
index 017efdb07a..f1aad841ca 100644
--- a/modules/visual_script/doc_classes/VisualScriptSelect.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSelect.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptSelect" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptSelect" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
Chooses between two input values.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptSelf.xml b/modules/visual_script/doc_classes/VisualScriptSelf.xml
index e9b480bbae..c2847fcada 100644
--- a/modules/visual_script/doc_classes/VisualScriptSelf.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSelf.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptSelf" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptSelf" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
Outputs a reference to the current instance.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptSequence.xml b/modules/visual_script/doc_classes/VisualScriptSequence.xml
index be793ae36e..0180f34c72 100644
--- a/modules/visual_script/doc_classes/VisualScriptSequence.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSequence.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptSequence" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptSequence" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
Executes a series of Sequence ports.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptSubCall.xml b/modules/visual_script/doc_classes/VisualScriptSubCall.xml
index 85db63b78a..d34d0b7127 100644
--- a/modules/visual_script/doc_classes/VisualScriptSubCall.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSubCall.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptSubCall" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptSubCall" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptSwitch.xml b/modules/visual_script/doc_classes/VisualScriptSwitch.xml
index ec7565b31a..ea9e6438cf 100644
--- a/modules/visual_script/doc_classes/VisualScriptSwitch.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSwitch.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptSwitch" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptSwitch" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
Branches program flow based on a given input's value.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptTypeCast.xml b/modules/visual_script/doc_classes/VisualScriptTypeCast.xml
index d414a95657..4bdfeab35b 100644
--- a/modules/visual_script/doc_classes/VisualScriptTypeCast.xml
+++ b/modules/visual_script/doc_classes/VisualScriptTypeCast.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptTypeCast" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptTypeCast" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptVariableGet.xml b/modules/visual_script/doc_classes/VisualScriptVariableGet.xml
index ccd2918ec8..76c218294e 100644
--- a/modules/visual_script/doc_classes/VisualScriptVariableGet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptVariableGet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptVariableGet" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptVariableGet" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
Gets a variable's value.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptVariableSet.xml b/modules/visual_script/doc_classes/VisualScriptVariableSet.xml
index e1fc1ba762..0262ad5dfb 100644
--- a/modules/visual_script/doc_classes/VisualScriptVariableSet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptVariableSet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptVariableSet" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptVariableSet" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
Changes a variable's value.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptWhile.xml b/modules/visual_script/doc_classes/VisualScriptWhile.xml
index de1ff45746..46a6ea7a30 100644
--- a/modules/visual_script/doc_classes/VisualScriptWhile.xml
+++ b/modules/visual_script/doc_classes/VisualScriptWhile.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptWhile" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptWhile" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
Conditional loop.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptYield.xml b/modules/visual_script/doc_classes/VisualScriptYield.xml
index f21b53861a..a1129ffbd7 100644
--- a/modules/visual_script/doc_classes/VisualScriptYield.xml
+++ b/modules/visual_script/doc_classes/VisualScriptYield.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptYield" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptYield" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml b/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml
index 5075fb6ded..ad3a016c0d 100644
--- a/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml
+++ b/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptYieldSignal" inherits="VisualScriptNode" category="Core" version="3.0-stable">
+<class name="VisualScriptYieldSignal" inherits="VisualScriptNode" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/modules/webm/doc_classes/ResourceImporterWebm.xml b/modules/webm/doc_classes/ResourceImporterWebm.xml
index 20e0e48187..7c8e1a46b1 100644
--- a/modules/webm/doc_classes/ResourceImporterWebm.xml
+++ b/modules/webm/doc_classes/ResourceImporterWebm.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ResourceImporterWebm" inherits="ResourceImporter" category="Core" version="3.0-stable">
+<class name="ResourceImporterWebm" inherits="ResourceImporter" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/modules/webm/doc_classes/VideoStreamWebm.xml b/modules/webm/doc_classes/VideoStreamWebm.xml
index 94aea5c8d2..d52e2324a1 100644
--- a/modules/webm/doc_classes/VideoStreamWebm.xml
+++ b/modules/webm/doc_classes/VideoStreamWebm.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VideoStreamWebm" inherits="VideoStream" category="Core" version="3.0-stable">
+<class name="VideoStreamWebm" inherits="VideoStream" category="Core" version="3.1-dev">
<brief_description>
</brief_description>
<description>
diff --git a/platform/android/audio_driver_jandroid.cpp b/platform/android/audio_driver_jandroid.cpp
index 7545ee88d0..3d80e76707 100644
--- a/platform/android/audio_driver_jandroid.cpp
+++ b/platform/android/audio_driver_jandroid.cpp
@@ -86,7 +86,6 @@ Error AudioDriverAndroid::init() {
print_line("audio buffer size: " + itos(buffer_size));
}
- __android_log_print(ANDROID_LOG_INFO, "godot", "Initializing audio! params: %i,%i ", mix_rate, buffer_size);
audioBuffer = env->CallObjectMethod(io, _init_audio, mix_rate, buffer_size);
ERR_FAIL_COND_V(audioBuffer == NULL, ERR_INVALID_PARAMETER);
@@ -113,29 +112,10 @@ void AudioDriverAndroid::setup(jobject p_io) {
jclass c = env->GetObjectClass(io);
cls = (jclass)env->NewGlobalRef(c);
- __android_log_print(ANDROID_LOG_INFO, "godot", "starting to attempt get methods");
-
_init_audio = env->GetMethodID(cls, "audioInit", "(II)Ljava/lang/Object;");
- if (_init_audio != 0) {
- __android_log_print(ANDROID_LOG_INFO, "godot", "*******GOT METHOD _init_audio ok!!");
- } else {
- __android_log_print(ANDROID_LOG_INFO, "godot", "audioinit ok!");
- }
-
_write_buffer = env->GetMethodID(cls, "audioWriteShortBuffer", "([S)V");
- if (_write_buffer != 0) {
- __android_log_print(ANDROID_LOG_INFO, "godot", "*******GOT METHOD _write_buffer ok!!");
- }
-
_quit = env->GetMethodID(cls, "audioQuit", "()V");
- if (_quit != 0) {
- __android_log_print(ANDROID_LOG_INFO, "godot", "*******GOT METHOD _quit ok!!");
- }
-
_pause = env->GetMethodID(cls, "audioPause", "(Z)V");
- if (_quit != 0) {
- __android_log_print(ANDROID_LOG_INFO, "godot", "*******GOT METHOD _pause ok!!");
- }
}
void AudioDriverAndroid::thread_func(JNIEnv *env) {
@@ -144,7 +124,6 @@ void AudioDriverAndroid::thread_func(JNIEnv *env) {
if (cls) {
cls = (jclass)env->NewGlobalRef(cls);
- __android_log_print(ANDROID_LOG_INFO, "godot", "*******CLASS FOUND!!!");
}
jfieldID fid = env->GetStaticFieldID(cls, "io", "Lorg/godotengine/godot/GodotIO;");
jobject ob = env->GetStaticObjectField(cls, fid);
@@ -152,9 +131,6 @@ void AudioDriverAndroid::thread_func(JNIEnv *env) {
jclass c = env->GetObjectClass(gob);
jclass lcls = (jclass)env->NewGlobalRef(c);
_write_buffer = env->GetMethodID(lcls, "audioWriteShortBuffer", "([S)V");
- if (_write_buffer != 0) {
- __android_log_print(ANDROID_LOG_INFO, "godot", "*******GOT METHOD _write_buffer ok!!");
- }
while (!quit) {
diff --git a/platform/android/audio_driver_opensl.cpp b/platform/android/audio_driver_opensl.cpp
index 87a7d04e01..bc77a4e729 100644
--- a/platform/android/audio_driver_opensl.cpp
+++ b/platform/android/audio_driver_opensl.cpp
@@ -117,8 +117,6 @@ Error AudioDriverOpenSL::init() {
ERR_FAIL_V(ERR_INVALID_PARAMETER);
}
- print_line("OpenSL Init OK!");
-
return OK;
}
diff --git a/platform/android/dir_access_jandroid.cpp b/platform/android/dir_access_jandroid.cpp
index 5601dcc763..3e40b59de9 100644
--- a/platform/android/dir_access_jandroid.cpp
+++ b/platform/android/dir_access_jandroid.cpp
@@ -130,7 +130,6 @@ Error DirAccessJAndroid::change_dir(String p_dir) {
else
new_dir = current_dir.plus_file(p_dir);
- //print_line("new dir is: "+new_dir);
//test if newdir exists
new_dir = new_dir.simplify_path();
@@ -226,28 +225,14 @@ void DirAccessJAndroid::setup(jobject p_io) {
JNIEnv *env = ThreadAndroid::get_env();
io = p_io;
- __android_log_print(ANDROID_LOG_INFO, "godot", "STEP7");
jclass c = env->GetObjectClass(io);
cls = (jclass)env->NewGlobalRef(c);
- __android_log_print(ANDROID_LOG_INFO, "godot", "STEP8");
_dir_open = env->GetMethodID(cls, "dir_open", "(Ljava/lang/String;)I");
- if (_dir_open != 0) {
- __android_log_print(ANDROID_LOG_INFO, "godot", "*******GOT METHOD _dir_open ok!!");
- }
_dir_next = env->GetMethodID(cls, "dir_next", "(I)Ljava/lang/String;");
- if (_dir_next != 0) {
- __android_log_print(ANDROID_LOG_INFO, "godot", "*******GOT METHOD _dir_next ok!!");
- }
_dir_close = env->GetMethodID(cls, "dir_close", "(I)V");
- if (_dir_close != 0) {
- __android_log_print(ANDROID_LOG_INFO, "godot", "*******GOT METHOD _dir_close ok!!");
- }
_dir_is_dir = env->GetMethodID(cls, "dir_is_dir", "(I)Z");
- if (_dir_is_dir != 0) {
- __android_log_print(ANDROID_LOG_INFO, "godot", "*******GOT METHOD _dir_is_dir ok!!");
- }
//(*env)->CallVoidMethod(env,obj,aMethodID, myvar);
}
diff --git a/platform/android/file_access_jandroid.cpp b/platform/android/file_access_jandroid.cpp
index 1a9d3af4ea..214e273d9b 100644
--- a/platform/android/file_access_jandroid.cpp
+++ b/platform/android/file_access_jandroid.cpp
@@ -190,43 +190,16 @@ void FileAccessJAndroid::setup(jobject p_io) {
io = p_io;
JNIEnv *env = ThreadAndroid::get_env();
- __android_log_print(ANDROID_LOG_INFO, "godot", "STEP5");
-
jclass c = env->GetObjectClass(io);
- __android_log_print(ANDROID_LOG_INFO, "godot", "STEP6");
cls = (jclass)env->NewGlobalRef(c);
_file_open = env->GetMethodID(cls, "file_open", "(Ljava/lang/String;Z)I");
- if (_file_open != 0) {
- __android_log_print(ANDROID_LOG_INFO, "godot", "*******GOT METHOD _file_open ok!!");
- }
_file_get_size = env->GetMethodID(cls, "file_get_size", "(I)I");
- if (_file_get_size != 0) {
- __android_log_print(ANDROID_LOG_INFO, "godot", "*******GOT METHOD _file_get_size ok!!");
- }
_file_tell = env->GetMethodID(cls, "file_tell", "(I)I");
- if (_file_tell != 0) {
- __android_log_print(ANDROID_LOG_INFO, "godot", "*******GOT METHOD _file_tell ok!!");
- }
_file_eof = env->GetMethodID(cls, "file_eof", "(I)Z");
-
- if (_file_eof != 0) {
- __android_log_print(ANDROID_LOG_INFO, "godot", "*******GOT METHOD _file_eof ok!!");
- }
_file_seek = env->GetMethodID(cls, "file_seek", "(II)V");
- if (_file_seek != 0) {
- __android_log_print(ANDROID_LOG_INFO, "godot", "*******GOT METHOD _file_seek ok!!");
- }
_file_read = env->GetMethodID(cls, "file_read", "(II)[B");
- if (_file_read != 0) {
- __android_log_print(ANDROID_LOG_INFO, "godot", "*******GOT METHOD _file_read ok!!");
- }
_file_close = env->GetMethodID(cls, "file_close", "(I)V");
- if (_file_close != 0) {
- __android_log_print(ANDROID_LOG_INFO, "godot", "*******GOT METHOD _file_close ok!!");
- }
-
- //(*env)->CallVoidMethod(env,obj,aMethodID, myvar);
}
FileAccessJAndroid::FileAccessJAndroid() {
diff --git a/platform/android/godot_android.cpp b/platform/android/godot_android.cpp
index 64715b3683..0e5f4fb93a 100644
--- a/platform/android/godot_android.cpp
+++ b/platform/android/godot_android.cpp
@@ -76,14 +76,11 @@ public:
virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
- print_line("attempt to call " + String(p_method));
-
r_error.error = Variant::CallError::CALL_OK;
Map<StringName, MethodData>::Element *E = method_map.find(p_method);
if (!E) {
- print_line("no exists");
r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
return Variant();
}
@@ -91,7 +88,6 @@ public:
int ac = E->get().argtypes.size();
if (ac < p_argcount) {
- print_line("fewargs");
r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = ac;
return Variant();
@@ -99,7 +95,6 @@ public:
if (ac > p_argcount) {
- print_line("manyargs");
r_error.error = Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
r_error.argument = ac;
return Variant();
@@ -181,26 +176,21 @@ public:
}
}
- print_line("calling method!!");
-
Variant ret;
switch (E->get().ret_type) {
case Variant::NIL: {
- print_line("call void");
env->CallVoidMethodA(instance, E->get().method, v);
} break;
case Variant::BOOL: {
ret = env->CallBooleanMethodA(instance, E->get().method, v);
- print_line("call bool");
} break;
case Variant::INT: {
ret = env->CallIntMethodA(instance, E->get().method, v);
- print_line("call int");
} break;
case Variant::REAL: {
@@ -255,13 +245,10 @@ public:
} break;
default: {
- print_line("failure..");
ERR_FAIL_V(Variant());
} break;
}
- print_line("success");
-
return ret;
}
@@ -389,7 +376,6 @@ static int engine_init_display(struct engine *engine, bool p_gl2) {
eglQuerySurface(display, surface, EGL_WIDTH, &w);
eglQuerySurface(display, surface, EGL_HEIGHT, &h);
- print_line("INIT VIDEO MODE: " + itos(w) + "," + itos(h));
//engine->os->set_egl_extensions(eglQueryString(display,EGL_EXTENSIONS));
engine->os->init_video_mode(w, h);
@@ -942,7 +928,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_Godot_registerMethod(JNIEnv *e
jmethodID mid = env->GetMethodID(cls, mname.ascii().get_data(), cs.ascii().get_data());
if (!mid) {
- print_line("FAILED GETTING METHOID " + mname);
+ print_line("FAILED GETTING METHOD ID " + mname);
}
s->add_method(mname, mid, types, get_jni_type(retval));
diff --git a/platform/android/java/src/org/godotengine/godot/Godot.java b/platform/android/java/src/org/godotengine/godot/Godot.java
index 0d14211bd0..90848e6a90 100644
--- a/platform/android/java/src/org/godotengine/godot/Godot.java
+++ b/platform/android/java/src/org/godotengine/godot/Godot.java
@@ -150,21 +150,16 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
Method[] methods = clazz.getDeclaredMethods();
for (Method method : methods) {
boolean found = false;
- Log.d("XXX", "METHOD: %s\n" + method.getName());
for (String s : p_methods) {
- Log.d("XXX", "METHOD CMP WITH: %s\n" + s);
if (s.equals(method.getName())) {
found = true;
- Log.d("XXX", "METHOD CMP VALID");
break;
}
}
if (!found)
continue;
- Log.d("XXX", "METHOD FOUND: %s\n" + method.getName());
-
List<String> ptr = new ArrayList<String>();
Class[] paramTypes = method.getParameterTypes();
@@ -281,7 +276,6 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
godot.mView.getWindowVisibleDisplayFrame(gameSize);
final int keyboardHeight = fullSize.y - gameSize.bottom;
- Log.d("GODOT", "setVirtualKeyboardHeight: " + keyboardHeight);
GodotLib.setVirtualKeyboardHeight(keyboardHeight);
}
});
@@ -351,8 +345,6 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
byte[] len = new byte[4];
int r = is.read(len);
if (r < 4) {
- Log.d("XXX", "**ERROR** Wrong cmdline length.\n");
- Log.d("GODOT", "**ERROR** Wrong cmdline length.\n");
return new String[0];
}
int argc = ((int)(len[3] & 0xFF) << 24) | ((int)(len[2] & 0xFF) << 16) | ((int)(len[1] & 0xFF) << 8) | ((int)(len[0] & 0xFF));
@@ -362,12 +354,10 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
r = is.read(len);
if (r < 4) {
- Log.d("GODOT", "**ERROR** Wrong cmdline param length.\n");
return new String[0];
}
int strlen = ((int)(len[3] & 0xFF) << 24) | ((int)(len[2] & 0xFF) << 16) | ((int)(len[1] & 0xFF) << 8) | ((int)(len[0] & 0xFF));
if (strlen > 65535) {
- Log.d("GODOT", "**ERROR** Wrong command len\n");
return new String[0];
}
byte[] arg = new byte[strlen];
@@ -379,7 +369,6 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
return cmdline;
} catch (Exception e) {
e.printStackTrace();
- Log.d("GODOT", "**ERROR** Exception " + e.getClass().getName() + ":" + e.getMessage());
return new String[0];
}
}
@@ -393,14 +382,12 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
String[] new_cmdline;
int cll = 0;
if (command_line != null) {
- Log.d("GODOT", "initializeGodot: command_line: is not null");
new_cmdline = new String[command_line.length + 2];
cll = command_line.length;
for (int i = 0; i < command_line.length; i++) {
new_cmdline[i] = command_line[i];
}
} else {
- Log.d("GODOT", "initializeGodot: command_line: is null");
new_cmdline = new String[2];
}
@@ -412,13 +399,6 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
io = new GodotIO(this);
io.unique_id = Secure.getString(getContentResolver(), Secure.ANDROID_ID);
GodotLib.io = io;
- Log.d("GODOT", "command_line is null? " + ((command_line == null) ? "yes" : "no"));
- /*if(command_line != null){
- Log.d("GODOT", "Command Line:");
- for(int w=0;w <command_line.length;w++){
- Log.d("GODOT"," " + command_line[w]);
- }
- }*/
mSensorManager = (SensorManager)getSystemService(Context.SENSOR_SERVICE);
mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
mSensorManager.registerListener(this, mAccelerometer, SensorManager.SENSOR_DELAY_GAME);
@@ -447,8 +427,6 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
@Override
protected void onCreate(Bundle icicle) {
- Log.d("GODOT", "** GODOT ACTIVITY CREATED HERE ***\n");
-
super.onCreate(icicle);
_self = this;
Window window = getWindow();
@@ -509,7 +487,6 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
if (use_apk_expansion && main_pack_md5 != null && main_pack_key != null) {
//check that environment is ok!
if (!Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
- Log.d("GODOT", "**ERROR! No media mounted!");
//show popup and die
}
@@ -524,25 +501,20 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
File f = new File(expansion_pack_path);
boolean pack_valid = true;
- Log.d("GODOT", "**PACK** - Path " + expansion_pack_path);
if (!f.exists()) {
pack_valid = false;
- Log.d("GODOT", "**PACK** - File does not exist");
} else if (obbIsCorrupted(expansion_pack_path, main_pack_md5)) {
- Log.d("GODOT", "**PACK** - Expansion pack (obb) is corrupted");
pack_valid = false;
try {
f.delete();
} catch (Exception e) {
- Log.d("GODOT", "**PACK** - Error deleting corrupted expansion pack (obb)");
}
}
if (!pack_valid) {
- Log.d("GODOT", "Pack Invalid, try re-downloading.");
Intent notifierIntent = new Intent(this, this.getClass());
notifierIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
@@ -553,15 +525,12 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
int startResult;
try {
- Log.d("GODOT", "INITIALIZING DOWNLOAD");
startResult = DownloaderClientMarshaller.startDownloadServiceIfRequired(
getApplicationContext(),
pendingIntent,
GodotDownloaderService.class);
- Log.d("GODOT", "DOWNLOAD SERVICE FINISHED:" + startResult);
if (startResult != DownloaderClientMarshaller.NO_DOWNLOAD_REQUIRED) {
- Log.d("GODOT", "DOWNLOAD REQUIRED");
// This is where you do set up to display the download
// progress (next step)
mDownloaderClientStub = DownloaderClientMarshaller.CreateStub(this,
@@ -581,11 +550,9 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
return;
} else {
- Log.d("GODOT", "NO DOWNLOAD REQUIRED");
}
} catch (NameNotFoundException e) {
// TODO Auto-generated catch block
- Log.d("GODOT", "Error downloading expansion package:" + e.getMessage());
}
}
}
@@ -763,7 +730,6 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
}
}
- System.out.printf("** BACK REQUEST!\n");
if (shouldQuit && mView != null) {
mView.queueEvent(new Runnable() {
@Override
@@ -812,15 +778,12 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
}
String md5str = hexString.toString();
- //Log.d("GODOT","**PACK** - My MD5: "+hexString+" - APK md5: "+main_pack_md5);
if (!md5str.equals(main_pack_md5)) {
- Log.d("GODOT", "**PACK MD5 MISMATCH???** - MD5 Found: " + md5str + " " + Integer.toString(md5str.length()) + " - MD5 Expected: " + main_pack_md5 + " " + Integer.toString(main_pack_md5.length()));
return true;
}
return false;
} catch (Exception e) {
e.printStackTrace();
- Log.d("GODOT", "**PACK FAIL**");
return true;
}
}
@@ -936,7 +899,6 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
*/
@Override
public void onDownloadStateChanged(int newState) {
- Log.d("GODOT", "onDownloadStateChanged:" + newState);
setState(newState);
boolean showDashboard = true;
boolean showCellMessage = false;
@@ -944,7 +906,6 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
boolean indeterminate;
switch (newState) {
case IDownloaderClient.STATE_IDLE:
- Log.d("GODOT", "DOWNLOAD STATE IDLE");
// STATE_IDLE means the service is listening, so it's
// safe to start making calls via mRemoteService.
paused = false;
@@ -952,13 +913,11 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
break;
case IDownloaderClient.STATE_CONNECTING:
case IDownloaderClient.STATE_FETCHING_URL:
- Log.d("GODOT", "DOWNLOAD STATE CONNECTION / FETCHING URL");
showDashboard = true;
paused = false;
indeterminate = true;
break;
case IDownloaderClient.STATE_DOWNLOADING:
- Log.d("GODOT", "DOWNLOAD STATE DOWNLOADING");
paused = false;
showDashboard = true;
indeterminate = false;
@@ -968,14 +927,12 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
case IDownloaderClient.STATE_FAILED:
case IDownloaderClient.STATE_FAILED_FETCHING_URL:
case IDownloaderClient.STATE_FAILED_UNLICENSED:
- Log.d("GODOT", "DOWNLOAD STATE: FAILED, CANCELLED, UNLICENSED OR FAILED TO FETCH URL");
paused = true;
showDashboard = false;
indeterminate = false;
break;
case IDownloaderClient.STATE_PAUSED_NEED_CELLULAR_PERMISSION:
case IDownloaderClient.STATE_PAUSED_WIFI_DISABLED_NEED_CELLULAR_PERMISSION:
- Log.d("GODOT", "DOWNLOAD STATE: PAUSED BY MISSING CELLULAR PERMISSION");
showDashboard = false;
paused = true;
indeterminate = false;
@@ -983,26 +940,21 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
break;
case IDownloaderClient.STATE_PAUSED_BY_REQUEST:
- Log.d("GODOT", "DOWNLOAD STATE: PAUSED BY USER");
paused = true;
indeterminate = false;
break;
case IDownloaderClient.STATE_PAUSED_ROAMING:
case IDownloaderClient.STATE_PAUSED_SDCARD_UNAVAILABLE:
- Log.d("GODOT", "DOWNLOAD STATE: PAUSED BY ROAMING OR SDCARD UNAVAILABLE");
paused = true;
indeterminate = false;
break;
case IDownloaderClient.STATE_COMPLETED:
- Log.d("GODOT", "DOWNLOAD STATE: COMPLETED");
showDashboard = false;
paused = false;
indeterminate = false;
- // validateXAPKZipFiles();
initializeGodot();
return;
default:
- Log.d("GODOT", "DOWNLOAD STATE: DEFAULT");
paused = true;
indeterminate = true;
showDashboard = true;
diff --git a/platform/android/java_class_wrapper.cpp b/platform/android/java_class_wrapper.cpp
index 80a32452a5..446a5911e5 100644
--- a/platform/android/java_class_wrapper.cpp
+++ b/platform/android/java_class_wrapper.cpp
@@ -1117,7 +1117,7 @@ Ref<JavaClass> JavaClassWrapper::wrap(const String &p_class) {
}
if (!valid) {
- print_line("Method Can't be bound (unsupported arguments): " + p_class + "::" + str_method);
+ print_line("Method can't be bound (unsupported arguments): " + p_class + "::" + str_method);
env->DeleteLocalRef(obj);
env->DeleteLocalRef(param_types);
continue;
@@ -1130,7 +1130,7 @@ Ref<JavaClass> JavaClassWrapper::wrap(const String &p_class) {
String strsig;
uint32_t sig = 0;
if (!_get_type_sig(env, return_type, sig, strsig)) {
- print_line("Method Can't be bound (unsupported return type): " + p_class + "::" + str_method);
+ print_line("Method can't be bound (unsupported return type): " + p_class + "::" + str_method);
env->DeleteLocalRef(obj);
env->DeleteLocalRef(param_types);
env->DeleteLocalRef(return_type);
@@ -1140,8 +1140,6 @@ Ref<JavaClass> JavaClassWrapper::wrap(const String &p_class) {
signature += strsig;
mi.return_type = sig;
- print_line("METHOD: " + str_method + " SIG: " + signature + " static: " + itos(mi._static));
-
bool discard = false;
for (List<JavaClass::MethodInfo>::Element *E = java_class->methods[str_method].front(); E; E = E->next()) {
@@ -1173,11 +1171,9 @@ Ref<JavaClass> JavaClassWrapper::wrap(const String &p_class) {
if (new_likeliness > existing_likeliness) {
java_class->methods[str_method].erase(E);
- print_line("replace old");
break;
} else {
discard = true;
- print_line("old is better");
}
}
diff --git a/platform/android/java_glue.cpp b/platform/android/java_glue.cpp
index 2d81d79bf1..9baf58c3eb 100644
--- a/platform/android/java_glue.cpp
+++ b/platform/android/java_glue.cpp
@@ -240,7 +240,6 @@ Variant _jobject_to_variant(JNIEnv *env, jobject obj) {
jclass c = env->GetObjectClass(obj);
bool array;
String name = _get_class_name(env, c, &array);
- //print_line("name is " + name + ", array "+Variant(array));
if (name == "java.lang.String") {
@@ -251,7 +250,6 @@ Variant _jobject_to_variant(JNIEnv *env, jobject obj) {
jobjectArray arr = (jobjectArray)obj;
int stringCount = env->GetArrayLength(arr);
- //print_line("String array! " + String::num(stringCount));
PoolVector<String> sarr;
for (int i = 0; i < stringCount; i++) {
@@ -380,7 +378,6 @@ Variant _jobject_to_variant(JNIEnv *env, jobject obj) {
Array vals = _jobject_to_variant(env, arr);
env->DeleteLocalRef(arr);
- //print_line("adding " + String::num(keys.size()) + " to Dictionary!");
for (int i = 0; i < keys.size(); i++) {
ret[keys[i]] = vals[i];
@@ -411,7 +408,6 @@ class JNISingleton : public Object {
public:
virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
- //print_line("attempt to call "+String(p_method));
ERR_FAIL_COND_V(!instance, Variant());
r_error.error = Variant::CallError::CALL_OK;
@@ -419,7 +415,6 @@ public:
Map<StringName, MethodData>::Element *E = method_map.find(p_method);
if (!E) {
- print_line("no exists");
r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
return Variant();
}
@@ -427,7 +422,6 @@ public:
int ac = E->get().argtypes.size();
if (ac < p_argcount) {
- print_line("fewargs");
r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = ac;
return Variant();
@@ -435,7 +429,6 @@ public:
if (ac > p_argcount) {
- print_line("manyargs");
r_error.error = Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
r_error.argument = ac;
return Variant();
@@ -464,7 +457,6 @@ public:
ERR_FAIL_COND_V(res != 0, Variant());
- //print_line("argcount "+String::num(p_argcount));
List<jobject> to_erase;
for (int i = 0; i < p_argcount; i++) {
@@ -474,26 +466,21 @@ public:
to_erase.push_back(vr.obj);
}
- //print_line("calling method!!");
-
Variant ret;
switch (E->get().ret_type) {
case Variant::NIL: {
- //print_line("call void");
env->CallVoidMethodA(instance, E->get().method, v);
} break;
case Variant::BOOL: {
ret = env->CallBooleanMethodA(instance, E->get().method, v) == JNI_TRUE;
- //print_line("call bool");
} break;
case Variant::INT: {
ret = env->CallIntMethodA(instance, E->get().method, v);
- //print_line("call int");
} break;
case Variant::REAL: {
@@ -544,7 +531,6 @@ public:
case Variant::DICTIONARY: {
- //print_line("call dictionary");
jobject obj = env->CallObjectMethodA(instance, E->get().method, v);
ret = _jobject_to_variant(env, obj);
env->DeleteLocalRef(obj);
@@ -552,7 +538,6 @@ public:
} break;
default: {
- print_line("failure..");
env->PopLocalFrame(NULL);
ERR_FAIL_V(Variant());
} break;
@@ -564,7 +549,6 @@ public:
}
env->PopLocalFrame(NULL);
- //print_line("success");
return ret;
}
@@ -757,8 +741,6 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setVirtualKeyboardHei
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *env, jobject obj, jobject activity, jboolean p_need_reload_hook, jobject p_asset_manager, jboolean p_use_apk_expansion) {
- __android_log_print(ANDROID_LOG_INFO, "godot", "**INIT EVENT! - %p\n", env);
-
initialized = true;
JavaVM *jvm;
@@ -767,8 +749,6 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *en
_godot_instance = env->NewGlobalRef(activity);
//_godot_instance=activity;
- __android_log_print(ANDROID_LOG_INFO, "godot", "***************** HELLO FROM JNI!!!!!!!!");
-
{
//setup IO Object
@@ -776,17 +756,12 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *en
if (cls) {
cls = (jclass)env->NewGlobalRef(cls);
- __android_log_print(ANDROID_LOG_INFO, "godot", "*******CLASS FOUND!!!");
}
- __android_log_print(ANDROID_LOG_INFO, "godot", "STEP2, %p", cls);
jfieldID fid = env->GetStaticFieldID(cls, "io", "Lorg/godotengine/godot/GodotIO;");
- __android_log_print(ANDROID_LOG_INFO, "godot", "STEP3 %i", fid);
jobject ob = env->GetStaticObjectField(cls, fid);
- __android_log_print(ANDROID_LOG_INFO, "godot", "STEP4, %p", ob);
jobject gob = env->NewGlobalRef(ob);
- __android_log_print(ANDROID_LOG_INFO, "godot", "STEP4.5, %p", gob);
godot_io = gob;
_on_video_init = env->GetMethodID(cls, "onVideoInit", "(Z)V");
@@ -831,9 +806,6 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *en
char wd[500];
getcwd(wd, 500);
- __android_log_print(ANDROID_LOG_INFO, "godot", "test construction %i\n", tst.a);
- __android_log_print(ANDROID_LOG_INFO, "godot", "running from dir %s\n", wd);
-
//video driver is determined here, because once initialized, it can't be changed
// String vd = ProjectSettings::get_singleton()->get("display/driver");
@@ -843,7 +815,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *en
static void _initialize_java_modules() {
if (!ProjectSettings::get_singleton()->has_setting("android/modules")) {
- print_line("ANDROID MODULES: Nothing to load, aborting");
+ print_line("Android modules: Nothing to load, aborting");
return;
}
@@ -853,8 +825,6 @@ static void _initialize_java_modules() {
return;
}
Vector<String> mods = modules.split(",", false);
- print_line("ANDROID MODULES : " + modules);
- __android_log_print(ANDROID_LOG_INFO, "godot", "mod count: %i", mods.size());
if (mods.size()) {
@@ -877,7 +847,7 @@ static void _initialize_java_modules() {
String m = mods[i];
//jclass singletonClass = env->FindClass(m.utf8().get_data());
- print_line("LOADING MODULE: " + m);
+ print_line("Loading module: " + m);
jstring strClassName = env->NewStringUTF(m.utf8().get_data());
jclass singletonClass = (jclass)env->CallObjectMethod(cls, findClass, strClassName);
@@ -888,7 +858,6 @@ static void _initialize_java_modules() {
}
//singletonClass=(jclass)env->NewGlobalRef(singletonClass);
- __android_log_print(ANDROID_LOG_INFO, "godot", "****^*^*?^*^*class data %x", singletonClass);
jmethodID initialize = env->GetStaticMethodID(singletonClass, "initialize", "(Landroid/app/Activity;)Lorg/godotengine/godot/Godot$SingletonBase;");
if (!initialize) {
@@ -897,7 +866,6 @@ static void _initialize_java_modules() {
ERR_CONTINUE(!initialize);
}
jobject obj = env->CallStaticObjectMethod(singletonClass, initialize, _godot_instance);
- __android_log_print(ANDROID_LOG_INFO, "godot", "****^*^*?^*^*class instance %x", obj);
jobject gob = env->NewGlobalRef(obj);
}
}
@@ -906,8 +874,6 @@ static void _initialize_java_modules() {
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setup(JNIEnv *env, jobject obj, jobjectArray p_cmdline) {
ThreadAndroid::setup_thread();
- __android_log_print(ANDROID_LOG_INFO, "godot", "**SETUP");
-
const char **cmdline = NULL;
int cmdlen = 0;
bool use_apk_expansion = false;
@@ -921,20 +887,14 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setup(JNIEnv *env, jo
jstring string = (jstring)env->GetObjectArrayElement(p_cmdline, i);
const char *rawString = env->GetStringUTFChars(string, 0);
- if (!rawString) {
- __android_log_print(ANDROID_LOG_INFO, "godot", "cmdline arg %i is null\n", i);
- } else {
- //__android_log_print(ANDROID_LOG_INFO,"godot","cmdline arg %i is: %s\n",i,rawString);
-
- if (strcmp(rawString, "--main-pack") == 0)
- use_apk_expansion = true;
+ if (rawString && strcmp(rawString, "--main-pack") == 0) {
+ use_apk_expansion = true;
}
cmdline[i] = rawString;
}
}
}
- __android_log_print(ANDROID_LOG_INFO, "godot", "CMDLINE LEN %i - APK EXPANSION %i\n", cmdlen, int(use_apk_expansion));
Error err = Main::setup("apk", cmdlen, (char **)cmdline, false);
if (cmdline) {
@@ -942,10 +902,8 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setup(JNIEnv *env, jo
}
if (err != OK) {
- __android_log_print(ANDROID_LOG_INFO, "godot", "*****UNABLE TO SETUP");
return; //should exit instead and print the error
}
- __android_log_print(ANDROID_LOG_INFO, "godot", "*****SETUP OK");
java_class_wrapper = memnew(JavaClassWrapper(_godot_instance));
Engine::get_singleton()->add_singleton(Engine::Singleton("JavaClassWrapper", java_class_wrapper));
@@ -954,7 +912,6 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setup(JNIEnv *env, jo
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_resize(JNIEnv *env, jobject obj, jint width, jint height, jboolean reload) {
- __android_log_print(ANDROID_LOG_INFO, "godot", "^_^_^_^_^ resize %lld, %i, %i\n", Thread::get_caller_id(), width, height);
if (os_android)
os_android->set_display_size(Size2(width, height));
@@ -968,8 +925,6 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_resize(JNIEnv *env, j
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_newcontext(JNIEnv *env, jobject obj, bool p_32_bits) {
- __android_log_print(ANDROID_LOG_INFO, "godot", "^_^_^_^_^ newcontext %lld\n", Thread::get_caller_id());
-
if (os_android) {
os_android->set_context_is_16_bits(!p_32_bits);
}
@@ -986,7 +941,6 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_back(JNIEnv *env, job
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env, jobject obj) {
if (step == 0) {
- __android_log_print(ANDROID_LOG_INFO, "godot", "**FIRST_STEP");
// Since Godot is initialized on the UI thread, _main_thread_id was set to that thread's id,
// but for Godot purposes, the main thread is the one running the game loop
@@ -1004,8 +958,6 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env, job
++step;
}
- //__android_log_print(ANDROID_LOG_INFO,"godot","**STEP EVENT! - %p-%i\n",env,Thread::get_caller_id());
-
os_android->process_accelerometer(accelerometer);
os_android->process_gravity(gravity);
@@ -1019,14 +971,11 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env, job
jclass cls = env->FindClass("org/godotengine/godot/Godot");
jmethodID _finish = env->GetMethodID(cls, "forceQuit", "()V");
env->CallVoidMethod(_godot_instance, _finish);
- __android_log_print(ANDROID_LOG_INFO, "godot", "**FINISH REQUEST!!! - %p-%i\n", env, Thread::get_caller_id());
}
}
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_touch(JNIEnv *env, jobject obj, jint ev, jint pointer, jint count, jintArray positions) {
- //__android_log_print(ANDROID_LOG_INFO,"godot","**TOUCH EVENT! - %p-%i\n",env,Thread::get_caller_id());
-
Vector<OS_Android::TouchPos> points;
for (int i = 0; i < count; i++) {
@@ -1292,7 +1241,6 @@ static unsigned int android_get_keysym(unsigned int p_code) {
for (int i = 0; _ak_to_keycode[i].keysym != KEY_UNKNOWN; i++) {
if (_ak_to_keycode[i].keycode == p_code) {
- //print_line("outcode: " + _ak_to_keycode[i].keysym);
return _ak_to_keycode[i].keysym;
}
@@ -1362,8 +1310,6 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_key(JNIEnv *env, jobj
ievent->set_unicode(val);
ievent->set_pressed(p_pressed);
- print_line("Scancode: " + String::num(p_scancode) + ":" + String::num(ievent->get_scancode()) + " Unicode: " + String::num(val));
-
if (val == '\n') {
ievent->set_scancode(KEY_ENTER);
} else if (val == 61448) {
@@ -1527,7 +1473,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_method(JNIEnv *env, j
jmethodID mid = env->GetMethodID(cls, mname.ascii().get_data(), cs.ascii().get_data());
if (!mid) {
- print_line("FAILED GETTING METHOID " + mname);
+ print_line("Failed getting method ID " + mname);
}
s->add_method(mname, mid, types, get_jni_type(retval));
@@ -1578,16 +1524,12 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_calldeferred(JNIEnv *
int count = env->GetArrayLength(params);
Variant args[VARIANT_ARG_MAX];
- //print_line("Java->GD call: "+obj->get_type()+"::"+str_method+" argc "+itos(count));
-
for (int i = 0; i < MIN(count, VARIANT_ARG_MAX); i++) {
jobject obj = env->GetObjectArrayElement(params, i);
if (obj)
args[i] = _jobject_to_variant(env, obj);
env->DeleteLocalRef(obj);
-
- //print_line("\targ"+itos(i)+": "+Variant::get_type_name(args[i].get_type()));
};
obj->call_deferred(str_method, args[0], args[1], args[2], args[3], args[4]);
diff --git a/platform/osx/SCsub b/platform/osx/SCsub
index 5efe2d0b22..4dfa46528a 100644
--- a/platform/osx/SCsub
+++ b/platform/osx/SCsub
@@ -7,10 +7,10 @@ def make_debug(target, source, env):
if (env["macports_clang"] != 'no'):
mpprefix = os.environ.get("MACPORTS_PREFIX", "/opt/local")
mpclangver = env["macports_clang"]
- os.system(mpprefix + '/libexec/llvm-' + mpclangver + '/bin/llvm-dsymutil %s -o %s.dSYM' % (target[0], target[0]))
+ os.system(mpprefix + '/libexec/llvm-' + mpclangver + '/bin/llvm-dsymutil {0} -o {0}.dSYM'.format(target[0]))
else:
- os.system('dsymutil %s -o %s.dSYM' % (target[0], target[0]))
- os.system('strip -u -r %s' % (target[0]))
+ os.system('dsymutil {0} -o {0}.dSYM'.format(target[0]))
+ os.system('strip -u -r {0}'.format(target[0]))
files = [
'crash_handler_osx.mm',
diff --git a/platform/osx/crash_handler_osx.mm b/platform/osx/crash_handler_osx.mm
index d757674a9b..99ce25adfb 100644
--- a/platform/osx/crash_handler_osx.mm
+++ b/platform/osx/crash_handler_osx.mm
@@ -35,8 +35,7 @@
#include <string.h>
#include <unistd.h>
-// Note: Dump backtrace in 32bit mode is getting a bus error on the fgets by the ->execute, so enable only on 64bit
-#if defined(DEBUG_ENABLED) && defined(__x86_64__)
+#if defined(DEBUG_ENABLED)
#define CRASH_HANDLER_ENABLED 1
#endif
@@ -50,13 +49,8 @@
#include <mach-o/dyld.h>
#include <mach-o/getsect.h>
-#ifdef __x86_64__
static uint64_t load_address() {
const struct segment_command_64 *cmd = getsegbyname("__TEXT");
-#else
-static uint32_t load_address() {
- const struct segment_command *cmd = getsegbyname("__TEXT");
-#endif
char full_path[1024];
uint32_t size = sizeof(full_path);
@@ -120,11 +114,7 @@ static void handle_crash(int sig) {
args.push_back("-o");
args.push_back(_execpath);
args.push_back("-arch");
-#ifdef __x86_64__
args.push_back("x86_64");
-#else
- args.push_back("i386");
-#endif
args.push_back("-l");
snprintf(str, 1024, "%p", load_addr);
args.push_back(str);
diff --git a/platform/osx/detect.py b/platform/osx/detect.py
index 5f33100e42..3237cef711 100644
--- a/platform/osx/detect.py
+++ b/platform/osx/detect.py
@@ -57,22 +57,15 @@ def configure(env):
## Architecture
- is64 = sys.maxsize > 2**32
- if (env["bits"] == "default"):
- env["bits"] = "64" if is64 else "32"
+ # Mac OS X no longer runs on 32-bit since 10.7 which is unsupported since 2014
+ # As such, we only support 64-bit
+ env["bits"] == "64"
## Compiler configuration
if "OSXCROSS_ROOT" not in os.environ: # regular native build
- if (env["bits"] == "fat"):
- env.Append(CCFLAGS=['-arch', 'i386', '-arch', 'x86_64'])
- env.Append(LINKFLAGS=['-arch', 'i386', '-arch', 'x86_64'])
- elif (env["bits"] == "32"):
- env.Append(CCFLAGS=['-arch', 'i386'])
- env.Append(LINKFLAGS=['-arch', 'i386'])
- else: # 64-bit, default
- env.Append(CCFLAGS=['-arch', 'x86_64'])
- env.Append(LINKFLAGS=['-arch', 'x86_64'])
+ env.Append(CCFLAGS=['-arch', 'x86_64'])
+ env.Append(LINKFLAGS=['-arch', 'x86_64'])
if (env["macports_clang"] != 'no'):
mpprefix = os.environ.get("MACPORTS_PREFIX", "/opt/local")
mpclangver = env["macports_clang"]
@@ -86,14 +79,7 @@ def configure(env):
else: # osxcross build
root = os.environ.get("OSXCROSS_ROOT", 0)
- if env["bits"] == "fat":
- basecmd = root + "/target/bin/x86_64-apple-" + env["osxcross_sdk"] + "-"
- env.Append(CCFLAGS=['-arch', 'i386', '-arch', 'x86_64'])
- env.Append(LINKFLAGS=['-arch', 'i386', '-arch', 'x86_64'])
- elif env["bits"] == "32":
- basecmd = root + "/target/bin/i386-apple-" + env["osxcross_sdk"] + "-"
- else: # 64-bit, default
- basecmd = root + "/target/bin/x86_64-apple-" + env["osxcross_sdk"] + "-"
+ basecmd = root + "/target/bin/x86_64-apple-" + env["osxcross_sdk"] + "-"
ccache_path = os.environ.get("CCACHE")
if ccache_path == None:
diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp
index c4efa1f0ff..7985a241e4 100644
--- a/platform/osx/export/export.cpp
+++ b/platform/osx/export/export.cpp
@@ -101,15 +101,7 @@ void EditorExportPlatformOSX::get_preset_features(const Ref<EditorExportPreset>
r_features->push_back("etc2");
}
- int bits = p_preset->get("application/bits_mode");
-
- if (bits == 0 || bits == 1) {
- r_features->push_back("64");
- }
-
- if (bits == 0 || bits == 2) {
- r_features->push_back("32");
- }
+ r_features->push_back("64");
}
void EditorExportPlatformOSX::get_export_options(List<ExportOption> *r_options) {
@@ -125,7 +117,6 @@ void EditorExportPlatformOSX::get_export_options(List<ExportOption> *r_options)
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/short_version"), "1.0"));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/version"), "1.0"));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/copyright"), ""));
- r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "application/bits_mode", PROPERTY_HINT_ENUM, "Fat (32 & 64 bits),64 bits,32 bits"), 0));
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "display/high_res"), false));
#ifdef OSX_ENABLED
@@ -323,11 +314,8 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
ERR_FAIL_COND_V(!src_pkg_zip, ERR_CANT_OPEN);
int ret = unzGoToFirstFile(src_pkg_zip);
- String binary_to_use = "godot_osx_" + String(p_debug ? "debug" : "release") + ".";
- int bits_mode = p_preset->get("application/bits_mode");
- binary_to_use += String(bits_mode == 0 ? "fat" : bits_mode == 1 ? "64" : "32");
+ String binary_to_use = "godot_osx_" + String(p_debug ? "debug" : "release") + ".64";
- print_line("binary: " + binary_to_use);
String pkg_name;
if (p_preset->get("application/name") != "")
pkg_name = p_preset->get("application/name"); // app_name
diff --git a/platform/windows/SCsub b/platform/windows/SCsub
index 8965b80fb7..ed3827353d 100644
--- a/platform/windows/SCsub
+++ b/platform/windows/SCsub
@@ -9,9 +9,9 @@ def make_debug_mingw(target, source, env):
mingw_prefix = env["mingw_prefix_32"]
else:
mingw_prefix = env["mingw_prefix_64"]
- os.system(mingw_prefix + 'objcopy --only-keep-debug %s %s.debugsymbols' % (target[0], target[0]))
- os.system(mingw_prefix + 'strip --strip-debug --strip-unneeded %s' % (target[0]))
- os.system(mingw_prefix + 'objcopy --add-gnu-debuglink=%s.debugsymbols %s' % (target[0], target[0]))
+ os.system(mingw_prefix + 'objcopy --only-keep-debug {0} {0}.debugsymbols'.format(target[0]))
+ os.system(mingw_prefix + 'strip --strip-debug --strip-unneeded {0}'.format(target[0]))
+ os.system(mingw_prefix + 'objcopy --add-gnu-debuglink={0}.debugsymbols {0}'.format(target[0]))
common_win = [
"context_gl_win.cpp",
diff --git a/platform/x11/SCsub b/platform/x11/SCsub
index b18757337a..d0f77892ef 100644
--- a/platform/x11/SCsub
+++ b/platform/x11/SCsub
@@ -4,9 +4,9 @@ import os
Import('env')
def make_debug(target, source, env):
- os.system('objcopy --only-keep-debug %s %s.debugsymbols' % (target[0], target[0]))
- os.system('strip --strip-debug --strip-unneeded %s' % (target[0]))
- os.system('objcopy --add-gnu-debuglink=%s.debugsymbols %s' % (target[0], target[0]))
+ os.system('objcopy --only-keep-debug {0} {0}.debugsymbols'.format(target[0]))
+ os.system('strip --strip-debug --strip-unneeded {0}'.format(target[0]))
+ os.system('objcopy --add-gnu-debuglink={0}.debugsymbols {0}'.format(target[0]))
common_x11 = [
"context_gl_x11.cpp",
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index 299f4dc08e..2027667af3 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -731,6 +731,16 @@ void OS_X11::get_fullscreen_mode_list(List<VideoMode> *p_list, int p_screen) con
}
void OS_X11::set_wm_fullscreen(bool p_enabled) {
+ if (p_enabled && !get_borderless_window()) {
+ // remove decorations if the window is not already borderless
+ Hints hints;
+ Atom property;
+ hints.flags = 2;
+ hints.decorations = 0;
+ property = XInternAtom(x11_display, "_MOTIF_WM_HINTS", True);
+ XChangeProperty(x11_display, x11_window, property, property, 32, PropModeReplace, (unsigned char *)&hints, 5);
+ }
+
if (p_enabled && !is_window_resizable()) {
// Set the window as resizable to prevent window managers to ignore the fullscreen state flag.
XSizeHints *xsh;
diff --git a/scene/2d/animated_sprite.cpp b/scene/2d/animated_sprite.cpp
index f290a181ec..824f50495b 100644
--- a/scene/2d/animated_sprite.cpp
+++ b/scene/2d/animated_sprite.cpp
@@ -34,7 +34,51 @@
#define NORMAL_SUFFIX "_normal"
-////////////////////////////
+Dictionary AnimatedSprite::_edit_get_state() const {
+ Dictionary state = Node2D::_edit_get_state();
+ state["offset"] = offset;
+ return state;
+}
+
+void AnimatedSprite::_edit_set_state(const Dictionary &p_state) {
+ Node2D::_edit_set_state(p_state);
+ set_offset(p_state["offset"]);
+}
+
+void AnimatedSprite::_edit_set_pivot(const Point2 &p_pivot) {
+ set_offset(get_offset() - p_pivot);
+ set_position(get_transform().xform(p_pivot));
+}
+
+Point2 AnimatedSprite::_edit_get_pivot() const {
+ return Vector2();
+}
+
+bool AnimatedSprite::_edit_use_pivot() const {
+ return true;
+}
+
+Rect2 AnimatedSprite::_edit_get_rect() const {
+ if (!frames.is_valid() || !frames->has_animation(animation) || frame < 0 || frame >= frames->get_frame_count(animation)) {
+ return Node2D::_edit_get_rect();
+ }
+
+ Ref<Texture> t;
+ if (animation)
+ t = frames->get_frame(animation, frame);
+ if (t.is_null())
+ return Node2D::_edit_get_rect();
+ Size2 s = t->get_size();
+
+ Point2 ofs = offset;
+ if (centered)
+ ofs -= s / 2;
+
+ if (s == Size2(0, 0))
+ s = Size2(1, 1);
+
+ return Rect2(ofs, s);
+}
void SpriteFrames::add_frame(const StringName &p_anim, const Ref<Texture> &p_frame, int p_at_pos) {
@@ -248,20 +292,6 @@ SpriteFrames::SpriteFrames() {
add_animation(SceneStringNames::get_singleton()->_default);
}
-void AnimatedSprite::_edit_set_pivot(const Point2 &p_pivot) {
-
- set_offset(p_pivot);
-}
-
-Point2 AnimatedSprite::_edit_get_pivot() const {
-
- return get_offset();
-}
-bool AnimatedSprite::_edit_use_pivot() const {
-
- return true;
-}
-
void AnimatedSprite::_validate_property(PropertyInfo &property) const {
if (!frames.is_valid())
@@ -491,29 +521,6 @@ bool AnimatedSprite::is_flipped_v() const {
return vflip;
}
-Rect2 AnimatedSprite::_edit_get_rect() const {
-
- if (!frames.is_valid() || !frames->has_animation(animation) || frame < 0 || frame >= frames->get_frame_count(animation)) {
- return Node2D::_edit_get_rect();
- }
-
- Ref<Texture> t;
- if (animation)
- t = frames->get_frame(animation, frame);
- if (t.is_null())
- return Node2D::_edit_get_rect();
- Size2i s = t->get_size();
-
- Point2 ofs = offset;
- if (centered)
- ofs -= s / 2;
-
- if (s == Size2(0, 0))
- s = Size2(1, 1);
-
- return Rect2(ofs, s);
-}
-
void AnimatedSprite::_res_changed() {
set_frame(frame);
diff --git a/scene/2d/animated_sprite.h b/scene/2d/animated_sprite.h
index 2c356d619f..a38adf792c 100644
--- a/scene/2d/animated_sprite.h
+++ b/scene/2d/animated_sprite.h
@@ -150,9 +150,13 @@ protected:
virtual void _validate_property(PropertyInfo &property) const;
public:
+ virtual Dictionary _edit_get_state() const;
+ virtual void _edit_set_state(const Dictionary &p_state);
+
virtual void _edit_set_pivot(const Point2 &p_pivot);
virtual Point2 _edit_get_pivot() const;
virtual bool _edit_use_pivot() const;
+ virtual Rect2 _edit_get_rect() const;
void set_sprite_frames(const Ref<SpriteFrames> &p_frames);
Ref<SpriteFrames> get_sprite_frames() const;
@@ -182,8 +186,6 @@ public:
void set_modulate(const Color &p_color);
Color get_modulate() const;
- virtual Rect2 _edit_get_rect() const;
-
virtual String get_configuration_warning() const;
AnimatedSprite();
};
diff --git a/scene/2d/canvas_item.h b/scene/2d/canvas_item.h
index 7e5bea0511..68384b9f1e 100644
--- a/scene/2d/canvas_item.h
+++ b/scene/2d/canvas_item.h
@@ -230,7 +230,7 @@ public:
// Used to resize/move/select the node
virtual void _edit_set_rect(const Rect2 &p_rect){};
virtual Rect2 _edit_get_rect() const { return Rect2(-32, -32, 64, 64); };
- virtual bool _edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const { return true; }
+ virtual bool _edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const { return _edit_get_rect().has_point(p_point); }
Rect2 _edit_get_item_and_children_rect() const;
virtual bool _edit_use_rect() const { return false; };
diff --git a/scene/2d/light_2d.cpp b/scene/2d/light_2d.cpp
index 999d8a2630..1220ff299c 100644
--- a/scene/2d/light_2d.cpp
+++ b/scene/2d/light_2d.cpp
@@ -33,35 +33,36 @@
#include "engine.h"
#include "servers/visual_server.h"
-void Light2D::_edit_set_pivot(const Point2 &p_pivot) {
+Dictionary Light2D::_edit_get_state() const {
+ Dictionary state = Node2D::_edit_get_state();
+ state["offset"] = get_texture_offset();
+ return state;
+}
- set_texture_offset(p_pivot);
+void Light2D::_edit_set_state(const Dictionary &p_state) {
+ Node2D::_edit_set_state(p_state);
+ set_texture_offset(p_state["offset"]);
}
-Point2 Light2D::_edit_get_pivot() const {
+void Light2D::_edit_set_pivot(const Point2 &p_pivot) {
+ set_position(get_transform().xform(p_pivot));
+ set_texture_offset(get_texture_offset() - p_pivot);
+}
- return get_texture_offset();
+Point2 Light2D::_edit_get_pivot() const {
+ return Vector2();
}
-bool Light2D::_edit_use_pivot() const {
+bool Light2D::_edit_use_pivot() const {
return true;
}
Rect2 Light2D::_edit_get_rect() const {
-
if (texture.is_null())
- return Rect2(0, 0, 1, 1);
-
- Size2i s;
-
- s = texture->get_size() * _scale;
- Point2i ofs = texture_offset;
- ofs -= s / 2;
-
- if (s == Size2(0, 0))
- s = Size2(1, 1);
+ return Node2D::_edit_get_rect();
- return Rect2(ofs, s);
+ Size2 s = texture->get_size() * _scale;
+ return Rect2(texture_offset - s / 2.0, s);
}
void Light2D::_update_light_visibility() {
@@ -131,6 +132,7 @@ void Light2D::set_texture_offset(const Vector2 &p_offset) {
texture_offset = p_offset;
VS::get_singleton()->canvas_light_set_texture_offset(canvas_light, texture_offset);
item_rect_changed();
+ _change_notify("offset");
}
Vector2 Light2D::get_texture_offset() const {
diff --git a/scene/2d/light_2d.h b/scene/2d/light_2d.h
index b216ad5e95..16d8c485d4 100644
--- a/scene/2d/light_2d.h
+++ b/scene/2d/light_2d.h
@@ -85,6 +85,9 @@ protected:
static void _bind_methods();
public:
+ virtual Dictionary _edit_get_state() const;
+ virtual void _edit_set_state(const Dictionary &p_state);
+
virtual void _edit_set_pivot(const Point2 &p_pivot);
virtual Point2 _edit_get_pivot() const;
virtual bool _edit_use_pivot() const;
diff --git a/scene/2d/node_2d.cpp b/scene/2d/node_2d.cpp
index 95a1cbfce3..95e24505be 100644
--- a/scene/2d/node_2d.cpp
+++ b/scene/2d/node_2d.cpp
@@ -46,10 +46,9 @@ Dictionary Node2D::_edit_get_state() const {
}
void Node2D::_edit_set_state(const Dictionary &p_state) {
- Dictionary state = p_state;
- pos = state["position"];
- angle = state["rotation"];
- _scale = state["scale"];
+ pos = p_state["position"];
+ angle = p_state["rotation"];
+ _scale = p_state["scale"];
_update_transform();
_change_notify("rotation");
@@ -60,6 +59,8 @@ void Node2D::_edit_set_state(const Dictionary &p_state) {
void Node2D::_edit_set_position(const Point2 &p_position) {
pos = p_position;
+ _update_transform();
+ _change_notify("position");
}
Point2 Node2D::_edit_get_position() const {
diff --git a/scene/2d/polygon_2d.cpp b/scene/2d/polygon_2d.cpp
index f6cb796b10..e63dc4e515 100644
--- a/scene/2d/polygon_2d.cpp
+++ b/scene/2d/polygon_2d.cpp
@@ -31,8 +31,31 @@
#include "polygon_2d.h"
#include "core/math/geometry.h"
-Rect2 Polygon2D::_edit_get_rect() const {
+Dictionary Polygon2D::_edit_get_state() const {
+ Dictionary state = Node2D::_edit_get_state();
+ state["offset"] = offset;
+ return state;
+}
+
+void Polygon2D::_edit_set_state(const Dictionary &p_state) {
+ Node2D::_edit_set_state(p_state);
+ set_offset(p_state["offset"]);
+}
+
+void Polygon2D::_edit_set_pivot(const Point2 &p_pivot) {
+ set_position(get_transform().xform(p_pivot));
+ set_offset(get_offset() - p_pivot);
+}
+
+Point2 Polygon2D::_edit_get_pivot() const {
+ return Vector2();
+}
+
+bool Polygon2D::_edit_use_pivot() const {
+ return true;
+}
+Rect2 Polygon2D::_edit_get_rect() const {
if (rect_cache_dirty) {
int l = polygon.size();
PoolVector<Vector2>::Read r = polygon.read();
@@ -52,21 +75,7 @@ Rect2 Polygon2D::_edit_get_rect() const {
bool Polygon2D::_edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const {
- return Geometry::is_point_in_polygon(p_point, Variant(polygon));
-}
-
-void Polygon2D::_edit_set_pivot(const Point2 &p_pivot) {
-
- set_offset(p_pivot);
-}
-
-Point2 Polygon2D::_edit_get_pivot() const {
-
- return get_offset();
-}
-bool Polygon2D::_edit_use_pivot() const {
-
- return true;
+ return Geometry::is_point_in_polygon(p_point - get_offset(), Variant(polygon));
}
void Polygon2D::_notification(int p_what) {
@@ -324,6 +333,7 @@ void Polygon2D::set_offset(const Vector2 &p_offset) {
offset = p_offset;
rect_cache_dirty = true;
update();
+ _change_notify("offset");
}
Vector2 Polygon2D::get_offset() const {
diff --git a/scene/2d/polygon_2d.h b/scene/2d/polygon_2d.h
index f62c78c55b..66f44cb3f1 100644
--- a/scene/2d/polygon_2d.h
+++ b/scene/2d/polygon_2d.h
@@ -59,6 +59,16 @@ protected:
static void _bind_methods();
public:
+ virtual Dictionary _edit_get_state() const;
+ virtual void _edit_set_state(const Dictionary &p_state);
+
+ virtual void _edit_set_pivot(const Point2 &p_pivot);
+ virtual Point2 _edit_get_pivot() const;
+ virtual bool _edit_use_pivot() const;
+ virtual Rect2 _edit_get_rect() const;
+
+ virtual bool _edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const;
+
void set_polygon(const PoolVector<Vector2> &p_polygon);
PoolVector<Vector2> get_polygon() const;
@@ -98,15 +108,6 @@ public:
void set_offset(const Vector2 &p_offset);
Vector2 get_offset() const;
- //editor stuff
-
- virtual void _edit_set_pivot(const Point2 &p_pivot);
- virtual Point2 _edit_get_pivot() const;
- virtual bool _edit_use_pivot() const;
-
- virtual Rect2 _edit_get_rect() const;
- virtual bool _edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const;
-
Polygon2D();
};
diff --git a/scene/2d/sprite.cpp b/scene/2d/sprite.cpp
index 9c344b9581..17ca066fc0 100644
--- a/scene/2d/sprite.cpp
+++ b/scene/2d/sprite.cpp
@@ -34,17 +34,27 @@
#include "scene/main/viewport.h"
#include "scene/scene_string_names.h"
-void Sprite::_edit_set_pivot(const Point2 &p_pivot) {
+Dictionary Sprite::_edit_get_state() const {
+ Dictionary state = Node2D::_edit_get_state();
+ state["offset"] = offset;
+ return state;
+}
- set_offset(p_pivot);
+void Sprite::_edit_set_state(const Dictionary &p_state) {
+ Node2D::_edit_set_state(p_state);
+ set_offset(p_state["offset"]);
}
-Point2 Sprite::_edit_get_pivot() const {
+void Sprite::_edit_set_pivot(const Point2 &p_pivot) {
+ set_offset(get_offset() - p_pivot);
+ set_position(get_transform().xform(p_pivot));
+}
- return get_offset();
+Point2 Sprite::_edit_get_pivot() const {
+ return Vector2();
}
-bool Sprite::_edit_use_pivot() const {
+bool Sprite::_edit_use_pivot() const {
return true;
}
diff --git a/scene/2d/sprite.h b/scene/2d/sprite.h
index 261165bbf9..0422e0635f 100644
--- a/scene/2d/sprite.h
+++ b/scene/2d/sprite.h
@@ -65,6 +65,9 @@ protected:
virtual void _validate_property(PropertyInfo &property) const;
public:
+ virtual Dictionary _edit_get_state() const;
+ virtual void _edit_set_state(const Dictionary &p_state);
+
virtual void _edit_set_pivot(const Point2 &p_pivot);
virtual Point2 _edit_get_pivot() const;
virtual bool _edit_use_pivot() const;
diff --git a/scene/3d/baked_lightmap.cpp b/scene/3d/baked_lightmap.cpp
index fa4e6492a1..204aaef7ec 100644
--- a/scene/3d/baked_lightmap.cpp
+++ b/scene/3d/baked_lightmap.cpp
@@ -316,7 +316,7 @@ bool BakedLightmap::_bake_time(void *ud, float p_secs, float p_progress) {
int mins_left = p_secs / 60;
int secs_left = Math::fmod(p_secs, 60.0f);
int percent = p_progress * 100;
- bool abort = bake_step_function(btd->pass + percent, btd->text + " " + itos(percent) + "% (Time Left: " + itos(mins_left) + ":" + itos(secs_left) + "s)");
+ bool abort = bake_step_function(btd->pass + percent, btd->text + " " + vformat(RTR("%d%%"), percent) + " " + vformat(RTR("(Time Left: %d:%02d s)"), mins_left, secs_left));
btd->last_step = time;
if (abort)
return true;
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp
index 9dfd388c3d..5f541ea16a 100644
--- a/scene/gui/base_button.cpp
+++ b/scene/gui/base_button.cpp
@@ -307,6 +307,8 @@ void BaseButton::toggled(bool p_pressed) {
}
void BaseButton::set_disabled(bool p_disabled) {
+ if (status.disabled == p_disabled)
+ return;
status.disabled = p_disabled;
update();
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index 01415594d3..a5883863cd 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -49,31 +49,41 @@
Dictionary Control::_edit_get_state() const {
Dictionary s;
- s["rect"] = get_rect();
s["rotation"] = get_rotation();
s["scale"] = get_scale();
+ s["pivot"] = get_pivot_offset();
Array anchors;
anchors.push_back(get_anchor(MARGIN_LEFT));
anchors.push_back(get_anchor(MARGIN_TOP));
anchors.push_back(get_anchor(MARGIN_RIGHT));
anchors.push_back(get_anchor(MARGIN_BOTTOM));
s["anchors"] = anchors;
+ Array margins;
+ margins.push_back(get_margin(MARGIN_LEFT));
+ margins.push_back(get_margin(MARGIN_TOP));
+ margins.push_back(get_margin(MARGIN_RIGHT));
+ margins.push_back(get_margin(MARGIN_BOTTOM));
+ s["margins"] = margins;
return s;
}
void Control::_edit_set_state(const Dictionary &p_state) {
Dictionary state = p_state;
- Rect2 rect = state["rect"];
- set_position(rect.position);
- set_size(rect.size);
set_rotation(state["rotation"]);
set_scale(state["scale"]);
+ set_pivot_offset(state["pivot"]);
Array anchors = state["anchors"];
- set_anchor(MARGIN_LEFT, anchors[0]);
- set_anchor(MARGIN_TOP, anchors[1]);
- set_anchor(MARGIN_RIGHT, anchors[2]);
- set_anchor(MARGIN_BOTTOM, anchors[3]);
+ data.anchor[MARGIN_LEFT] = anchors[0];
+ data.anchor[MARGIN_TOP] = anchors[1];
+ data.anchor[MARGIN_RIGHT] = anchors[2];
+ data.anchor[MARGIN_BOTTOM] = anchors[3];
+ Array margins = state["margins"];
+ data.margin[MARGIN_LEFT] = margins[0];
+ data.margin[MARGIN_TOP] = margins[1];
+ data.margin[MARGIN_RIGHT] = margins[2];
+ data.margin[MARGIN_BOTTOM] = margins[3];
+ _size_changed();
}
void Control::_edit_set_position(const Point2 &p_position) {
@@ -85,19 +95,8 @@ Point2 Control::_edit_get_position() const {
};
void Control::_edit_set_rect(const Rect2 &p_edit_rect) {
-
- Transform2D xform = _get_internal_transform();
-
- Vector2 new_pos = xform.basis_xform(p_edit_rect.position);
-
- Vector2 pos = get_position() + new_pos;
-
- Rect2 new_rect = get_rect();
- new_rect.position = pos.snapped(Vector2(1, 1));
- new_rect.size = p_edit_rect.size.snapped(Vector2(1, 1));
-
- set_position(new_rect.position);
- set_size(new_rect.size);
+ set_position((get_position() + get_transform().basis_xform(p_edit_rect.position)).snapped(Vector2(1, 1)));
+ set_size(p_edit_rect.size.snapped(Vector2(1, 1)));
}
Rect2 Control::_edit_get_rect() const {
@@ -121,6 +120,9 @@ bool Control::_edit_use_rotation() const {
}
void Control::_edit_set_pivot(const Point2 &p_pivot) {
+ Vector2 delta_pivot = p_pivot - get_pivot_offset();
+ Vector2 move = Vector2((cos(data.rotation) - 1.0) * delta_pivot.x - sin(data.rotation) * delta_pivot.y, sin(data.rotation) * delta_pivot.x + (cos(data.rotation) - 1.0) * delta_pivot.y);
+ set_position(get_position() + move);
set_pivot_offset(p_pivot);
}
@@ -1297,7 +1299,8 @@ void Control::_size_changed() {
new_size_cache.height = MAX(minimum_size.height, new_size_cache.height);
}
- if (get_viewport()->is_snap_controls_to_pixels_enabled()) {
+ // We use a little workaround to avoid flickering when moving the pivot with _edit_set_pivot()
+ if (Math::abs(Math::sin(data.rotation * 4.0f)) < 0.00001f && get_viewport()->is_snap_controls_to_pixels_enabled()) {
new_size_cache = new_size_cache.floor();
new_pos_cache = new_pos_cache.floor();
}
@@ -1378,7 +1381,6 @@ void Control::set_anchor(Margin p_margin, float p_anchor, bool p_keep_margin, bo
data.margin[(p_margin + 2) % 4] = _s2a(previous_opposite_margin_pos, data.anchor[(p_margin + 2) % 4], parent_range);
}
}
-
if (is_inside_tree()) {
_size_changed();
}
@@ -2847,7 +2849,7 @@ void Control::_bind_methods() {
ADD_PROPERTYNZ(PropertyInfo(Variant::REAL, "rect_rotation", PROPERTY_HINT_RANGE, "-1080,1080,0.01"), "set_rotation_degrees", "get_rotation_degrees");
ADD_PROPERTYNO(PropertyInfo(Variant::VECTOR2, "rect_scale"), "set_scale", "get_scale");
ADD_PROPERTYNO(PropertyInfo(Variant::VECTOR2, "rect_pivot_offset"), "set_pivot_offset", "get_pivot_offset");
- ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "rect_clip_content"), "set_clip_contents", "is_clipping_contents");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "rect_clip_content"), "set_clip_contents", "is_clipping_contents");
ADD_GROUP("Hint", "hint_");
ADD_PROPERTYNZ(PropertyInfo(Variant::STRING, "hint_tooltip", PROPERTY_HINT_MULTILINE_TEXT), "set_tooltip", "_get_tooltip");
diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp
index 1a46921561..71c14810f6 100644
--- a/scene/gui/option_button.cpp
+++ b/scene/gui/option_button.cpp
@@ -318,8 +318,9 @@ void OptionButton::_bind_methods() {
ClassDB::bind_method(D_METHOD("_set_items"), &OptionButton::_set_items);
ClassDB::bind_method(D_METHOD("_get_items"), &OptionButton::_get_items);
- ADD_PROPERTY(PropertyInfo(Variant::INT, "selected"), "_select_int", "get_selected");
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "items", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_items", "_get_items");
+ // "selected" property must come after "items", otherwise GH-10213 occurs
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "selected"), "_select_int", "get_selected");
ADD_SIGNAL(MethodInfo("item_selected", PropertyInfo(Variant::INT, "ID")));
}
diff --git a/servers/physics/body_sw.h b/servers/physics/body_sw.h
index e8ea5531e5..fd2ab16b84 100644
--- a/servers/physics/body_sw.h
+++ b/servers/physics/body_sw.h
@@ -245,12 +245,21 @@ public:
biased_angular_velocity += _inv_inertia_tensor.xform(p_j);
}
+ _FORCE_INLINE_ void add_central_force(const Vector3 &p_force) {
+
+ applied_force += p_force;
+ }
+
_FORCE_INLINE_ void add_force(const Vector3 &p_force, const Vector3 &p_pos) {
applied_force += p_force;
applied_torque += p_pos.cross(p_force);
}
+ _FORCE_INLINE_ void add_torque(const Vector3 &p_torque) {
+ applied_torque += p_torque;
+ }
+
void set_active(bool p_active);
_FORCE_INLINE_ bool is_active() const { return active; }
@@ -401,7 +410,9 @@ public:
virtual void set_transform(const Transform &p_transform) { body->set_state(PhysicsServer::BODY_STATE_TRANSFORM, p_transform); }
virtual Transform get_transform() const { return body->get_transform(); }
+ virtual void add_central_force(const Vector3 &p_force) { body->add_central_force(p_force); }
virtual void add_force(const Vector3 &p_force, const Vector3 &p_pos) { body->add_force(p_force, p_pos); }
+ virtual void add_torque(const Vector3 &p_torque) { body->add_torque(p_torque); }
virtual void apply_impulse(const Vector3 &p_pos, const Vector3 &p_j) { body->apply_impulse(p_pos, p_j); }
virtual void apply_torque_impulse(const Vector3 &p_j) { body->apply_torque_impulse(p_j); }
diff --git a/servers/physics_2d/collision_object_2d_sw.cpp b/servers/physics_2d/collision_object_2d_sw.cpp
index 80cdd58aeb..ce06aa9a2b 100644
--- a/servers/physics_2d/collision_object_2d_sw.cpp
+++ b/servers/physics_2d/collision_object_2d_sw.cpp
@@ -100,6 +100,7 @@ void CollisionObject2DSW::remove_shape(int p_index) {
shapes[p_index].shape->remove_owner(this);
shapes.remove(p_index);
+ _update_shapes();
_shapes_changed();
}
diff --git a/servers/physics_server.cpp b/servers/physics_server.cpp
index 9d4807fcf0..db5e14043c 100644
--- a/servers/physics_server.cpp
+++ b/servers/physics_server.cpp
@@ -92,7 +92,9 @@ void PhysicsDirectBodyState::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_transform", "transform"), &PhysicsDirectBodyState::set_transform);
ClassDB::bind_method(D_METHOD("get_transform"), &PhysicsDirectBodyState::get_transform);
+ ClassDB::bind_method(D_METHOD("add_central_force", "force"), &PhysicsDirectBodyState::add_central_force);
ClassDB::bind_method(D_METHOD("add_force", "force", "position"), &PhysicsDirectBodyState::add_force);
+ ClassDB::bind_method(D_METHOD("add_torque", "torque"), &PhysicsDirectBodyState::add_torque);
ClassDB::bind_method(D_METHOD("apply_impulse", "position", "j"), &PhysicsDirectBodyState::apply_impulse);
ClassDB::bind_method(D_METHOD("apply_torqe_impulse", "j"), &PhysicsDirectBodyState::apply_torque_impulse);
diff --git a/servers/physics_server.h b/servers/physics_server.h
index 2ac405293e..c21aa32f6c 100644
--- a/servers/physics_server.h
+++ b/servers/physics_server.h
@@ -63,7 +63,9 @@ public:
virtual void set_transform(const Transform &p_transform) = 0;
virtual Transform get_transform() const = 0;
+ virtual void add_central_force(const Vector3 &p_force) = 0;
virtual void add_force(const Vector3 &p_force, const Vector3 &p_pos) = 0;
+ virtual void add_torque(const Vector3 &p_torque) = 0;
virtual void apply_impulse(const Vector3 &p_pos, const Vector3 &p_j) = 0;
virtual void apply_torque_impulse(const Vector3 &p_j) = 0;
diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp
index 29c27eee85..d9f2c949e9 100644
--- a/servers/visual/shader_language.cpp
+++ b/servers/visual/shader_language.cpp
@@ -1374,6 +1374,17 @@ const ShaderLanguage::BuiltinFuncDef ShaderLanguage::builtin_func_defs[] = {
{ "bvec4", TYPE_BVEC4, { TYPE_VEC4, TYPE_VOID } },
//builtins - trigonometry
+
+ { "radians", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } },
+ { "radians", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } },
+ { "radians", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } },
+ { "radians", TYPE_VEC4, { TYPE_VEC4, TYPE_VOID } },
+
+ { "degrees", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } },
+ { "degrees", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } },
+ { "degrees", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } },
+ { "degrees", TYPE_VEC4, { TYPE_VEC4, TYPE_VOID } },
+
{ "sin", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } },
{ "sin", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } },
{ "sin", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } },
@@ -1423,6 +1434,21 @@ const ShaderLanguage::BuiltinFuncDef ShaderLanguage::builtin_func_defs[] = {
{ "tanh", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } },
{ "tanh", TYPE_VEC4, { TYPE_VEC4, TYPE_VOID } },
+ { "asinh", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } },
+ { "asinh", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } },
+ { "asinh", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } },
+ { "asinh", TYPE_VEC4, { TYPE_VEC4, TYPE_VOID } },
+
+ { "acosh", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } },
+ { "acosh", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } },
+ { "acosh", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } },
+ { "acosh", TYPE_VEC4, { TYPE_VEC4, TYPE_VOID } },
+
+ { "atanh", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } },
+ { "atanh", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } },
+ { "atanh", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } },
+ { "atanh", TYPE_VEC4, { TYPE_VEC4, TYPE_VOID } },
+
//builtins - exponential
{ "pow", TYPE_FLOAT, { TYPE_FLOAT, TYPE_FLOAT, TYPE_VOID } },
{ "pow", TYPE_VEC2, { TYPE_VEC2, TYPE_VEC2, TYPE_VOID } },
@@ -1436,6 +1462,14 @@ const ShaderLanguage::BuiltinFuncDef ShaderLanguage::builtin_func_defs[] = {
{ "log", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } },
{ "log", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } },
{ "log", TYPE_VEC4, { TYPE_VEC4, TYPE_VOID } },
+ { "exp2", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } },
+ { "exp2", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } },
+ { "exp2", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } },
+ { "exp2", TYPE_VEC4, { TYPE_VEC4, TYPE_VOID } },
+ { "log2", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } },
+ { "log2", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } },
+ { "log2", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } },
+ { "log2", TYPE_VEC4, { TYPE_VEC4, TYPE_VOID } },
{ "sqrt", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } },
{ "sqrt", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } },
{ "sqrt", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } },
@@ -1482,6 +1516,10 @@ const ShaderLanguage::BuiltinFuncDef ShaderLanguage::builtin_func_defs[] = {
{ "round", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } },
{ "round", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } },
{ "round", TYPE_VEC4, { TYPE_VEC4, TYPE_VOID } },
+ { "roundEven", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } },
+ { "roundEven", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } },
+ { "roundEven", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } },
+ { "roundEven", TYPE_VEC4, { TYPE_VEC4, TYPE_VOID } },
{ "ceil", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } },
{ "ceil", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } },
{ "ceil", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } },
diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp
index 0e33f3d109..47577a3359 100644
--- a/servers/visual_server.cpp
+++ b/servers/visual_server.cpp
@@ -1518,6 +1518,12 @@ void VisualServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("force_sync"), &VisualServer::sync);
ClassDB::bind_method(D_METHOD("force_draw", "swap_buffers"), &VisualServer::draw, DEFVAL(true));
+ // "draw" and "sync" are deprecated duplicates of "force_draw" and "force_sync"
+ // FIXME: Add deprecation messages using GH-4397 once available, and retire
+ // once the warnings have been enabled for a full release cycle
+ ClassDB::bind_method(D_METHOD("sync"), &VisualServer::sync);
+ ClassDB::bind_method(D_METHOD("draw", "swap_buffers"), &VisualServer::draw, DEFVAL(true));
+
ClassDB::bind_method(D_METHOD("texture_create"), &VisualServer::texture_create);
ClassDB::bind_method(D_METHOD("texture_create_from_image", "image", "flags"), &VisualServer::texture_create_from_image, DEFVAL(TEXTURE_FLAGS_DEFAULT));
ClassDB::bind_method(D_METHOD("texture_allocate", "texture", "width", "height", "format", "flags"), &VisualServer::texture_allocate, DEFVAL(TEXTURE_FLAGS_DEFAULT));