summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml2
-rw-r--r--SConstruct48
-rw-r--r--core/bind/core_bind.cpp4
-rw-r--r--core/bind/core_bind.h4
-rw-r--r--core/callable_method_pointer.h17
-rw-r--r--core/compressed_translation.cpp4
-rw-r--r--core/global_constants.cpp28
-rw-r--r--core/io/json.cpp8
-rw-r--r--core/io/marshalls.cpp127
-rw-r--r--core/io/multiplayer_api.cpp113
-rw-r--r--core/io/resource_format_binary.cpp111
-rw-r--r--core/math/a_star.cpp4
-rw-r--r--core/math/expression.cpp12
-rw-r--r--core/method_ptrcall.h6
-rw-r--r--core/object.cpp14
-rw-r--r--core/os/input_event.cpp12
-rw-r--r--core/os/main_loop.cpp4
-rw-r--r--core/packed_data_container.cpp12
-rw-r--r--core/type_info.h24
-rw-r--r--core/typedefs.h22
-rw-r--r--core/ustring.cpp1
-rw-r--r--core/variant.cpp512
-rw-r--r--core/variant.h122
-rw-r--r--core/variant_call.cpp473
-rw-r--r--core/variant_op.cpp779
-rw-r--r--core/variant_parser.cpp122
-rw-r--r--doc/classes/@GlobalScope.xml74
-rw-r--r--doc/classes/AStar.xml4
-rw-r--r--doc/classes/AStar2D.xml4
-rw-r--r--doc/classes/Animation.xml4
-rw-r--r--doc/classes/Array.xml26
-rw-r--r--doc/classes/ArrayMesh.xml8
-rw-r--r--doc/classes/BoxContainer.xml6
-rw-r--r--doc/classes/CanvasItem.xml2
-rw-r--r--doc/classes/ColorPicker.xml2
-rw-r--r--doc/classes/Curve3D.xml4
-rw-r--r--doc/classes/GIProbeData.xml4
-rw-r--r--doc/classes/Geometry.xml8
-rw-r--r--doc/classes/Gradient.xml4
-rw-r--r--doc/classes/HeightMapShape.xml2
-rw-r--r--doc/classes/ItemList.xml2
-rw-r--r--doc/classes/Marshalls.xml2
-rw-r--r--doc/classes/MeshDataTool.xml14
-rw-r--r--doc/classes/MeshLibrary.xml2
-rw-r--r--doc/classes/MultiMesh.xml2
-rw-r--r--doc/classes/MultiplayerAPI.xml2
-rw-r--r--doc/classes/NavigationMesh.xml4
-rw-r--r--doc/classes/NavigationPolygon.xml8
-rw-r--r--doc/classes/NavigationServer.xml6
-rw-r--r--doc/classes/PackedFloat32Array.xml (renamed from doc/classes/PackedRealArray.xml)17
-rw-r--r--doc/classes/PackedFloat64Array.xml114
-rw-r--r--doc/classes/PackedInt32Array.xml114
-rw-r--r--doc/classes/PackedInt64Array.xml (renamed from doc/classes/PackedIntArray.xml)18
-rw-r--r--doc/classes/PackedScene.xml2
-rw-r--r--doc/classes/Polygon2D.xml6
-rw-r--r--doc/classes/PolygonPathFinder.xml2
-rw-r--r--doc/classes/Rect2.xml14
-rw-r--r--doc/classes/Rect2i.xml52
-rw-r--r--doc/classes/SceneTree.xml2
-rw-r--r--doc/classes/ScrollContainer.xml4
-rw-r--r--doc/classes/String.xml58
-rw-r--r--doc/classes/SurfaceTool.xml4
-rw-r--r--doc/classes/TextEdit.xml4
-rw-r--r--doc/classes/Vector2.xml14
-rw-r--r--doc/classes/Vector2i.xml61
-rw-r--r--doc/classes/Vector3.xml14
-rw-r--r--doc/classes/Vector3i.xml72
-rw-r--r--doc/classes/VisualServer.xml4
-rw-r--r--doc/classes/VisualShader.xml2
-rw-r--r--doc/classes/VisualShaderNode.xml13
-rw-r--r--doc/classes/VisualShaderNodeCompare.xml2
-rw-r--r--doc/classes/VisualShaderNodeFloatConstant.xml (renamed from doc/classes/VisualShaderNodeScalarConstant.xml)5
-rw-r--r--doc/classes/VisualShaderNodeFloatFunc.xml116
-rw-r--r--doc/classes/VisualShaderNodeFloatOp.xml50
-rw-r--r--doc/classes/VisualShaderNodeFloatUniform.xml (renamed from doc/classes/VisualShaderNodeScalarUniform.xml)6
-rw-r--r--doc/classes/VisualShaderNodeIf.xml2
-rw-r--r--doc/classes/VisualShaderNodeInput.xml4
-rw-r--r--doc/classes/VisualShaderNodeIntConstant.xml20
-rw-r--r--doc/classes/VisualShaderNodeIntFunc.xml32
-rw-r--r--doc/classes/VisualShaderNodeIntOp.xml41
-rw-r--r--doc/classes/VisualShaderNodeIntUniform.xml38
-rw-r--r--doc/classes/VisualShaderNodeScalarFunc.xml81
-rw-r--r--doc/classes/VisualShaderNodeScalarOp.xml37
-rw-r--r--drivers/gles2/rasterizer_storage_gles2.cpp4
-rw-r--r--editor/animation_bezier_editor.cpp6
-rw-r--r--editor/animation_track_editor.cpp55
-rw-r--r--editor/animation_track_editor.h2
-rw-r--r--editor/connections_dialog.cpp4
-rw-r--r--editor/debugger/editor_debugger_node.h2
-rw-r--r--editor/debugger/script_editor_debugger.cpp1
-rw-r--r--editor/doc/doc_dump.cpp10
-rw-r--r--editor/editor_inspector.cpp2
-rw-r--r--editor/editor_node.cpp6
-rw-r--r--editor/editor_properties.cpp30
-rw-r--r--editor/editor_properties_array_dict.cpp36
-rw-r--r--editor/editor_settings.cpp34
-rw-r--r--editor/filesystem_dock.cpp2
-rw-r--r--editor/filesystem_dock.h2
-rw-r--r--editor/groups_editor.cpp3
-rw-r--r--editor/icons/2D.svg (renamed from editor/icons/icon_2_d.svg)0
-rw-r--r--editor/icons/3D.svg (renamed from editor/icons/icon_3_d.svg)0
-rw-r--r--editor/icons/AABB.svg (renamed from editor/icons/icon_a_a_b_b.svg)0
-rw-r--r--editor/icons/ARVRAnchor.svg (renamed from editor/icons/icon_a_r_v_r_anchor.svg)0
-rw-r--r--editor/icons/ARVRCamera.svg (renamed from editor/icons/icon_a_r_v_r_camera.svg)0
-rw-r--r--editor/icons/ARVRController.svg (renamed from editor/icons/icon_a_r_v_r_controller.svg)0
-rw-r--r--editor/icons/ARVROrigin.svg (renamed from editor/icons/icon_a_r_v_r_origin.svg)0
-rw-r--r--editor/icons/AcceptDialog.svg (renamed from editor/icons/icon_accept_dialog.svg)0
-rw-r--r--editor/icons/ActionCopy.svg (renamed from editor/icons/icon_action_copy.svg)0
-rw-r--r--editor/icons/ActionCut.svg (renamed from editor/icons/icon_action_cut.svg)0
-rw-r--r--editor/icons/ActionPaste.svg (renamed from editor/icons/icon_action_paste.svg)0
-rw-r--r--editor/icons/Add.svg (renamed from editor/icons/icon_add.svg)0
-rw-r--r--editor/icons/AddAtlasTile.svg (renamed from editor/icons/icon_add_atlas_tile.svg)0
-rw-r--r--editor/icons/AddAutotile.svg (renamed from editor/icons/icon_add_autotile.svg)0
-rw-r--r--editor/icons/AddSingleTile.svg (renamed from editor/icons/icon_add_single_tile.svg)0
-rw-r--r--editor/icons/AddSplit.svg (renamed from editor/icons/icon_add_split.svg)0
-rw-r--r--editor/icons/Anchor.svg (renamed from editor/icons/icon_anchor.svg)0
-rw-r--r--editor/icons/AnimatedSprite.svg (renamed from editor/icons/icon_animated_sprite.svg)0
-rw-r--r--editor/icons/AnimatedSprite3D.svg (renamed from editor/icons/icon_animated_sprite_3d.svg)0
-rw-r--r--editor/icons/AnimatedTexture.svg (renamed from editor/icons/icon_animated_texture.svg)0
-rw-r--r--editor/icons/Animation.svg (renamed from editor/icons/icon_animation.svg)0
-rw-r--r--editor/icons/AnimationFilter.svg (renamed from editor/icons/icon_animation_filter.svg)0
-rw-r--r--editor/icons/AnimationPlayer.svg (renamed from editor/icons/icon_animation_player.svg)0
-rw-r--r--editor/icons/AnimationTrackGroup.svg (renamed from editor/icons/icon_animation_track_group.svg)0
-rw-r--r--editor/icons/AnimationTrackList.svg (renamed from editor/icons/icon_animation_track_list.svg)0
-rw-r--r--editor/icons/AnimationTree.svg (renamed from editor/icons/icon_animation_tree.svg)0
-rw-r--r--editor/icons/Area.svg (renamed from editor/icons/icon_area.svg)0
-rw-r--r--editor/icons/Area2D.svg (renamed from editor/icons/icon_area_2d.svg)0
-rw-r--r--editor/icons/Array.svg (renamed from editor/icons/icon_array.svg)0
-rw-r--r--editor/icons/ArrayMesh.svg (renamed from editor/icons/icon_array_mesh.svg)0
-rw-r--r--editor/icons/ArrowDown.svg (renamed from editor/icons/icon_arrow_down.svg)0
-rw-r--r--editor/icons/ArrowLeft.svg (renamed from editor/icons/icon_arrow_left.svg)0
-rw-r--r--editor/icons/ArrowRight.svg (renamed from editor/icons/icon_arrow_right.svg)0
-rw-r--r--editor/icons/ArrowUp.svg (renamed from editor/icons/icon_arrow_up.svg)0
-rw-r--r--editor/icons/AssetLib.svg (renamed from editor/icons/icon_asset_lib.svg)0
-rw-r--r--editor/icons/AtlasTexture.svg (renamed from editor/icons/icon_atlas_texture.svg)0
-rw-r--r--editor/icons/AudioBusBypass.svg (renamed from editor/icons/icon_audio_bus_bypass.svg)0
-rw-r--r--editor/icons/AudioBusLayout.svg (renamed from editor/icons/icon_audio_bus_layout.svg)0
-rw-r--r--editor/icons/AudioBusMute.svg (renamed from editor/icons/icon_audio_bus_mute.svg)0
-rw-r--r--editor/icons/AudioBusSolo.svg (renamed from editor/icons/icon_audio_bus_solo.svg)0
-rw-r--r--editor/icons/AudioStreamOGGVorbis.svg (renamed from editor/icons/icon_audio_stream_o_g_g_vorbis.svg)0
-rw-r--r--editor/icons/AudioStreamPlayer.svg (renamed from editor/icons/icon_audio_stream_player.svg)0
-rw-r--r--editor/icons/AudioStreamPlayer2D.svg (renamed from editor/icons/icon_audio_stream_player_2_d.svg)0
-rw-r--r--editor/icons/AudioStreamPlayer3D.svg (renamed from editor/icons/icon_audio_stream_player_3_d.svg)0
-rw-r--r--editor/icons/AudioStreamSample.svg (renamed from editor/icons/icon_audio_stream_sample.svg)0
-rw-r--r--editor/icons/AutoEnd.svg (renamed from editor/icons/icon_auto_end.svg)0
-rw-r--r--editor/icons/AutoKey.svg (renamed from editor/icons/icon_auto_key.svg)0
-rw-r--r--editor/icons/AutoPlay.svg (renamed from editor/icons/icon_auto_play.svg)0
-rw-r--r--editor/icons/AutoTriangle.svg (renamed from editor/icons/icon_auto_triangle.svg)0
-rw-r--r--editor/icons/Back.svg (renamed from editor/icons/icon_back.svg)0
-rw-r--r--editor/icons/BackBufferCopy.svg (renamed from editor/icons/icon_back_buffer_copy.svg)0
-rw-r--r--editor/icons/Bake.svg (renamed from editor/icons/icon_bake.svg)0
-rw-r--r--editor/icons/BakedLightmap.svg (renamed from editor/icons/icon_baked_lightmap.svg)0
-rw-r--r--editor/icons/BakedLightmapData.svg (renamed from editor/icons/icon_baked_lightmap_data.svg)0
-rw-r--r--editor/icons/Basis.svg (renamed from editor/icons/icon_basis.svg)0
-rw-r--r--editor/icons/BezierHandlesBalanced.svg (renamed from editor/icons/icon_bezier_handles_balanced.svg)0
-rw-r--r--editor/icons/BezierHandlesFree.svg (renamed from editor/icons/icon_bezier_handles_free.svg)0
-rw-r--r--editor/icons/BezierHandlesMirror.svg (renamed from editor/icons/icon_bezier_handles_mirror.svg)0
-rw-r--r--editor/icons/BitMap.svg (renamed from editor/icons/icon_bit_map.svg)0
-rw-r--r--editor/icons/BitmapFont.svg (renamed from editor/icons/icon_bitmap_font.svg)0
-rw-r--r--editor/icons/Blend.svg (renamed from editor/icons/icon_blend.svg)0
-rw-r--r--editor/icons/Bone.svg (renamed from editor/icons/icon_bone.svg)0
-rw-r--r--editor/icons/Bone2D.svg (renamed from editor/icons/icon_bone_2_d.svg)0
-rw-r--r--editor/icons/BoneAttachment.svg (renamed from editor/icons/icon_bone_attachment.svg)0
-rw-r--r--editor/icons/BoneTrack.svg (renamed from editor/icons/icon_bone_track.svg)0
-rw-r--r--editor/icons/BoxShape.svg (renamed from editor/icons/icon_box_shape.svg)0
-rw-r--r--editor/icons/Bucket.svg (renamed from editor/icons/icon_bucket.svg)0
-rw-r--r--editor/icons/BusVuEmpty.svg (renamed from editor/icons/icon_bus_vu_empty.svg)0
-rw-r--r--editor/icons/BusVuFrozen.svg (renamed from editor/icons/icon_bus_vu_frozen.svg)0
-rw-r--r--editor/icons/BusVuFull.svg (renamed from editor/icons/icon_bus_vu_full.svg)0
-rw-r--r--editor/icons/Button.svg (renamed from editor/icons/icon_button.svg)0
-rw-r--r--editor/icons/ButtonGroup.svg (renamed from editor/icons/icon_button_group.svg)0
-rw-r--r--editor/icons/CPUParticles.svg (renamed from editor/icons/icon_c_p_u_particles.svg)0
-rw-r--r--editor/icons/CPUParticles2D.svg (renamed from editor/icons/icon_c_p_u_particles_2_d.svg)0
-rw-r--r--editor/icons/Callable.svg5
-rw-r--r--editor/icons/Camera.svg (renamed from editor/icons/icon_camera.svg)0
-rw-r--r--editor/icons/Camera2D.svg (renamed from editor/icons/icon_camera_2d.svg)0
-rw-r--r--editor/icons/CameraTexture.svg (renamed from editor/icons/icon_camera_texture.svg)0
-rw-r--r--editor/icons/CanvasItem.svg (renamed from editor/icons/icon_canvas_item.svg)0
-rw-r--r--editor/icons/CanvasItemMaterial.svg (renamed from editor/icons/icon_canvas_item_material.svg)0
-rw-r--r--editor/icons/CanvasItemShader.svg (renamed from editor/icons/icon_canvas_item_shader.svg)0
-rw-r--r--editor/icons/CanvasItemShaderGraph.svg (renamed from editor/icons/icon_canvas_item_shader_graph.svg)0
-rw-r--r--editor/icons/CanvasLayer.svg (renamed from editor/icons/icon_canvas_layer.svg)0
-rw-r--r--editor/icons/CanvasModulate.svg (renamed from editor/icons/icon_canvas_modulate.svg)0
-rw-r--r--editor/icons/CapsuleMesh.svg (renamed from editor/icons/icon_capsule_mesh.svg)0
-rw-r--r--editor/icons/CapsuleShape.svg (renamed from editor/icons/icon_capsule_shape.svg)0
-rw-r--r--editor/icons/CapsuleShape2D.svg (renamed from editor/icons/icon_capsule_shape_2d.svg)0
-rw-r--r--editor/icons/CenterContainer.svg (renamed from editor/icons/icon_center_container.svg)0
-rw-r--r--editor/icons/CheckBox.svg (renamed from editor/icons/icon_check_box.svg)0
-rw-r--r--editor/icons/CheckButton.svg (renamed from editor/icons/icon_check_button.svg)0
-rw-r--r--editor/icons/Checkerboard.svg (renamed from editor/icons/icon_checkerboard.svg)0
-rw-r--r--editor/icons/CircleShape2D.svg (renamed from editor/icons/icon_circle_shape_2d.svg)0
-rw-r--r--editor/icons/ClassList.svg (renamed from editor/icons/icon_class_list.svg)0
-rw-r--r--editor/icons/Clear.svg (renamed from editor/icons/icon_clear.svg)0
-rw-r--r--editor/icons/ClippedCamera.svg (renamed from editor/icons/icon_clipped_camera.svg)0
-rw-r--r--editor/icons/Close.svg (renamed from editor/icons/icon_close.svg)0
-rw-r--r--editor/icons/Collapse.svg (renamed from editor/icons/icon_collapse.svg)0
-rw-r--r--editor/icons/CollisionPolygon.svg (renamed from editor/icons/icon_collision_polygon.svg)0
-rw-r--r--editor/icons/CollisionPolygon2D.svg (renamed from editor/icons/icon_collision_polygon_2d.svg)0
-rw-r--r--editor/icons/CollisionShape.svg (renamed from editor/icons/icon_collision_shape.svg)0
-rw-r--r--editor/icons/CollisionShape2D.svg (renamed from editor/icons/icon_collision_shape_2d.svg)0
-rw-r--r--editor/icons/Color.svg (renamed from editor/icons/icon_color.svg)0
-rw-r--r--editor/icons/ColorPick.svg (renamed from editor/icons/icon_color_pick.svg)0
-rw-r--r--editor/icons/ColorPicker.svg (renamed from editor/icons/icon_color_picker.svg)0
-rw-r--r--editor/icons/ColorPickerButton.svg (renamed from editor/icons/icon_color_picker_button.svg)0
-rw-r--r--editor/icons/ColorRamp.svg (renamed from editor/icons/icon_color_ramp.svg)0
-rw-r--r--editor/icons/ColorRect.svg (renamed from editor/icons/icon_color_rect.svg)0
-rw-r--r--editor/icons/ColorTrackVu.svg (renamed from editor/icons/icon_color_track_vu.svg)0
-rw-r--r--editor/icons/ConcavePolygonShape.svg (renamed from editor/icons/icon_concave_polygon_shape.svg)0
-rw-r--r--editor/icons/ConcavePolygonShape2D.svg (renamed from editor/icons/icon_concave_polygon_shape_2d.svg)0
-rw-r--r--editor/icons/ConeTwistJoint.svg (renamed from editor/icons/icon_cone_twist_joint.svg)0
-rw-r--r--editor/icons/ConfirmationDialog.svg (renamed from editor/icons/icon_confirmation_dialog.svg)0
-rw-r--r--editor/icons/Container.svg (renamed from editor/icons/icon_container.svg)0
-rw-r--r--editor/icons/Control.svg (renamed from editor/icons/icon_control.svg)0
-rw-r--r--editor/icons/ControlAlignBottomCenter.svg (renamed from editor/icons/icon_control_align_bottom_center.svg)0
-rw-r--r--editor/icons/ControlAlignBottomLeft.svg (renamed from editor/icons/icon_control_align_bottom_left.svg)0
-rw-r--r--editor/icons/ControlAlignBottomRight.svg (renamed from editor/icons/icon_control_align_bottom_right.svg)0
-rw-r--r--editor/icons/ControlAlignBottomWide.svg (renamed from editor/icons/icon_control_align_bottom_wide.svg)0
-rw-r--r--editor/icons/ControlAlignCenter.svg (renamed from editor/icons/icon_control_align_center.svg)0
-rw-r--r--editor/icons/ControlAlignCenterLeft.svg (renamed from editor/icons/icon_control_align_center_left.svg)0
-rw-r--r--editor/icons/ControlAlignCenterRight.svg (renamed from editor/icons/icon_control_align_center_right.svg)0
-rw-r--r--editor/icons/ControlAlignLeftCenter.svg (renamed from editor/icons/icon_control_align_left_center.svg)0
-rw-r--r--editor/icons/ControlAlignLeftWide.svg (renamed from editor/icons/icon_control_align_left_wide.svg)0
-rw-r--r--editor/icons/ControlAlignRightCenter.svg (renamed from editor/icons/icon_control_align_right_center.svg)0
-rw-r--r--editor/icons/ControlAlignRightWide.svg (renamed from editor/icons/icon_control_align_right_wide.svg)0
-rw-r--r--editor/icons/ControlAlignTopCenter.svg (renamed from editor/icons/icon_control_align_top_center.svg)0
-rw-r--r--editor/icons/ControlAlignTopLeft.svg (renamed from editor/icons/icon_control_align_top_left.svg)0
-rw-r--r--editor/icons/ControlAlignTopRight.svg (renamed from editor/icons/icon_control_align_top_right.svg)0
-rw-r--r--editor/icons/ControlAlignTopWide.svg (renamed from editor/icons/icon_control_align_top_wide.svg)0
-rw-r--r--editor/icons/ControlAlignWide.svg (renamed from editor/icons/icon_control_align_wide.svg)0
-rw-r--r--editor/icons/ControlHcenterWide.svg (renamed from editor/icons/icon_control_hcenter_wide.svg)0
-rw-r--r--editor/icons/ControlLayout.svg (renamed from editor/icons/icon_control_layout.svg)0
-rw-r--r--editor/icons/ControlVcenterWide.svg (renamed from editor/icons/icon_control_vcenter_wide.svg)0
-rw-r--r--editor/icons/ConvexPolygonShape.svg (renamed from editor/icons/icon_convex_polygon_shape.svg)0
-rw-r--r--editor/icons/ConvexPolygonShape2D.svg (renamed from editor/icons/icon_convex_polygon_shape_2d.svg)0
-rw-r--r--editor/icons/CopyNodePath.svg (renamed from editor/icons/icon_copy_node_path.svg)0
-rw-r--r--editor/icons/CreateNewSceneFrom.svg (renamed from editor/icons/icon_create_new_scene_from.svg)0
-rw-r--r--editor/icons/Crosshair.svg (renamed from editor/icons/icon_crosshair.svg)0
-rw-r--r--editor/icons/CryptoKey.svg (renamed from editor/icons/icon_crypto_key.svg)0
-rw-r--r--editor/icons/CubeMap.svg (renamed from editor/icons/icon_cube_map.svg)0
-rw-r--r--editor/icons/CubeMesh.svg (renamed from editor/icons/icon_cube_mesh.svg)0
-rw-r--r--editor/icons/Curve.svg (renamed from editor/icons/icon_curve.svg)0
-rw-r--r--editor/icons/Curve2D.svg (renamed from editor/icons/icon_curve_2d.svg)0
-rw-r--r--editor/icons/Curve3D.svg (renamed from editor/icons/icon_curve_3d.svg)0
-rw-r--r--editor/icons/CurveClose.svg (renamed from editor/icons/icon_curve_close.svg)0
-rw-r--r--editor/icons/CurveConstant.svg (renamed from editor/icons/icon_curve_constant.svg)0
-rw-r--r--editor/icons/CurveCreate.svg (renamed from editor/icons/icon_curve_create.svg)0
-rw-r--r--editor/icons/CurveCurve.svg (renamed from editor/icons/icon_curve_curve.svg)0
-rw-r--r--editor/icons/CurveDelete.svg (renamed from editor/icons/icon_curve_delete.svg)0
-rw-r--r--editor/icons/CurveEdit.svg (renamed from editor/icons/icon_curve_edit.svg)0
-rw-r--r--editor/icons/CurveIn.svg (renamed from editor/icons/icon_curve_in.svg)0
-rw-r--r--editor/icons/CurveInOut.svg (renamed from editor/icons/icon_curve_in_out.svg)0
-rw-r--r--editor/icons/CurveLinear.svg (renamed from editor/icons/icon_curve_linear.svg)0
-rw-r--r--editor/icons/CurveOut.svg (renamed from editor/icons/icon_curve_out.svg)0
-rw-r--r--editor/icons/CurveOutIn.svg (renamed from editor/icons/icon_curve_out_in.svg)0
-rw-r--r--editor/icons/CurveTexture.svg (renamed from editor/icons/icon_curve_texture.svg)0
-rw-r--r--editor/icons/CylinderMesh.svg (renamed from editor/icons/icon_cylinder_mesh.svg)0
-rw-r--r--editor/icons/CylinderShape.svg (renamed from editor/icons/icon_cylinder_shape.svg)0
-rw-r--r--editor/icons/DampedSpringJoint2D.svg (renamed from editor/icons/icon_damped_spring_joint_2d.svg)0
-rw-r--r--editor/icons/Debug.svg (renamed from editor/icons/icon_debug.svg)0
-rw-r--r--editor/icons/DebugContinue.svg (renamed from editor/icons/icon_debug_continue.svg)0
-rw-r--r--editor/icons/DebugNext.svg (renamed from editor/icons/icon_debug_next.svg)0
-rw-r--r--editor/icons/DebugSkipBreakpointsOff.svg (renamed from editor/icons/icon_debug_skip_breakpoints_off.svg)0
-rw-r--r--editor/icons/DebugSkipBreakpointsOn.svg (renamed from editor/icons/icon_debug_skip_breakpoints_on.svg)0
-rw-r--r--editor/icons/DebugStep.svg (renamed from editor/icons/icon_debug_step.svg)0
-rw-r--r--editor/icons/DefaultProjectIcon.svg (renamed from editor/icons/icon_default_project_icon.svg)0
-rw-r--r--editor/icons/DeleteSplit.svg (renamed from editor/icons/icon_delete_split.svg)0
-rw-r--r--editor/icons/Dictionary.svg (renamed from editor/icons/icon_dictionary.svg)0
-rw-r--r--editor/icons/DirectionalLight.svg (renamed from editor/icons/icon_directional_light.svg)0
-rw-r--r--editor/icons/DistractionFree.svg (renamed from editor/icons/icon_distraction_free.svg)0
-rw-r--r--editor/icons/Duplicate.svg (renamed from editor/icons/icon_duplicate.svg)0
-rw-r--r--editor/icons/DynamicFont.svg (renamed from editor/icons/icon_dynamic_font.svg)0
-rw-r--r--editor/icons/DynamicFontData.svg (renamed from editor/icons/icon_dynamic_font_data.svg)0
-rw-r--r--editor/icons/Edit.svg (renamed from editor/icons/icon_edit.svg)0
-rw-r--r--editor/icons/EditBezier.svg (renamed from editor/icons/icon_edit_bezier.svg)0
-rw-r--r--editor/icons/EditInternal.svg (renamed from editor/icons/icon_edit_internal.svg)0
-rw-r--r--editor/icons/EditKey.svg (renamed from editor/icons/icon_edit_key.svg)0
-rw-r--r--editor/icons/EditPivot.svg (renamed from editor/icons/icon_edit_pivot.svg)0
-rw-r--r--editor/icons/EditResource.svg (renamed from editor/icons/icon_edit_resource.svg)0
-rw-r--r--editor/icons/Editor3DHandle.svg (renamed from editor/icons/icon_editor_3d_handle.svg)0
-rw-r--r--editor/icons/EditorControlAnchor.svg (renamed from editor/icons/icon_editor_control_anchor.svg)0
-rw-r--r--editor/icons/EditorCurveHandle.svg (renamed from editor/icons/icon_editor_curve_handle.svg)0
-rw-r--r--editor/icons/EditorHandle.svg (renamed from editor/icons/icon_editor_handle.svg)0
-rw-r--r--editor/icons/EditorHandleAdd.svg (renamed from editor/icons/icon_editor_handle_add.svg)0
-rw-r--r--editor/icons/EditorInternalHandle.svg (renamed from editor/icons/icon_editor_internal_handle.svg)0
-rw-r--r--editor/icons/EditorPathSharpHandle.svg (renamed from editor/icons/icon_editor_path_sharp_handle.svg)0
-rw-r--r--editor/icons/EditorPathSmoothHandle.svg (renamed from editor/icons/icon_editor_path_smooth_handle.svg)0
-rw-r--r--editor/icons/EditorPivot.svg (renamed from editor/icons/icon_editor_pivot.svg)0
-rw-r--r--editor/icons/EditorPlugin.svg (renamed from editor/icons/icon_editor_plugin.svg)0
-rw-r--r--editor/icons/EditorPosition.svg (renamed from editor/icons/icon_editor_position.svg)0
-rw-r--r--editor/icons/EditorPositionPrevious.svg (renamed from editor/icons/icon_editor_position_previous.svg)0
-rw-r--r--editor/icons/EditorPositionUnselected.svg (renamed from editor/icons/icon_editor_position_unselected.svg)0
-rw-r--r--editor/icons/Enum.svg (renamed from editor/icons/icon_enum.svg)0
-rw-r--r--editor/icons/Environment.svg (renamed from editor/icons/icon_environment.svg)0
-rw-r--r--editor/icons/Error.svg (renamed from editor/icons/icon_error.svg)0
-rw-r--r--editor/icons/ErrorSign.svg (renamed from editor/icons/icon_error_sign.svg)0
-rw-r--r--editor/icons/ExpandBottomDock.svg (renamed from editor/icons/icon_expand_bottom_dock.svg)0
-rw-r--r--editor/icons/Favorites.svg (renamed from editor/icons/icon_favorites.svg)0
-rw-r--r--editor/icons/File.svg (renamed from editor/icons/icon_file.svg)0
-rw-r--r--editor/icons/FileBigThumb.svg (renamed from editor/icons/icon_file_big_thumb.svg)0
-rw-r--r--editor/icons/FileBroken.svg (renamed from editor/icons/icon_file_broken.svg)0
-rw-r--r--editor/icons/FileBrokenBigThumb.svg (renamed from editor/icons/icon_file_broken_big_thumb.svg)0
-rw-r--r--editor/icons/FileDead.svg (renamed from editor/icons/icon_file_dead.svg)0
-rw-r--r--editor/icons/FileDeadBigThumb.svg (renamed from editor/icons/icon_file_dead_big_thumb.svg)0
-rw-r--r--editor/icons/FileDeadMediumThumb.svg (renamed from editor/icons/icon_file_dead_medium_thumb.svg)0
-rw-r--r--editor/icons/FileDialog.svg (renamed from editor/icons/icon_file_dialog.svg)0
-rw-r--r--editor/icons/FileList.svg (renamed from editor/icons/icon_file_list.svg)0
-rw-r--r--editor/icons/FileMediumThumb.svg (renamed from editor/icons/icon_file_medium_thumb.svg)0
-rw-r--r--editor/icons/FileThumbnail.svg (renamed from editor/icons/icon_file_thumbnail.svg)0
-rw-r--r--editor/icons/Filesystem.svg (renamed from editor/icons/icon_filesystem.svg)0
-rw-r--r--editor/icons/FixedMaterial.svg (renamed from editor/icons/icon_fixed_material.svg)0
-rw-r--r--editor/icons/FixedSpatialMaterial.svg (renamed from editor/icons/icon_fixed_spatial_material.svg)0
-rw-r--r--editor/icons/Folder.svg (renamed from editor/icons/icon_folder.svg)0
-rw-r--r--editor/icons/FolderBigThumb.svg (renamed from editor/icons/icon_folder_big_thumb.svg)0
-rw-r--r--editor/icons/FolderMediumThumb.svg (renamed from editor/icons/icon_folder_medium_thumb.svg)0
-rw-r--r--editor/icons/Font.svg (renamed from editor/icons/icon_font.svg)0
-rw-r--r--editor/icons/Forward.svg (renamed from editor/icons/icon_forward.svg)0
-rw-r--r--editor/icons/GIProbe.svg (renamed from editor/icons/icon_g_i_probe.svg)0
-rw-r--r--editor/icons/GIProbeData.svg (renamed from editor/icons/icon_g_i_probe_data.svg)0
-rw-r--r--editor/icons/Generic6DOFJoint.svg (renamed from editor/icons/icon_generic_6_d_o_f_joint.svg)0
-rw-r--r--editor/icons/GizmoBakedLightmap.svg (renamed from editor/icons/icon_gizmo_baked_lightmap.svg)0
-rw-r--r--editor/icons/GizmoCPUParticles.svg (renamed from editor/icons/icon_gizmo_c_p_u_particles.svg)0
-rw-r--r--editor/icons/GizmoCamera.svg (renamed from editor/icons/icon_gizmo_camera.svg)0
-rw-r--r--editor/icons/GizmoDirectionalLight.svg (renamed from editor/icons/icon_gizmo_directional_light.svg)0
-rw-r--r--editor/icons/GizmoGIProbe.svg (renamed from editor/icons/icon_gizmo_g_i_probe.svg)0
-rw-r--r--editor/icons/GizmoLight.svg (renamed from editor/icons/icon_gizmo_light.svg)0
-rw-r--r--editor/icons/GizmoListener.svg (renamed from editor/icons/icon_gizmo_listener.svg)0
-rw-r--r--editor/icons/GizmoParticles.svg (renamed from editor/icons/icon_gizmo_particles.svg)0
-rw-r--r--editor/icons/GizmoReflectionProbe.svg (renamed from editor/icons/icon_gizmo_reflection_probe.svg)0
-rw-r--r--editor/icons/GizmoSpatialSamplePlayer.svg (renamed from editor/icons/icon_gizmo_spatial_sample_player.svg)0
-rw-r--r--editor/icons/GizmoSpotLight.svg (renamed from editor/icons/icon_gizmo_spot_light.svg)0
-rw-r--r--editor/icons/Godot.svg (renamed from editor/icons/icon_godot.svg)0
-rw-r--r--editor/icons/Gradient.svg (renamed from editor/icons/icon_gradient.svg)0
-rw-r--r--editor/icons/GradientTexture.svg (renamed from editor/icons/icon_gradient_texture.svg)0
-rw-r--r--editor/icons/GraphEdit.svg (renamed from editor/icons/icon_graph_edit.svg)0
-rw-r--r--editor/icons/GraphNode.svg (renamed from editor/icons/icon_graph_node.svg)0
-rw-r--r--editor/icons/Grid.svg (renamed from editor/icons/icon_grid.svg)0
-rw-r--r--editor/icons/GridContainer.svg (renamed from editor/icons/icon_grid_container.svg)0
-rw-r--r--editor/icons/GrooveJoint2D.svg (renamed from editor/icons/icon_groove_joint_2d.svg)0
-rw-r--r--editor/icons/Group.svg (renamed from editor/icons/icon_group.svg)0
-rw-r--r--editor/icons/GroupViewport.svg (renamed from editor/icons/icon_group_viewport.svg)0
-rw-r--r--editor/icons/Groups.svg (renamed from editor/icons/icon_groups.svg)0
-rw-r--r--editor/icons/GuiChecked.svg (renamed from editor/icons/icon_GUI_checked.svg)0
-rw-r--r--editor/icons/GuiClose.svg (renamed from editor/icons/icon_gui_close.svg)0
-rw-r--r--editor/icons/GuiCloseCustomizable.svg (renamed from editor/icons/icon_gui_close_customizable.svg)0
-rw-r--r--editor/icons/GuiDropdown.svg (renamed from editor/icons/icon_GUI_dropdown.svg)0
-rw-r--r--editor/icons/GuiEllipsis.svg (renamed from editor/icons/icon_GUI_ellipsis.svg)0
-rw-r--r--editor/icons/GuiGraphNodePort.svg (renamed from editor/icons/icon_gui_graph_node_port.svg)0
-rw-r--r--editor/icons/GuiHTick.svg (renamed from editor/icons/icon_GUI_h_tick.svg)0
-rw-r--r--editor/icons/GuiHsplitter.svg (renamed from editor/icons/icon_GUI_hsplitter.svg)0
-rw-r--r--editor/icons/GuiMiniCheckerboard.svg (renamed from editor/icons/icon_GUI_mini_checkerboard.svg)0
-rw-r--r--editor/icons/GuiOptionArrow.svg (renamed from editor/icons/icon_GUI_option_arrow.svg)0
-rw-r--r--editor/icons/GuiProgressBar.svg (renamed from editor/icons/icon_GUI_progress_bar.svg)0
-rw-r--r--editor/icons/GuiProgressFill.svg (renamed from editor/icons/icon_GUI_progress_fill.svg)0
-rw-r--r--editor/icons/GuiRadioChecked.svg (renamed from editor/icons/icon_GUI_radio_checked.svg)0
-rw-r--r--editor/icons/GuiRadioUnchecked.svg (renamed from editor/icons/icon_GUI_radio_unchecked.svg)0
-rw-r--r--editor/icons/GuiResizer.svg (renamed from editor/icons/icon_gui_resizer.svg)0
-rw-r--r--editor/icons/GuiScrollArrowLeft.svg (renamed from editor/icons/icon_GUI_scroll_arrow_left.svg)0
-rw-r--r--editor/icons/GuiScrollArrowLeftHl.svg (renamed from editor/icons/icon_GUI_scroll_arrow_left_hl.svg)0
-rw-r--r--editor/icons/GuiScrollArrowRight.svg (renamed from editor/icons/icon_GUI_scroll_arrow_right.svg)0
-rw-r--r--editor/icons/GuiScrollArrowRightHl.svg (renamed from editor/icons/icon_GUI_scroll_arrow_right_hl.svg)0
-rw-r--r--editor/icons/GuiScrollBg.svg (renamed from editor/icons/icon_GUI_scroll_bg.svg)0
-rw-r--r--editor/icons/GuiScrollGrabber.svg (renamed from editor/icons/icon_GUI_scroll_grabber.svg)0
-rw-r--r--editor/icons/GuiScrollGrabberHl.svg (renamed from editor/icons/icon_GUI_scroll_grabber_hl.svg)0
-rw-r--r--editor/icons/GuiScrollGrabberPressed.svg (renamed from editor/icons/icon_GUI_scroll_grabber_pressed.svg)0
-rw-r--r--editor/icons/GuiSliderGrabber.svg (renamed from editor/icons/icon_GUI_slider_grabber.svg)0
-rw-r--r--editor/icons/GuiSliderGrabberHl.svg (renamed from editor/icons/icon_GUI_slider_grabber_hl.svg)0
-rw-r--r--editor/icons/GuiSpace.svg (renamed from editor/icons/icon_GUI_space.svg)0
-rw-r--r--editor/icons/GuiSpinboxUpdown.svg (renamed from editor/icons/icon_GUI_spinbox_updown.svg)0
-rw-r--r--editor/icons/GuiTab.svg (renamed from editor/icons/icon_GUI_tab.svg)0
-rw-r--r--editor/icons/GuiTabMenu.svg (renamed from editor/icons/icon_GUI_tab_menu.svg)0
-rw-r--r--editor/icons/GuiTabMenuHl.svg (renamed from editor/icons/icon_GUI_tab_menu_hl.svg)0
-rw-r--r--editor/icons/GuiToggleOff.svg (renamed from editor/icons/icon_GUI_toggle_off.svg)0
-rw-r--r--editor/icons/GuiToggleOn.svg (renamed from editor/icons/icon_GUI_toggle_on.svg)0
-rw-r--r--editor/icons/GuiTreeArrowDown.svg (renamed from editor/icons/icon_GUI_tree_arrow_down.svg)0
-rw-r--r--editor/icons/GuiTreeArrowRight.svg (renamed from editor/icons/icon_GUI_tree_arrow_right.svg)0
-rw-r--r--editor/icons/GuiTreeArrowUp.svg (renamed from editor/icons/icon_GUI_tree_arrow_up.svg)0
-rw-r--r--editor/icons/GuiTreeUpdown.svg (renamed from editor/icons/icon_GUI_tree_updown.svg)0
-rw-r--r--editor/icons/GuiUnchecked.svg (renamed from editor/icons/icon_GUI_unchecked.svg)0
-rw-r--r--editor/icons/GuiVTick.svg (renamed from editor/icons/icon_GUI_v_tick.svg)0
-rw-r--r--editor/icons/GuiViewportHdiagsplitter.svg (renamed from editor/icons/icon_GUI_viewport_hdiagsplitter.svg)0
-rw-r--r--editor/icons/GuiViewportVdiagsplitter.svg (renamed from editor/icons/icon_GUI_viewport_vdiagsplitter.svg)0
-rw-r--r--editor/icons/GuiViewportVhsplitter.svg (renamed from editor/icons/icon_GUI_viewport_vhsplitter.svg)0
-rw-r--r--editor/icons/GuiVisibilityHidden.svg (renamed from editor/icons/icon_GUI_visibility_hidden.svg)0
-rw-r--r--editor/icons/GuiVisibilityVisible.svg (renamed from editor/icons/icon_GUI_visibility_visible.svg)0
-rw-r--r--editor/icons/GuiVisibilityXray.svg (renamed from editor/icons/icon_GUI_visibility_xray.svg)0
-rw-r--r--editor/icons/GuiVsplitBg.svg (renamed from editor/icons/icon_GUI_vsplit_bg.svg)0
-rw-r--r--editor/icons/GuiVsplitter.svg (renamed from editor/icons/icon_GUI_vsplitter.svg)0
-rw-r--r--editor/icons/HBoxContainer.svg (renamed from editor/icons/icon_h_box_container.svg)0
-rw-r--r--editor/icons/HScrollBar.svg (renamed from editor/icons/icon_h_scroll_bar.svg)0
-rw-r--r--editor/icons/HSeparator.svg (renamed from editor/icons/icon_h_separator.svg)0
-rw-r--r--editor/icons/HSlider.svg (renamed from editor/icons/icon_h_slider.svg)0
-rw-r--r--editor/icons/HSplitContainer.svg (renamed from editor/icons/icon_h_split_container.svg)0
-rw-r--r--editor/icons/HTTPRequest.svg (renamed from editor/icons/icon_h_t_t_p_request.svg)0
-rw-r--r--editor/icons/Headphones.svg (renamed from editor/icons/icon_headphones.svg)0
-rw-r--r--editor/icons/HeightMapShape.svg (renamed from editor/icons/icon_height_map_shape.svg)0
-rw-r--r--editor/icons/Help.svg (renamed from editor/icons/icon_help.svg)0
-rw-r--r--editor/icons/HelpSearch.svg (renamed from editor/icons/icon_help_search.svg)0
-rw-r--r--editor/icons/HingeJoint.svg (renamed from editor/icons/icon_hinge_joint.svg)0
-rw-r--r--editor/icons/History.svg (renamed from editor/icons/icon_history.svg)0
-rw-r--r--editor/icons/Hsize.svg (renamed from editor/icons/icon_hsize.svg)0
-rw-r--r--editor/icons/Image.svg (renamed from editor/icons/icon_image.svg)0
-rw-r--r--editor/icons/ImageTexture.svg (renamed from editor/icons/icon_image_texture.svg)0
-rw-r--r--editor/icons/ImmediateGeometry.svg (renamed from editor/icons/icon_immediate_geometry.svg)0
-rw-r--r--editor/icons/ImportCheck.svg (renamed from editor/icons/icon_import_check.svg)0
-rw-r--r--editor/icons/ImportFail.svg (renamed from editor/icons/icon_import_fail.svg)0
-rw-r--r--editor/icons/InformationSign.svg (renamed from editor/icons/icon_information_sign.svg)0
-rw-r--r--editor/icons/InsertAfter.svg (renamed from editor/icons/icon_insert_after.svg)0
-rw-r--r--editor/icons/InsertBefore.svg (renamed from editor/icons/icon_insert_before.svg)0
-rw-r--r--editor/icons/Instance.svg (renamed from editor/icons/icon_instance.svg)0
-rw-r--r--editor/icons/InstanceOptions.svg (renamed from editor/icons/icon_instance_options.svg)0
-rw-r--r--editor/icons/InterpCubic.svg (renamed from editor/icons/icon_interp_cubic.svg)0
-rw-r--r--editor/icons/InterpLinear.svg (renamed from editor/icons/icon_interp_linear.svg)0
-rw-r--r--editor/icons/InterpRaw.svg (renamed from editor/icons/icon_interp_raw.svg)0
-rw-r--r--editor/icons/InterpWrapClamp.svg (renamed from editor/icons/icon_interp_wrap_clamp.svg)0
-rw-r--r--editor/icons/InterpWrapLoop.svg (renamed from editor/icons/icon_interp_wrap_loop.svg)0
-rw-r--r--editor/icons/InterpolatedCamera.svg (renamed from editor/icons/icon_interpolated_camera.svg)0
-rw-r--r--editor/icons/InverseKinematics.svg (renamed from editor/icons/icon_inverse_kinematics.svg)0
-rw-r--r--editor/icons/Issue.svg (renamed from editor/icons/icon_issue.svg)0
-rw-r--r--editor/icons/ItemList.svg (renamed from editor/icons/icon_item_list.svg)0
-rw-r--r--editor/icons/JoyAxis.svg (renamed from editor/icons/icon_joy_axis.svg)0
-rw-r--r--editor/icons/JoyButton.svg (renamed from editor/icons/icon_joy_button.svg)0
-rw-r--r--editor/icons/Joypad.svg (renamed from editor/icons/icon_joypad.svg)0
-rw-r--r--editor/icons/Key.svg (renamed from editor/icons/icon_key.svg)0
-rw-r--r--editor/icons/KeyAnimation.svg (renamed from editor/icons/icon_key_animation.svg)0
-rw-r--r--editor/icons/KeyAudio.svg (renamed from editor/icons/icon_key_audio.svg)0
-rw-r--r--editor/icons/KeyBezier.svg (renamed from editor/icons/icon_key_bezier.svg)0
-rw-r--r--editor/icons/KeyBezierHandle.svg (renamed from editor/icons/icon_key_bezier_handle.svg)0
-rw-r--r--editor/icons/KeyBezierPoint.svg (renamed from editor/icons/icon_key_bezier_point.svg)0
-rw-r--r--editor/icons/KeyBezierSelected.svg (renamed from editor/icons/icon_key_bezier_selected.svg)0
-rw-r--r--editor/icons/KeyCall.svg (renamed from editor/icons/icon_key_call.svg)0
-rw-r--r--editor/icons/KeyHover.svg (renamed from editor/icons/icon_key_hover.svg)0
-rw-r--r--editor/icons/KeyInvalid.svg (renamed from editor/icons/icon_key_invalid.svg)0
-rw-r--r--editor/icons/KeyNext.svg (renamed from editor/icons/icon_key_next.svg)0
-rw-r--r--editor/icons/KeyPosition.svg (renamed from editor/icons/icon_key_position.svg)0
-rw-r--r--editor/icons/KeyRotation.svg (renamed from editor/icons/icon_key_rotation.svg)0
-rw-r--r--editor/icons/KeyScale.svg (renamed from editor/icons/icon_key_scale.svg)0
-rw-r--r--editor/icons/KeySelected.svg (renamed from editor/icons/icon_key_selected.svg)0
-rw-r--r--editor/icons/KeyValue.svg (renamed from editor/icons/icon_key_value.svg)0
-rw-r--r--editor/icons/KeyXform.svg (renamed from editor/icons/icon_key_xform.svg)0
-rw-r--r--editor/icons/Keyboard.svg (renamed from editor/icons/icon_keyboard.svg)0
-rw-r--r--editor/icons/KinematicBody.svg (renamed from editor/icons/icon_kinematic_body.svg)0
-rw-r--r--editor/icons/KinematicBody2D.svg (renamed from editor/icons/icon_kinematic_body_2d.svg)0
-rw-r--r--editor/icons/Label.svg (renamed from editor/icons/icon_label.svg)0
-rw-r--r--editor/icons/LargeTexture.svg (renamed from editor/icons/icon_large_texture.svg)0
-rw-r--r--editor/icons/Light2D.svg (renamed from editor/icons/icon_light_2d.svg)0
-rw-r--r--editor/icons/LightOccluder2D.svg (renamed from editor/icons/icon_light_occluder_2d.svg)0
-rw-r--r--editor/icons/Line2D.svg (renamed from editor/icons/icon_line_2d.svg)0
-rw-r--r--editor/icons/LineEdit.svg (renamed from editor/icons/icon_line_edit.svg)0
-rw-r--r--editor/icons/LineShape2D.svg (renamed from editor/icons/icon_line_shape_2d.svg)0
-rw-r--r--editor/icons/LinkButton.svg (renamed from editor/icons/icon_link_button.svg)0
-rw-r--r--editor/icons/ListSelect.svg (renamed from editor/icons/icon_list_select.svg)0
-rw-r--r--editor/icons/Listener.svg (renamed from editor/icons/icon_listener.svg)0
-rw-r--r--editor/icons/Load.svg (renamed from editor/icons/icon_load.svg)0
-rw-r--r--editor/icons/Lock.svg (renamed from editor/icons/icon_lock.svg)0
-rw-r--r--editor/icons/LockViewport.svg (renamed from editor/icons/icon_lock_viewport.svg)0
-rw-r--r--editor/icons/Logo.svg (renamed from editor/icons/icon_logo.svg)0
-rw-r--r--editor/icons/Loop.svg (renamed from editor/icons/icon_loop.svg)0
-rw-r--r--editor/icons/LoopInterpolation.svg (renamed from editor/icons/icon_loop_interpolation.svg)0
-rw-r--r--editor/icons/MainPlay.svg (renamed from editor/icons/icon_main_play.svg)0
-rw-r--r--editor/icons/MarginContainer.svg (renamed from editor/icons/icon_margin_container.svg)0
-rw-r--r--editor/icons/MatchCase.svg (renamed from editor/icons/icon_match_case.svg)0
-rw-r--r--editor/icons/MaterialPreviewCube.svg (renamed from editor/icons/icon_material_preview_cube.svg)0
-rw-r--r--editor/icons/MaterialPreviewCubeOff.svg (renamed from editor/icons/icon_material_preview_cube_off.svg)0
-rw-r--r--editor/icons/MaterialPreviewLight1.svg (renamed from editor/icons/icon_material_preview_light_1.svg)0
-rw-r--r--editor/icons/MaterialPreviewLight1Off.svg (renamed from editor/icons/icon_material_preview_light_1_off.svg)0
-rw-r--r--editor/icons/MaterialPreviewLight2.svg (renamed from editor/icons/icon_material_preview_light_2.svg)0
-rw-r--r--editor/icons/MaterialPreviewLight2Off.svg (renamed from editor/icons/icon_material_preview_light_2_off.svg)0
-rw-r--r--editor/icons/MaterialPreviewSphere.svg (renamed from editor/icons/icon_material_preview_sphere.svg)0
-rw-r--r--editor/icons/MaterialPreviewSphereOff.svg (renamed from editor/icons/icon_material_preview_sphere_off.svg)0
-rw-r--r--editor/icons/MemberConstant.svg (renamed from editor/icons/icon_member_constant.svg)0
-rw-r--r--editor/icons/MemberMethod.svg (renamed from editor/icons/icon_member_method.svg)0
-rw-r--r--editor/icons/MemberProperty.svg (renamed from editor/icons/icon_member_property.svg)0
-rw-r--r--editor/icons/MemberSignal.svg (renamed from editor/icons/icon_member_signal.svg)0
-rw-r--r--editor/icons/MemberTheme.svg (renamed from editor/icons/icon_member_theme.svg)0
-rw-r--r--editor/icons/MenuButton.svg (renamed from editor/icons/icon_menu_button.svg)0
-rw-r--r--editor/icons/Mesh.svg (renamed from editor/icons/icon_mesh.svg)0
-rw-r--r--editor/icons/MeshInstance.svg (renamed from editor/icons/icon_mesh_instance.svg)0
-rw-r--r--editor/icons/MeshInstance2D.svg (renamed from editor/icons/icon_mesh_instance_2d.svg)0
-rw-r--r--editor/icons/MeshLibrary.svg (renamed from editor/icons/icon_mesh_library.svg)0
-rw-r--r--editor/icons/MeshTexture.svg (renamed from editor/icons/icon_mesh_texture.svg)0
-rw-r--r--editor/icons/MiniObject.svg (renamed from editor/icons/icon_mini_object.svg)0
-rw-r--r--editor/icons/MirrorX.svg (renamed from editor/icons/icon_mirror_x.svg)0
-rw-r--r--editor/icons/MirrorY.svg (renamed from editor/icons/icon_mirror_y.svg)0
-rw-r--r--editor/icons/Mouse.svg (renamed from editor/icons/icon_mouse.svg)0
-rw-r--r--editor/icons/MoveDown.svg (renamed from editor/icons/icon_move_down.svg)0
-rw-r--r--editor/icons/MoveLeft.svg (renamed from editor/icons/icon_move_left.svg)0
-rw-r--r--editor/icons/MovePoint.svg (renamed from editor/icons/icon_move_point.svg)0
-rw-r--r--editor/icons/MoveRight.svg (renamed from editor/icons/icon_move_right.svg)0
-rw-r--r--editor/icons/MoveUp.svg (renamed from editor/icons/icon_move_up.svg)0
-rw-r--r--editor/icons/MultiEdit.svg (renamed from editor/icons/icon_multi_edit.svg)0
-rw-r--r--editor/icons/MultiLine.svg (renamed from editor/icons/icon_multi_line.svg)0
-rw-r--r--editor/icons/MultiMesh.svg (renamed from editor/icons/icon_multi_mesh.svg)0
-rw-r--r--editor/icons/MultiMeshInstance.svg (renamed from editor/icons/icon_multi_mesh_instance.svg)0
-rw-r--r--editor/icons/MultiMeshInstance2D.svg (renamed from editor/icons/icon_multi_mesh_instance_2d.svg)0
-rw-r--r--editor/icons/Navigation.svg (renamed from editor/icons/icon_navigation.svg)0
-rw-r--r--editor/icons/Navigation2D.svg (renamed from editor/icons/icon_navigation_2d.svg)0
-rw-r--r--editor/icons/NavigationMesh.svg (renamed from editor/icons/icon_navigation_mesh.svg)0
-rw-r--r--editor/icons/NavigationMeshInstance.svg (renamed from editor/icons/icon_navigation_mesh_instance.svg)0
-rw-r--r--editor/icons/NavigationPolygon.svg (renamed from editor/icons/icon_navigation_polygon.svg)0
-rw-r--r--editor/icons/NavigationPolygonInstance.svg (renamed from editor/icons/icon_navigation_polygon_instance.svg)0
-rw-r--r--editor/icons/New.svg (renamed from editor/icons/icon_new.svg)0
-rw-r--r--editor/icons/NewRoot.svg (renamed from editor/icons/icon_new_root.svg)0
-rw-r--r--editor/icons/Nil.svg (renamed from editor/icons/icon_nil.svg)0
-rw-r--r--editor/icons/NinePatchRect.svg (renamed from editor/icons/icon_nine_patch_rect.svg)0
-rw-r--r--editor/icons/Node.svg (renamed from editor/icons/icon_node.svg)0
-rw-r--r--editor/icons/Node2D.svg (renamed from editor/icons/icon_node_2d.svg)0
-rw-r--r--editor/icons/NodePath.svg (renamed from editor/icons/icon_node_path.svg)0
-rw-r--r--editor/icons/NodeWarning.svg (renamed from editor/icons/icon_node_warning.svg)0
-rw-r--r--editor/icons/NonFavorite.svg (renamed from editor/icons/icon_non_favorite.svg)0
-rw-r--r--editor/icons/ORMMaterial3D.svg (renamed from editor/icons/icon_o_r_m_material_3d.svg)0
-rw-r--r--editor/icons/Object.svg (renamed from editor/icons/icon_object.svg)0
-rw-r--r--editor/icons/OccluderPolygon2D.svg (renamed from editor/icons/icon_occluder_polygon_2d.svg)0
-rw-r--r--editor/icons/OmniLight.svg (renamed from editor/icons/icon_omni_light.svg)0
-rw-r--r--editor/icons/Onion.svg (renamed from editor/icons/icon_onion.svg)0
-rw-r--r--editor/icons/OptionButton.svg (renamed from editor/icons/icon_option_button.svg)0
-rw-r--r--editor/icons/OverbrightIndicator.svg (renamed from editor/icons/icon_overbright_indicator.svg)0
-rw-r--r--editor/icons/Override.svg (renamed from editor/icons/icon_override.svg)0
-rw-r--r--editor/icons/PackedByteArray.svg (renamed from editor/icons/icon_packed_byte_array.svg)0
-rw-r--r--editor/icons/PackedColorArray.svg (renamed from editor/icons/icon_packed_color_array.svg)0
-rw-r--r--editor/icons/PackedDataContainer.svg (renamed from editor/icons/icon_packed_data_container.svg)0
-rw-r--r--editor/icons/PackedFloat32Array.svg (renamed from editor/icons/icon_packed_real_array.svg)0
-rw-r--r--editor/icons/PackedFloat64Array.svg1
-rw-r--r--editor/icons/PackedInt32Array.svg (renamed from editor/icons/icon_packed_int_array.svg)0
-rw-r--r--editor/icons/PackedInt64Array.svg1
-rw-r--r--editor/icons/PackedScene.svg (renamed from editor/icons/icon_packed_scene.svg)0
-rw-r--r--editor/icons/PackedStringArray.svg (renamed from editor/icons/icon_packed_string_array.svg)0
-rw-r--r--editor/icons/PackedVector2Array.svg (renamed from editor/icons/icon_packed_vector2_array.svg)0
-rw-r--r--editor/icons/PackedVector3Array.svg (renamed from editor/icons/icon_packed_vector3_array.svg)0
-rw-r--r--editor/icons/PaintVertex.svg (renamed from editor/icons/icon_paint_vertex.svg)0
-rw-r--r--editor/icons/Panel.svg (renamed from editor/icons/icon_panel.svg)0
-rw-r--r--editor/icons/PanelContainer.svg (renamed from editor/icons/icon_panel_container.svg)0
-rw-r--r--editor/icons/Panels1.svg (renamed from editor/icons/icon_panels_1.svg)0
-rw-r--r--editor/icons/Panels2.svg (renamed from editor/icons/icon_panels_2.svg)0
-rw-r--r--editor/icons/Panels2Alt.svg (renamed from editor/icons/icon_panels_2_alt.svg)0
-rw-r--r--editor/icons/Panels3.svg (renamed from editor/icons/icon_panels_3.svg)0
-rw-r--r--editor/icons/Panels3Alt.svg (renamed from editor/icons/icon_panels_3_alt.svg)0
-rw-r--r--editor/icons/Panels4.svg (renamed from editor/icons/icon_panels_4.svg)0
-rw-r--r--editor/icons/PanoramaSky.svg (renamed from editor/icons/icon_panorama_sky.svg)0
-rw-r--r--editor/icons/ParallaxBackground.svg (renamed from editor/icons/icon_parallax_background.svg)0
-rw-r--r--editor/icons/ParallaxLayer.svg (renamed from editor/icons/icon_parallax_layer.svg)0
-rw-r--r--editor/icons/Particles.svg (renamed from editor/icons/icon_particles.svg)0
-rw-r--r--editor/icons/Particles2D.svg (renamed from editor/icons/icon_particles_2d.svg)0
-rw-r--r--editor/icons/ParticlesMaterial.svg (renamed from editor/icons/icon_particles_material.svg)0
-rw-r--r--editor/icons/Path.svg (renamed from editor/icons/icon_path.svg)0
-rw-r--r--editor/icons/Path2D.svg (renamed from editor/icons/icon_path_2d.svg)0
-rw-r--r--editor/icons/PathFollow.svg (renamed from editor/icons/icon_path_follow.svg)0
-rw-r--r--editor/icons/PathFollow2D.svg (renamed from editor/icons/icon_path_follow_2d.svg)0
-rw-r--r--editor/icons/Pause.svg (renamed from editor/icons/icon_pause.svg)0
-rw-r--r--editor/icons/PhysicalBone.svg (renamed from editor/icons/icon_physical_bone.svg)0
-rw-r--r--editor/icons/Pin.svg (renamed from editor/icons/icon_pin.svg)0
-rw-r--r--editor/icons/PinJoint.svg (renamed from editor/icons/icon_pin_joint.svg)0
-rw-r--r--editor/icons/PinJoint2D.svg (renamed from editor/icons/icon_pin_joint_2d.svg)0
-rw-r--r--editor/icons/PinPressed.svg (renamed from editor/icons/icon_pin_pressed.svg)0
-rw-r--r--editor/icons/Plane.svg (renamed from editor/icons/icon_plane.svg)0
-rw-r--r--editor/icons/PlaneMesh.svg (renamed from editor/icons/icon_plane_mesh.svg)0
-rw-r--r--editor/icons/PlaneShape.svg (renamed from editor/icons/icon_plane_shape.svg)0
-rw-r--r--editor/icons/Play.svg (renamed from editor/icons/icon_play.svg)0
-rw-r--r--editor/icons/PlayBackwards.svg (renamed from editor/icons/icon_play_backwards.svg)0
-rw-r--r--editor/icons/PlayCustom.svg (renamed from editor/icons/icon_play_custom.svg)0
-rw-r--r--editor/icons/PlayOverlay.svg (renamed from editor/icons/icon_play_overlay.svg)0
-rw-r--r--editor/icons/PlayScene.svg (renamed from editor/icons/icon_play_scene.svg)0
-rw-r--r--editor/icons/PlayStart.svg (renamed from editor/icons/icon_play_start.svg)0
-rw-r--r--editor/icons/PlayStartBackwards.svg (renamed from editor/icons/icon_play_start_backwards.svg)0
-rw-r--r--editor/icons/PlayTravel.svg (renamed from editor/icons/icon_play_travel.svg)0
-rw-r--r--editor/icons/PluginScript.svg (renamed from editor/icons/icon_plugin_script.svg)0
-rw-r--r--editor/icons/PointMesh.svg (renamed from editor/icons/icon_point_mesh.svg)0
-rw-r--r--editor/icons/Polygon2D.svg (renamed from editor/icons/icon_polygon_2_d.svg)0
-rw-r--r--editor/icons/PolygonPathFinder.svg (renamed from editor/icons/icon_polygon_path_finder.svg)0
-rw-r--r--editor/icons/Popup.svg (renamed from editor/icons/icon_popup.svg)0
-rw-r--r--editor/icons/PopupDialog.svg (renamed from editor/icons/icon_popup_dialog.svg)0
-rw-r--r--editor/icons/PopupMenu.svg (renamed from editor/icons/icon_popup_menu.svg)0
-rw-r--r--editor/icons/PopupPanel.svg (renamed from editor/icons/icon_popup_panel.svg)0
-rw-r--r--editor/icons/Portal.svg (renamed from editor/icons/icon_portal.svg)0
-rw-r--r--editor/icons/Position2D.svg (renamed from editor/icons/icon_position_2d.svg)0
-rw-r--r--editor/icons/Position3D.svg (renamed from editor/icons/icon_position_3d.svg)0
-rw-r--r--editor/icons/PrismMesh.svg (renamed from editor/icons/icon_prism_mesh.svg)0
-rw-r--r--editor/icons/ProceduralSky.svg (renamed from editor/icons/icon_procedural_sky.svg)0
-rw-r--r--editor/icons/Progress1.svg (renamed from editor/icons/icon_progress_1.svg)0
-rw-r--r--editor/icons/Progress2.svg (renamed from editor/icons/icon_progress_2.svg)0
-rw-r--r--editor/icons/Progress3.svg (renamed from editor/icons/icon_progress_3.svg)0
-rw-r--r--editor/icons/Progress4.svg (renamed from editor/icons/icon_progress_4.svg)0
-rw-r--r--editor/icons/Progress5.svg (renamed from editor/icons/icon_progress_5.svg)0
-rw-r--r--editor/icons/Progress6.svg (renamed from editor/icons/icon_progress_6.svg)0
-rw-r--r--editor/icons/Progress7.svg (renamed from editor/icons/icon_progress_7.svg)0
-rw-r--r--editor/icons/Progress8.svg (renamed from editor/icons/icon_progress_8.svg)0
-rw-r--r--editor/icons/ProgressBar.svg (renamed from editor/icons/icon_progress_bar.svg)0
-rw-r--r--editor/icons/ProjectIconLoading.svg (renamed from editor/icons/icon_project_icon_loading.svg)0
-rw-r--r--editor/icons/ProximityGroup.svg (renamed from editor/icons/icon_proximity_group.svg)0
-rw-r--r--editor/icons/ProxyTexture.svg (renamed from editor/icons/icon_proxy_texture.svg)0
-rw-r--r--editor/icons/Quad.svg (renamed from editor/icons/icon_quad.svg)0
-rw-r--r--editor/icons/QuadMesh.svg (renamed from editor/icons/icon_quad_mesh.svg)0
-rw-r--r--editor/icons/Quat.svg (renamed from editor/icons/icon_quat.svg)0
-rw-r--r--editor/icons/RID.svg (renamed from editor/icons/icon_r_i_d.svg)0
-rw-r--r--editor/icons/RayCast.svg (renamed from editor/icons/icon_ray_cast.svg)0
-rw-r--r--editor/icons/RayCast2D.svg (renamed from editor/icons/icon_ray_cast_2d.svg)0
-rw-r--r--editor/icons/RayShape.svg (renamed from editor/icons/icon_ray_shape.svg)0
-rw-r--r--editor/icons/RayShape2D.svg (renamed from editor/icons/icon_ray_shape_2d.svg)0
-rw-r--r--editor/icons/Rayito.svg (renamed from editor/icons/icon_rayito.svg)0
-rw-r--r--editor/icons/Rect2.svg (renamed from editor/icons/icon_rect2.svg)0
-rw-r--r--editor/icons/Rect2i.svg4
-rw-r--r--editor/icons/RectangleShape2D.svg (renamed from editor/icons/icon_rectangle_shape_2d.svg)0
-rw-r--r--editor/icons/ReferenceRect.svg (renamed from editor/icons/icon_reference_rect.svg)0
-rw-r--r--editor/icons/ReflectionProbe.svg (renamed from editor/icons/icon_reflection_probe.svg)0
-rw-r--r--editor/icons/RegionEdit.svg (renamed from editor/icons/icon_region_edit.svg)0
-rw-r--r--editor/icons/Reload.svg (renamed from editor/icons/icon_reload.svg)0
-rw-r--r--editor/icons/ReloadSmall.svg (renamed from editor/icons/icon_reload_small.svg)0
-rw-r--r--editor/icons/RemoteTransform.svg (renamed from editor/icons/icon_remote_transform.svg)0
-rw-r--r--editor/icons/RemoteTransform2D.svg (renamed from editor/icons/icon_remote_transform_2d.svg)0
-rw-r--r--editor/icons/Remove.svg (renamed from editor/icons/icon_remove.svg)0
-rw-r--r--editor/icons/RemoveInternal.svg (renamed from editor/icons/icon_remove_internal.svg)0
-rw-r--r--editor/icons/Rename.svg (renamed from editor/icons/icon_rename.svg)0
-rw-r--r--editor/icons/Reparent.svg (renamed from editor/icons/icon_reparent.svg)0
-rw-r--r--editor/icons/ReparentToNewNode.svg (renamed from editor/icons/icon_reparent_to_new_node.svg)0
-rw-r--r--editor/icons/ResourcePreloader.svg (renamed from editor/icons/icon_resource_preloader.svg)0
-rw-r--r--editor/icons/RichTextEffect.svg (renamed from editor/icons/icon_rich_text_effect.svg)0
-rw-r--r--editor/icons/RichTextLabel.svg (renamed from editor/icons/icon_rich_text_label.svg)0
-rw-r--r--editor/icons/RigidBody.svg (renamed from editor/icons/icon_rigid_body.svg)0
-rw-r--r--editor/icons/RigidBody2D.svg (renamed from editor/icons/icon_rigid_body_2d.svg)0
-rw-r--r--editor/icons/Room.svg (renamed from editor/icons/icon_room.svg)0
-rw-r--r--editor/icons/RoomBounds.svg (renamed from editor/icons/icon_room_bounds.svg)0
-rw-r--r--editor/icons/Rotate0.svg (renamed from editor/icons/icon_rotate_0.svg)0
-rw-r--r--editor/icons/Rotate180.svg (renamed from editor/icons/icon_rotate_180.svg)0
-rw-r--r--editor/icons/Rotate270.svg (renamed from editor/icons/icon_rotate_270.svg)0
-rw-r--r--editor/icons/Rotate90.svg (renamed from editor/icons/icon_rotate_90.svg)0
-rw-r--r--editor/icons/RotateLeft.svg (renamed from editor/icons/icon_rotate_left.svg)0
-rw-r--r--editor/icons/RotateRight.svg (renamed from editor/icons/icon_rotate_right.svg)0
-rw-r--r--editor/icons/Ruler.svg (renamed from editor/icons/icon_ruler.svg)0
-rw-r--r--editor/icons/SampleLibrary.svg (renamed from editor/icons/icon_sample_library.svg)0
-rw-r--r--editor/icons/Save.svg (renamed from editor/icons/icon_save.svg)0
-rw-r--r--editor/icons/Script.svg (renamed from editor/icons/icon_script.svg)0
-rw-r--r--editor/icons/ScriptCreate.svg (renamed from editor/icons/icon_script_create.svg)0
-rw-r--r--editor/icons/ScriptCreateDialog.svg (renamed from editor/icons/icon_script_create_dialog.svg)0
-rw-r--r--editor/icons/ScriptExtend.svg (renamed from editor/icons/icon_script_extend.svg)0
-rw-r--r--editor/icons/ScriptRemove.svg (renamed from editor/icons/icon_script_remove.svg)0
-rw-r--r--editor/icons/ScrollContainer.svg (renamed from editor/icons/icon_scroll_container.svg)0
-rw-r--r--editor/icons/Search.svg (renamed from editor/icons/icon_search.svg)0
-rw-r--r--editor/icons/SegmentShape2D.svg (renamed from editor/icons/icon_segment_shape_2d.svg)0
-rw-r--r--editor/icons/Shader.svg (renamed from editor/icons/icon_shader.svg)0
-rw-r--r--editor/icons/ShaderMaterial.svg (renamed from editor/icons/icon_shader_material.svg)0
-rw-r--r--editor/icons/ShortCut.svg (renamed from editor/icons/icon_short_cut.svg)0
-rw-r--r--editor/icons/Signal.svg (renamed from editor/icons/icon_signal.svg)0
-rw-r--r--editor/icons/Signals.svg (renamed from editor/icons/icon_signals.svg)0
-rw-r--r--editor/icons/SignalsAndGroups.svg (renamed from editor/icons/icon_signals_and_groups.svg)0
-rw-r--r--editor/icons/Skeleton.svg (renamed from editor/icons/icon_skeleton.svg)0
-rw-r--r--editor/icons/Skeleton2D.svg (renamed from editor/icons/icon_skeleton_2d.svg)0
-rw-r--r--editor/icons/SkeletonIK.svg (renamed from editor/icons/icon_skeleton_i_k.svg)0
-rw-r--r--editor/icons/SliderJoint.svg (renamed from editor/icons/icon_slider_joint.svg)0
-rw-r--r--editor/icons/Slot.svg (renamed from editor/icons/icon_slot.svg)0
-rw-r--r--editor/icons/Snap.svg (renamed from editor/icons/icon_snap.svg)0
-rw-r--r--editor/icons/SnapGrid.svg (renamed from editor/icons/icon_snap_grid.svg)0
-rw-r--r--editor/icons/SoftBody.svg (renamed from editor/icons/icon_soft_body.svg)0
-rw-r--r--editor/icons/Sort.svg (renamed from editor/icons/icon_sort.svg)0
-rw-r--r--editor/icons/Spatial.svg (renamed from editor/icons/icon_spatial.svg)0
-rw-r--r--editor/icons/SpatialMaterial.svg (renamed from editor/icons/icon_spatial_material.svg)0
-rw-r--r--editor/icons/SphereMesh.svg (renamed from editor/icons/icon_sphere_mesh.svg)0
-rw-r--r--editor/icons/SphereShape.svg (renamed from editor/icons/icon_sphere_shape.svg)0
-rw-r--r--editor/icons/SpinBox.svg (renamed from editor/icons/icon_spin_box.svg)0
-rw-r--r--editor/icons/SpotLight.svg (renamed from editor/icons/icon_spot_light.svg)0
-rw-r--r--editor/icons/SpringArm.svg (renamed from editor/icons/icon_spring_arm.svg)0
-rw-r--r--editor/icons/Sprite.svg (renamed from editor/icons/icon_sprite.svg)0
-rw-r--r--editor/icons/Sprite3D.svg (renamed from editor/icons/icon_sprite_3d.svg)0
-rw-r--r--editor/icons/SpriteFrames.svg (renamed from editor/icons/icon_sprite_frames.svg)0
-rw-r--r--editor/icons/SpriteSheet.svg (renamed from editor/icons/icon_sprite_sheet.svg)0
-rw-r--r--editor/icons/StandardMaterial3D.svg (renamed from editor/icons/icon_standard_material_3d.svg)0
-rw-r--r--editor/icons/StaticBody.svg (renamed from editor/icons/icon_static_body.svg)0
-rw-r--r--editor/icons/StaticBody2D.svg (renamed from editor/icons/icon_static_body_2d.svg)0
-rw-r--r--editor/icons/StatusError.svg (renamed from editor/icons/icon_status_error.svg)0
-rw-r--r--editor/icons/StatusSuccess.svg (renamed from editor/icons/icon_status_success.svg)0
-rw-r--r--editor/icons/StatusWarning.svg (renamed from editor/icons/icon_status_warning.svg)0
-rw-r--r--editor/icons/Stop.svg (renamed from editor/icons/icon_stop.svg)0
-rw-r--r--editor/icons/StreamTexture.svg (renamed from editor/icons/icon_stream_texture.svg)0
-rw-r--r--editor/icons/String.svg (renamed from editor/icons/icon_string.svg)0
-rw-r--r--editor/icons/StringName.svg4
-rw-r--r--editor/icons/StyleBoxEmpty.svg (renamed from editor/icons/icon_style_box_empty.svg)0
-rw-r--r--editor/icons/StyleBoxFlat.svg (renamed from editor/icons/icon_style_box_flat.svg)0
-rw-r--r--editor/icons/StyleBoxLine.svg (renamed from editor/icons/icon_style_box_line.svg)0
-rw-r--r--editor/icons/StyleBoxTexture.svg (renamed from editor/icons/icon_style_box_texture.svg)0
-rw-r--r--editor/icons/TabContainer.svg (renamed from editor/icons/icon_tab_container.svg)0
-rw-r--r--editor/icons/Tabs.svg (renamed from editor/icons/icon_tabs.svg)0
-rw-r--r--editor/icons/TestCube.svg (renamed from editor/icons/icon_test_cube.svg)0
-rw-r--r--editor/icons/TextEdit.svg (renamed from editor/icons/icon_text_edit.svg)0
-rw-r--r--editor/icons/TextFile.svg (renamed from editor/icons/icon_text_file.svg)0
-rw-r--r--editor/icons/Texture3D.svg (renamed from editor/icons/icon_texture_3_d.svg)0
-rw-r--r--editor/icons/TextureArray.svg (renamed from editor/icons/icon_texture_array.svg)0
-rw-r--r--editor/icons/TextureButton.svg (renamed from editor/icons/icon_texture_button.svg)0
-rw-r--r--editor/icons/TextureProgress.svg (renamed from editor/icons/icon_texture_progress.svg)0
-rw-r--r--editor/icons/TextureRect.svg (renamed from editor/icons/icon_texture_rect.svg)0
-rw-r--r--editor/icons/Theme.svg (renamed from editor/icons/icon_theme.svg)0
-rw-r--r--editor/icons/ThumbnailWait.svg (renamed from editor/icons/icon_thumbnail_wait.svg)0
-rw-r--r--editor/icons/TileMap.svg (renamed from editor/icons/icon_tile_map.svg)0
-rw-r--r--editor/icons/TileSet.svg (renamed from editor/icons/icon_tile_set.svg)0
-rw-r--r--editor/icons/Time.svg (renamed from editor/icons/icon_time.svg)0
-rw-r--r--editor/icons/TimelineIndicator.svg (renamed from editor/icons/icon_timeline_indicator.svg)0
-rw-r--r--editor/icons/Timer.svg (renamed from editor/icons/icon_timer.svg)0
-rw-r--r--editor/icons/ToolAddNode.svg (renamed from editor/icons/icon_tool_add_node.svg)0
-rw-r--r--editor/icons/ToolButton.svg (renamed from editor/icons/icon_tool_button.svg)0
-rw-r--r--editor/icons/ToolConnect.svg (renamed from editor/icons/icon_tool_connect.svg)0
-rw-r--r--editor/icons/ToolMove.svg (renamed from editor/icons/icon_tool_move.svg)0
-rw-r--r--editor/icons/ToolPan.svg (renamed from editor/icons/icon_tool_pan.svg)0
-rw-r--r--editor/icons/ToolRotate.svg (renamed from editor/icons/icon_tool_rotate.svg)0
-rw-r--r--editor/icons/ToolScale.svg (renamed from editor/icons/icon_tool_scale.svg)0
-rw-r--r--editor/icons/ToolSelect.svg (renamed from editor/icons/icon_tool_select.svg)0
-rw-r--r--editor/icons/ToolTriangle.svg (renamed from editor/icons/icon_tool_triangle.svg)0
-rw-r--r--editor/icons/Tools.svg (renamed from editor/icons/icon_tools.svg)0
-rw-r--r--editor/icons/TouchScreenButton.svg (renamed from editor/icons/icon_touch_screen_button.svg)0
-rw-r--r--editor/icons/TrackAddKey.svg (renamed from editor/icons/icon_track_add_key.svg)0
-rw-r--r--editor/icons/TrackAddKeyHl.svg (renamed from editor/icons/icon_track_add_key_hl.svg)0
-rw-r--r--editor/icons/TrackCapture.svg (renamed from editor/icons/icon_track_capture.svg)0
-rw-r--r--editor/icons/TrackColor.svg (renamed from editor/icons/icon_track_color.svg)0
-rw-r--r--editor/icons/TrackContinuous.svg (renamed from editor/icons/icon_track_continuous.svg)0
-rw-r--r--editor/icons/TrackDiscrete.svg (renamed from editor/icons/icon_track_discrete.svg)0
-rw-r--r--editor/icons/TrackTrigger.svg (renamed from editor/icons/icon_track_trigger.svg)0
-rw-r--r--editor/icons/Transform.svg (renamed from editor/icons/icon_transform.svg)0
-rw-r--r--editor/icons/Transform2D.svg (renamed from editor/icons/icon_transform_2_D.svg)0
-rw-r--r--editor/icons/TransitionEnd.svg (renamed from editor/icons/icon_transition_end.svg)0
-rw-r--r--editor/icons/TransitionEndAuto.svg (renamed from editor/icons/icon_transition_end_auto.svg)0
-rw-r--r--editor/icons/TransitionEndAutoBig.svg (renamed from editor/icons/icon_transition_end_auto_big.svg)0
-rw-r--r--editor/icons/TransitionEndBig.svg (renamed from editor/icons/icon_transition_end_big.svg)0
-rw-r--r--editor/icons/TransitionImmediate.svg (renamed from editor/icons/icon_transition_immediate.svg)0
-rw-r--r--editor/icons/TransitionImmediateAuto.svg (renamed from editor/icons/icon_transition_immediate_auto.svg)0
-rw-r--r--editor/icons/TransitionImmediateAutoBig.svg (renamed from editor/icons/icon_transition_immediate_auto_big.svg)0
-rw-r--r--editor/icons/TransitionImmediateBig.svg (renamed from editor/icons/icon_transition_immediate_big.svg)0
-rw-r--r--editor/icons/TransitionSync.svg (renamed from editor/icons/icon_transition_sync.svg)0
-rw-r--r--editor/icons/TransitionSyncAuto.svg (renamed from editor/icons/icon_transition_sync_auto.svg)0
-rw-r--r--editor/icons/TransitionSyncAutoBig.svg (renamed from editor/icons/icon_transition_sync_auto_big.svg)0
-rw-r--r--editor/icons/TransitionSyncBig.svg (renamed from editor/icons/icon_transition_sync_big.svg)0
-rw-r--r--editor/icons/Translation.svg (renamed from editor/icons/icon_translation.svg)0
-rw-r--r--editor/icons/Transpose.svg (renamed from editor/icons/icon_transpose.svg)0
-rw-r--r--editor/icons/Tree.svg (renamed from editor/icons/icon_tree.svg)0
-rw-r--r--editor/icons/Tween.svg (renamed from editor/icons/icon_tween.svg)0
-rw-r--r--editor/icons/Unbone.svg (renamed from editor/icons/icon_unbone.svg)0
-rw-r--r--editor/icons/Ungroup.svg (renamed from editor/icons/icon_ungroup.svg)0
-rw-r--r--editor/icons/Unlock.svg (renamed from editor/icons/icon_unlock.svg)0
-rw-r--r--editor/icons/UnpaintVertex.svg (renamed from editor/icons/icon_unpaint_vertex.svg)0
-rw-r--r--editor/icons/Uv.svg (renamed from editor/icons/icon_uv.svg)0
-rw-r--r--editor/icons/VBoxContainer.svg (renamed from editor/icons/icon_v_box_container.svg)0
-rw-r--r--editor/icons/VScrollBar.svg (renamed from editor/icons/icon_v_scroll_bar.svg)0
-rw-r--r--editor/icons/VSeparator.svg (renamed from editor/icons/icon_v_separator.svg)0
-rw-r--r--editor/icons/VSlider.svg (renamed from editor/icons/icon_v_slider.svg)0
-rw-r--r--editor/icons/VSplitContainer.svg (renamed from editor/icons/icon_v_split_container.svg)0
-rw-r--r--editor/icons/Variant.svg (renamed from editor/icons/icon_variant.svg)0
-rw-r--r--editor/icons/Vector2.svg (renamed from editor/icons/icon_vector2.svg)0
-rw-r--r--editor/icons/Vector2i.svg5
-rw-r--r--editor/icons/Vector3.svg (renamed from editor/icons/icon_vector3.svg)0
-rw-r--r--editor/icons/Vector3i.svg5
-rw-r--r--editor/icons/VehicleBody.svg (renamed from editor/icons/icon_vehicle_body.svg)0
-rw-r--r--editor/icons/VehicleWheel.svg (renamed from editor/icons/icon_vehicle_wheel.svg)0
-rw-r--r--editor/icons/VideoPlayer.svg (renamed from editor/icons/icon_video_player.svg)0
-rw-r--r--editor/icons/Viewport.svg (renamed from editor/icons/icon_viewport.svg)0
-rw-r--r--editor/icons/ViewportContainer.svg (renamed from editor/icons/icon_viewport_container.svg)0
-rw-r--r--editor/icons/ViewportSpeed.svg (renamed from editor/icons/icon_viewport_speed.svg)0
-rw-r--r--editor/icons/ViewportTexture.svg (renamed from editor/icons/icon_viewport_texture.svg)0
-rw-r--r--editor/icons/ViewportZoom.svg (renamed from editor/icons/icon_viewport_zoom.svg)0
-rw-r--r--editor/icons/VisibilityEnabler.svg (renamed from editor/icons/icon_visibility_enabler.svg)0
-rw-r--r--editor/icons/VisibilityEnabler2D.svg (renamed from editor/icons/icon_visibility_enabler_2d.svg)0
-rw-r--r--editor/icons/VisibilityNotifier.svg (renamed from editor/icons/icon_visibility_notifier.svg)0
-rw-r--r--editor/icons/VisibilityNotifier2D.svg (renamed from editor/icons/icon_visibility_notifier_2d.svg)0
-rw-r--r--editor/icons/VisualShader.svg (renamed from editor/icons/icon_visual_shader.svg)0
-rw-r--r--editor/icons/VisualShaderPort.svg (renamed from editor/icons/icon_visual_shader_port.svg)0
-rw-r--r--editor/icons/Warning.svg (renamed from editor/icons/icon_warning.svg)0
-rw-r--r--editor/icons/WindowDialog.svg (renamed from editor/icons/icon_window_dialog.svg)0
-rw-r--r--editor/icons/World.svg (renamed from editor/icons/icon_world.svg)0
-rw-r--r--editor/icons/World2D.svg (renamed from editor/icons/icon_world_2d.svg)0
-rw-r--r--editor/icons/WorldEnvironment.svg (renamed from editor/icons/icon_world_environment.svg)0
-rw-r--r--editor/icons/X509Certificate.svg (renamed from editor/icons/icon_x509_certificate.svg)0
-rw-r--r--editor/icons/YSort.svg (renamed from editor/icons/icon_y_sort.svg)0
-rw-r--r--editor/icons/Zoom.svg (renamed from editor/icons/icon_zoom.svg)0
-rw-r--r--editor/icons/ZoomLess.svg (renamed from editor/icons/icon_zoom_less.svg)0
-rw-r--r--editor/icons/ZoomMore.svg (renamed from editor/icons/icon_zoom_more.svg)0
-rw-r--r--editor/icons/ZoomReset.svg (renamed from editor/icons/icon_zoom_reset.svg)0
-rw-r--r--editor/icons/bool.svg (renamed from editor/icons/icon_bool.svg)0
-rw-r--r--editor/icons/editor_icons_builders.py10
-rw-r--r--editor/icons/float.svg (renamed from editor/icons/icon_float.svg)0
-rw-r--r--editor/icons/int.svg (renamed from editor/icons/icon_int.svg)0
-rw-r--r--editor/import/editor_import_plugin.cpp2
-rw-r--r--editor/import/resource_importer_bitmask.cpp2
-rw-r--r--editor/import/resource_importer_scene.cpp12
-rw-r--r--editor/import/resource_importer_texture.cpp4
-rw-r--r--editor/import/resource_importer_texture_atlas.cpp8
-rw-r--r--editor/import/resource_importer_wav.cpp2
-rw-r--r--editor/inspector_dock.cpp6
-rw-r--r--editor/inspector_dock.h6
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp13
-rw-r--r--editor/plugins/animation_player_editor_plugin.h1
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp8
-rw-r--r--editor/plugins/cpu_particles_editor_plugin.cpp7
-rw-r--r--editor/plugins/cpu_particles_editor_plugin.h1
-rw-r--r--editor/plugins/mesh_instance_editor_plugin.cpp2
-rw-r--r--editor/plugins/particles_editor_plugin.cpp26
-rw-r--r--editor/plugins/particles_editor_plugin.h2
-rw-r--r--editor/plugins/script_editor_plugin.cpp6
-rw-r--r--editor/plugins/script_text_editor.cpp6
-rw-r--r--editor/plugins/spatial_editor_plugin.cpp2
-rw-r--r--editor/plugins/sprite_editor_plugin.cpp2
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.cpp2
-rw-r--r--editor/plugins/tile_map_editor_plugin.cpp2
-rw-r--r--editor/plugins/tile_set_editor_plugin.cpp2
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp288
-rw-r--r--editor/plugins/visual_shader_editor_plugin.h17
-rw-r--r--editor/property_editor.cpp26
-rw-r--r--editor/property_selector.cpp4
-rw-r--r--editor/quick_open.cpp2
-rw-r--r--editor/spatial_editor_gizmos.cpp44
-rw-r--r--main/main.cpp8
-rw-r--r--main/tests/test_gdscript.cpp2
-rw-r--r--methods.py24
-rw-r--r--modules/assimp/editor_scene_importer_assimp.cpp2
-rw-r--r--modules/bullet/shape_bullet.cpp8
-rw-r--r--modules/bullet/shape_bullet.h2
-rw-r--r--modules/bullet/space_bullet.cpp3
-rw-r--r--modules/csg/csg_shape.cpp24
-rw-r--r--modules/gdnative/gdnative/variant.cpp12
-rw-r--r--modules/gdnative/include/gdnative/pool_arrays.h4
-rw-r--r--modules/gdnative/include/gdnative/variant.h14
-rw-r--r--modules/gdnavigation/gd_navigation_server.cpp23
-rw-r--r--modules/gdnavigation/gd_navigation_server.h4
-rw-r--r--modules/gdnavigation/nav_map.cpp7
-rw-r--r--modules/gdscript/gdscript_editor.cpp12
-rw-r--r--modules/gdscript/gdscript_functions.cpp204
-rw-r--r--modules/gdscript/gdscript_parser.cpp68
-rw-r--r--modules/gdscript/gdscript_tokenizer.cpp14
-rw-r--r--modules/gdscript/language_server/gdscript_language_protocol.cpp4
-rw-r--r--modules/gdscript/language_server/gdscript_language_protocol.h2
-rw-r--r--modules/gdscript/language_server/gdscript_workspace.cpp49
-rw-r--r--modules/gdscript/language_server/gdscript_workspace.h5
-rw-r--r--modules/gridmap/grid_map.cpp2
-rw-r--r--modules/mobile_vr/mobile_vr_interface.cpp14
-rw-r--r--modules/mono/csharp_script.cpp6
-rw-r--r--modules/mono/editor/bindings_generator.cpp22
-rw-r--r--modules/mono/mono_gd/gd_mono_field.cpp14
-rw-r--r--modules/mono/mono_gd/gd_mono_marshal.cpp38
-rw-r--r--modules/mono/mono_gd/gd_mono_marshal.h12
-rw-r--r--modules/opensimplex/noise_texture.cpp2
-rw-r--r--modules/opensimplex/open_simplex_noise.cpp6
-rw-r--r--modules/stb_vorbis/audio_stream_ogg_vorbis.cpp2
-rw-r--r--modules/stb_vorbis/resource_importer_ogg_vorbis.cpp2
-rw-r--r--modules/visual_script/visual_script_builtin_funcs.cpp102
-rw-r--r--modules/visual_script/visual_script_editor.cpp42
-rw-r--r--modules/visual_script/visual_script_nodes.cpp2
-rw-r--r--modules/visual_script/visual_script_property_selector.cpp10
-rw-r--r--modules/visual_script/visual_script_yield_nodes.cpp2
-rw-r--r--platform/android/api/java_class_wrapper.h14
-rw-r--r--platform/android/export/export.cpp2
-rw-r--r--platform/android/java_class_wrapper.cpp2
-rw-r--r--platform/android/java_godot_lib_jni.cpp31
-rw-r--r--platform/iphone/game_center.mm4
-rw-r--r--platform/iphone/in_app_store.mm2
-rw-r--r--platform/javascript/javascript_eval.cpp4
-rw-r--r--platform/windows/os_windows.cpp4
-rw-r--r--platform/x11/detect.py16
-rw-r--r--scene/2d/animated_sprite.cpp4
-rw-r--r--scene/2d/area_2d.cpp8
-rw-r--r--scene/2d/audio_stream_player_2d.cpp8
-rw-r--r--scene/2d/camera_2d.cpp14
-rw-r--r--scene/2d/collision_polygon_2d.cpp2
-rw-r--r--scene/2d/collision_shape_2d.cpp2
-rw-r--r--scene/2d/cpu_particles_2d.cpp64
-rw-r--r--scene/2d/joints_2d.cpp16
-rw-r--r--scene/2d/light_2d.cpp8
-rw-r--r--scene/2d/line_2d.cpp4
-rw-r--r--scene/2d/navigation_2d.cpp8
-rw-r--r--scene/2d/navigation_2d.h1
-rw-r--r--scene/2d/navigation_agent_2d.cpp12
-rw-r--r--scene/2d/node_2d.cpp8
-rw-r--r--scene/2d/particles_2d.cpp10
-rw-r--r--scene/2d/path_2d.cpp10
-rw-r--r--scene/2d/physics_body_2d.cpp20
-rw-r--r--scene/2d/polygon_2d.cpp8
-rw-r--r--scene/2d/position_2d.cpp2
-rw-r--r--scene/2d/skeleton_2d.cpp2
-rw-r--r--scene/2d/sprite.cpp2
-rw-r--r--scene/2d/tile_map.cpp4
-rw-r--r--scene/3d/area.cpp12
-rw-r--r--scene/3d/arvr_nodes.cpp4
-rw-r--r--scene/3d/audio_stream_player_3d.cpp42
-rw-r--r--scene/3d/baked_lightmap.cpp12
-rw-r--r--scene/3d/camera.cpp14
-rw-r--r--scene/3d/collision_polygon.cpp2
-rw-r--r--scene/3d/cpu_particles.cpp66
-rw-r--r--scene/3d/gi_probe.cpp14
-rw-r--r--scene/3d/interpolated_camera.cpp2
-rw-r--r--scene/3d/light.cpp36
-rw-r--r--scene/3d/mesh_instance.cpp2
-rw-r--r--scene/3d/navigation.cpp4
-rw-r--r--scene/3d/navigation_agent.cpp14
-rw-r--r--scene/3d/particles.cpp10
-rw-r--r--scene/3d/path.cpp8
-rw-r--r--scene/3d/physics_body.cpp102
-rw-r--r--scene/3d/physics_joint.cpp210
-rw-r--r--scene/3d/reflection_probe.cpp8
-rw-r--r--scene/3d/soft_body.cpp18
-rw-r--r--scene/3d/spring_arm.cpp4
-rw-r--r--scene/3d/sprite_3d.cpp4
-rw-r--r--scene/3d/vehicle_body.cpp30
-rw-r--r--scene/3d/visual_instance.cpp2
-rw-r--r--scene/animation/animation_blend_space_1d.cpp10
-rw-r--r--scene/animation/animation_blend_space_2d.cpp4
-rw-r--r--scene/animation/animation_blend_tree.cpp34
-rw-r--r--scene/animation/animation_node_state_machine.cpp2
-rw-r--r--scene/animation/animation_player.cpp8
-rw-r--r--scene/animation/animation_tree.cpp2
-rw-r--r--scene/animation/root_motion_view.cpp4
-rw-r--r--scene/animation/skeleton_ik.cpp4
-rw-r--r--scene/animation/tween.cpp163
-rw-r--r--scene/audio/audio_stream_player.cpp4
-rw-r--r--scene/debugger/scene_debugger.cpp14
-rw-r--r--scene/gui/button.cpp2
-rw-r--r--scene/gui/control.cpp12
-rw-r--r--scene/gui/graph_edit.cpp2
-rw-r--r--scene/gui/item_list.cpp2
-rw-r--r--scene/gui/label.cpp2
-rw-r--r--scene/gui/line_edit.cpp39
-rw-r--r--scene/gui/popup_menu.cpp2
-rw-r--r--scene/gui/range.cpp14
-rw-r--r--scene/gui/rich_text_effect.cpp2
-rw-r--r--scene/gui/rich_text_label.cpp2
-rw-r--r--scene/gui/scroll_bar.cpp2
-rw-r--r--scene/gui/text_edit.cpp60
-rw-r--r--scene/gui/texture_progress.cpp4
-rw-r--r--scene/gui/tree.cpp2
-rw-r--r--scene/gui/video_player.cpp6
-rw-r--r--scene/main/canvas_layer.cpp6
-rw-r--r--scene/main/node.cpp4
-rw-r--r--scene/main/scene_tree.cpp2
-rwxr-xr-xscene/main/timer.cpp4
-rw-r--r--scene/main/viewport.cpp2
-rw-r--r--scene/register_scene_types.cpp16
-rw-r--r--scene/resources/animation.cpp10
-rw-r--r--scene/resources/capsule_shape.cpp26
-rw-r--r--scene/resources/capsule_shape_2d.cpp4
-rw-r--r--scene/resources/circle_shape_2d.cpp2
-rw-r--r--scene/resources/curve.cpp16
-rw-r--r--scene/resources/curve.h4
-rw-r--r--scene/resources/cylinder_shape.cpp4
-rw-r--r--scene/resources/environment.cpp86
-rw-r--r--scene/resources/font.cpp8
-rw-r--r--scene/resources/gradient.cpp2
-rw-r--r--scene/resources/height_map_shape.cpp6
-rw-r--r--scene/resources/height_map_shape.h6
-rw-r--r--scene/resources/line_shape_2d.cpp2
-rw-r--r--scene/resources/material.cpp44
-rw-r--r--scene/resources/multimesh.cpp2
-rw-r--r--scene/resources/navigation_mesh.cpp26
-rw-r--r--scene/resources/packed_scene.cpp2
-rw-r--r--scene/resources/particles_material.cpp58
-rw-r--r--scene/resources/physics_material.cpp4
-rw-r--r--scene/resources/primitive_meshes.cpp54
-rw-r--r--scene/resources/ray_shape.cpp2
-rw-r--r--scene/resources/segment_shape_2d.cpp2
-rw-r--r--scene/resources/shape.cpp2
-rw-r--r--scene/resources/shape_2d.cpp2
-rw-r--r--scene/resources/sky.cpp20
-rw-r--r--scene/resources/sphere_shape.cpp2
-rw-r--r--scene/resources/style_box.cpp36
-rw-r--r--scene/resources/texture.cpp4
-rw-r--r--scene/resources/tile_set.cpp2
-rw-r--r--scene/resources/visual_shader.cpp99
-rw-r--r--scene/resources/visual_shader.h10
-rw-r--r--scene/resources/visual_shader_nodes.cpp551
-rw-r--r--scene/resources/visual_shader_nodes.h202
-rw-r--r--scene/resources/world.cpp4
-rw-r--r--scene/resources/world_2d.cpp4
-rw-r--r--servers/arvr/arvr_positional_tracker.cpp2
-rw-r--r--servers/arvr_server.cpp2
-rw-r--r--servers/audio/audio_stream.cpp2
-rw-r--r--servers/audio/effects/audio_effect_amplify.cpp2
-rw-r--r--servers/audio/effects/audio_effect_chorus.cpp60
-rw-r--r--servers/audio/effects/audio_effect_compressor.cpp12
-rw-r--r--servers/audio/effects/audio_effect_delay.cpp20
-rw-r--r--servers/audio/effects/audio_effect_distortion.cpp8
-rw-r--r--servers/audio/effects/audio_effect_eq.cpp2
-rw-r--r--servers/audio/effects/audio_effect_filter.cpp6
-rw-r--r--servers/audio/effects/audio_effect_limiter.cpp8
-rw-r--r--servers/audio/effects/audio_effect_panner.cpp2
-rw-r--r--servers/audio/effects/audio_effect_phaser.cpp10
-rw-r--r--servers/audio/effects/audio_effect_pitch_shift.cpp4
-rw-r--r--servers/audio/effects/audio_effect_reverb.cpp16
-rw-r--r--servers/audio/effects/audio_effect_spectrum_analyzer.cpp4
-rw-r--r--servers/audio/effects/audio_effect_stereo_enhance.cpp6
-rw-r--r--servers/audio/effects/audio_stream_generator.cpp4
-rw-r--r--servers/audio_server.cpp8
-rw-r--r--servers/navigation_server.cpp2
-rw-r--r--servers/navigation_server.h8
-rw-r--r--servers/physics/space_sw.cpp2
-rw-r--r--servers/physics_2d/shape_2d_sw.cpp4
-rw-r--r--servers/physics_2d/space_2d_sw.cpp2
-rw-r--r--servers/physics_2d_server.cpp14
-rw-r--r--servers/physics_server.cpp10
-rw-r--r--servers/visual/rasterizer.h2
-rw-r--r--servers/visual/rasterizer_rd/rasterizer_scene_high_end_rd.cpp10
-rw-r--r--servers/visual/shader_language.cpp4
-rw-r--r--servers/visual_server.cpp12
992 files changed, 5431 insertions, 2793 deletions
diff --git a/.travis.yml b/.travis.yml
index 503214bab9..80191423c1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -125,7 +125,7 @@ before_install:
install:
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
- pyenv global 3.7.5 system;
+ pyenv global 3.8 system;
pip3 install --user scons;
fi
- scons --version
diff --git a/SConstruct b/SConstruct
index 0c0e7ed681..f2c20ea91e 100644
--- a/SConstruct
+++ b/SConstruct
@@ -332,6 +332,44 @@ if selected_platform in platform_list:
# We apply it to CCFLAGS (both C and C++ code) in case it impacts C features.
env.Prepend(CCFLAGS=['/std:c++17', '/permissive-'])
+ # Enforce our minimal compiler version requirements
+ cc_version = methods.get_compiler_version(env) or [-1, -1]
+ cc_version_major = cc_version[0]
+ cc_version_minor = cc_version[1]
+
+ if methods.using_gcc(env):
+ # GCC 8 before 8.4 has a regression in the support of guaranteed copy elision
+ # which causes a build failure: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86521
+ if cc_version_major == 8 and cc_version_minor < 4:
+ print("Detected GCC 8 version < 8.4, which is not supported due to a "
+ "regression in its C++17 guaranteed copy elision support. Use a "
+ "newer GCC version, or Clang 6 or later by passing \"use_llvm=yes\" "
+ "to the SCons command line.")
+ sys.exit(255)
+ elif cc_version_major < 7:
+ print("Detected GCC version older than 7, which does not fully support "
+ "C++17. Supported versions are GCC 7, 9 and later. Use a newer GCC "
+ "version, or Clang 6 or later by passing \"use_llvm=yes\" to the "
+ "SCons command line.")
+ sys.exit(255)
+ elif methods.using_clang(env):
+ # Apple LLVM versions differ from upstream LLVM version \o/, compare
+ # in https://en.wikipedia.org/wiki/Xcode#Toolchain_versions
+ if env["platform"] == "osx" or env["platform"] == "iphone":
+ vanilla = methods.is_vanilla_clang(env)
+ if vanilla and cc_version_major < 6:
+ print("Detected Clang version older than 6, which does not fully support "
+ "C++17. Supported versions are Clang 6 and later.")
+ sys.exit(255)
+ elif not vanilla and cc_version_major < 10:
+ print("Detected Apple Clang version older than 10, which does not fully "
+ "support C++17. Supported versions are Apple Clang 10 and later.")
+ sys.exit(255)
+ elif cc_version_major < 6:
+ print("Detected Clang version older than 6, which does not fully support "
+ "C++17. Supported versions are Clang 6 and later.")
+ sys.exit(255)
+
# Configure compiler warnings
if env.msvc:
# Truncations, narrowing conversions, signed/unsigned comparisons...
@@ -355,13 +393,10 @@ if selected_platform in platform_list:
all_plus_warnings = ['-Wwrite-strings']
if methods.using_gcc(env):
- version = methods.get_compiler_version(env)
- if version != None and version[0] >= '7':
+ if cc_version_major >= 7:
shadow_local_warning = ['-Wshadow-local']
if (env["warnings"] == 'extra'):
- # Note: enable -Wimplicit-fallthrough for Clang (already part of -Wextra for GCC)
- # once we switch to C++11 or later (necessary for our FALLTHROUGH macro).
env.Append(CCFLAGS=['-Wall', '-Wextra', '-Wno-unused-parameter']
+ all_plus_warnings + shadow_local_warning)
env.Append(CXXFLAGS=['-Wctor-dtor-privacy', '-Wnon-virtual-dtor'])
@@ -371,9 +406,10 @@ if selected_platform in platform_list:
'-Wstringop-overflow=4', '-Wlogical-op'])
# -Wnoexcept was removed temporarily due to GH-36325.
env.Append(CXXFLAGS=['-Wplacement-new=1'])
- version = methods.get_compiler_version(env)
- if version != None and version[0] >= '9':
+ if cc_version_major >= 9:
env.Append(CCFLAGS=['-Wattribute-alias=2'])
+ if methods.using_clang(env):
+ env.Append(CCFLAGS=['-Wimplicit-fallthrough'])
elif (env["warnings"] == 'all'):
env.Append(CCFLAGS=['-Wall'] + shadow_local_warning)
elif (env["warnings"] == 'moderate'):
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index f5a351f16a..c1cf061854 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -3101,8 +3101,8 @@ void _Engine::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "editor_hint"), "set_editor_hint", "is_editor_hint");
ADD_PROPERTY(PropertyInfo(Variant::INT, "iterations_per_second"), "set_iterations_per_second", "get_iterations_per_second");
ADD_PROPERTY(PropertyInfo(Variant::INT, "target_fps"), "set_target_fps", "get_target_fps");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "time_scale"), "set_time_scale", "get_time_scale");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "physics_jitter_fix"), "set_physics_jitter_fix", "get_physics_jitter_fix");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_scale"), "set_time_scale", "get_time_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "physics_jitter_fix"), "set_physics_jitter_fix", "get_physics_jitter_fix");
}
_Engine *_Engine::singleton = NULL;
diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h
index 342c43802e..ae569ea189 100644
--- a/core/bind/core_bind.h
+++ b/core/bind/core_bind.h
@@ -581,9 +581,9 @@ private:
bool _list_skip_hidden;
};
-class _Marshalls : public Reference {
+class _Marshalls : public Object {
- GDCLASS(_Marshalls, Reference);
+ GDCLASS(_Marshalls, Object);
static _Marshalls *singleton;
diff --git a/core/callable_method_pointer.h b/core/callable_method_pointer.h
index fed793dfca..a931a344e6 100644
--- a/core/callable_method_pointer.h
+++ b/core/callable_method_pointer.h
@@ -134,7 +134,7 @@ void call_with_variant_args_helper(T *p_instance, void (T::*p_method)(P...), con
#ifdef DEBUG_METHODS_ENABLED
(p_instance->*p_method)(VariantCasterAndValidate<P>::cast(p_args, Is, r_error)...);
#else
- (p_instance->*p_method)(VariantCaster<P...>::cast(p_args[Is])...);
+ (p_instance->*p_method)(VariantCaster<P>::cast(p_args[Is])...);
#endif
}
@@ -201,6 +201,15 @@ Callable create_custom_callable_function_pointer(T *p_instance,
// VERSION WITH RETURN
+// GCC 8 raises "parameter 'p_args' set but not used" here, probably using a
+// template version that does not have arguments and thus sees it unused, but
+// obviously the template can be used for functions with and without them, and
+// the optimizer will get rid of it anyway.
+#if defined(DEBUG_METHODS_ENABLED) && defined(__GNUC__) && !defined(__clang__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
+#endif
+
template <class T, class R, class... P, size_t... Is>
void call_with_variant_args_ret_helper(T *p_instance, R (T::*p_method)(P...), const Variant **p_args, Variant &r_ret, Callable::CallError &r_error, IndexSequence<Is...>) {
r_error.error = Callable::CallError::CALL_OK;
@@ -208,10 +217,14 @@ void call_with_variant_args_ret_helper(T *p_instance, R (T::*p_method)(P...), co
#ifdef DEBUG_METHODS_ENABLED
r_ret = (p_instance->*p_method)(VariantCasterAndValidate<P>::cast(p_args, Is, r_error)...);
#else
- (p_instance->*p_method)(VariantCaster<P...>::cast(p_args[Is])...);
+ (p_instance->*p_method)(VariantCaster<P>::cast(p_args[Is])...);
#endif
}
+#if defined(DEBUG_METHODS_ENABLED) && defined(__GNUC__) && !defined(__clang__)
+#pragma GCC diagnostic pop
+#endif
+
template <class T, class R, class... P>
void call_with_variant_args_ret(T *p_instance, R (T::*p_method)(P...), const Variant **p_args, int p_argcount, Variant &r_ret, Callable::CallError &r_error) {
#ifdef DEBUG_METHODS_ENABLED
diff --git a/core/compressed_translation.cpp b/core/compressed_translation.cpp
index ea84ded3b4..ed307fd3ac 100644
--- a/core/compressed_translation.cpp
+++ b/core/compressed_translation.cpp
@@ -279,8 +279,8 @@ StringName PHashTranslation::get_message(const StringName &p_src_text) const {
void PHashTranslation::_get_property_list(List<PropertyInfo> *p_list) const {
- p_list->push_back(PropertyInfo(Variant::PACKED_INT_ARRAY, "hash_table"));
- p_list->push_back(PropertyInfo(Variant::PACKED_INT_ARRAY, "bucket_table"));
+ p_list->push_back(PropertyInfo(Variant::PACKED_INT32_ARRAY, "hash_table"));
+ p_list->push_back(PropertyInfo(Variant::PACKED_INT32_ARRAY, "bucket_table"));
p_list->push_back(PropertyInfo(Variant::PACKED_BYTE_ARRAY, "strings"));
p_list->push_back(PropertyInfo(Variant::OBJECT, "load_from", PROPERTY_HINT_RESOURCE_TYPE, "Translation", PROPERTY_USAGE_EDITOR));
}
diff --git a/core/global_constants.cpp b/core/global_constants.cpp
index 3de36dcb9d..0945240c1f 100644
--- a/core/global_constants.cpp
+++ b/core/global_constants.cpp
@@ -92,9 +92,6 @@ VARIANT_ENUM_CAST(JoystickList);
VARIANT_ENUM_CAST(MidiMessageList);
void register_global_constants() {
-
- //{ KEY_BACKSPACE, VK_BACK },// (0x08) // backspace
-
BIND_GLOBAL_ENUM_CONSTANT(MARGIN_LEFT);
BIND_GLOBAL_ENUM_CONSTANT(MARGIN_TOP);
BIND_GLOBAL_ENUM_CONSTANT(MARGIN_RIGHT);
@@ -116,7 +113,7 @@ void register_global_constants() {
BIND_GLOBAL_ENUM_CONSTANT(VALIGN_CENTER);
BIND_GLOBAL_ENUM_CONSTANT(VALIGN_BOTTOM);
- // hueg list of keys
+ // huge list of keys
BIND_GLOBAL_CONSTANT(SPKEY);
BIND_GLOBAL_ENUM_CONSTANT(KEY_ESCAPE);
@@ -594,31 +591,36 @@ void register_global_constants() {
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_NIL", Variant::NIL);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_BOOL", Variant::BOOL);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_INT", Variant::INT);
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_REAL", Variant::REAL);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_REAL", Variant::FLOAT);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_STRING", Variant::STRING);
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR2", Variant::VECTOR2); // 5
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR2", Variant::VECTOR2);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR2I", Variant::VECTOR2I);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_RECT2", Variant::RECT2);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_RECT2I", Variant::RECT2I);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR3", Variant::VECTOR3);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR3I", Variant::VECTOR3I);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_TRANSFORM2D", Variant::TRANSFORM2D);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_PLANE", Variant::PLANE);
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_QUAT", Variant::QUAT); // 10
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_QUAT", Variant::QUAT);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_AABB", Variant::AABB);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_BASIS", Variant::BASIS);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_TRANSFORM", Variant::TRANSFORM);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_COLOR", Variant::COLOR);
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_STRING_NAME", Variant::STRING_NAME); // 15
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_NODE_PATH", Variant::NODE_PATH); // 15
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_STRING_NAME", Variant::STRING_NAME);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_NODE_PATH", Variant::NODE_PATH);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_RID", Variant::_RID);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_OBJECT", Variant::OBJECT);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_CALLABLE", Variant::CALLABLE);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_SIGNAL", Variant::SIGNAL);
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_DICTIONARY", Variant::DICTIONARY); // 20
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_DICTIONARY", Variant::DICTIONARY);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_ARRAY", Variant::ARRAY);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_RAW_ARRAY", Variant::PACKED_BYTE_ARRAY);
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_INT_ARRAY", Variant::PACKED_INT_ARRAY);
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_REAL_ARRAY", Variant::PACKED_REAL_ARRAY);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_INT32_ARRAY", Variant::PACKED_INT32_ARRAY);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_INT64_ARRAY", Variant::PACKED_INT64_ARRAY);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_FLOAT32_ARRAY", Variant::PACKED_FLOAT32_ARRAY);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_FLOAT64_ARRAY", Variant::PACKED_FLOAT64_ARRAY);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_STRING_ARRAY", Variant::PACKED_STRING_ARRAY);
- BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR2_ARRAY", Variant::PACKED_VECTOR2_ARRAY); // 25
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR2_ARRAY", Variant::PACKED_VECTOR2_ARRAY);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR3_ARRAY", Variant::PACKED_VECTOR3_ARRAY);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_COLOR_ARRAY", Variant::PACKED_COLOR_ARRAY);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_MAX", Variant::VARIANT_MAX);
diff --git a/core/io/json.cpp b/core/io/json.cpp
index 08a147032f..3a0edceb81 100644
--- a/core/io/json.cpp
+++ b/core/io/json.cpp
@@ -70,9 +70,11 @@ String JSON::_print_var(const Variant &p_var, const String &p_indent, int p_cur_
case Variant::NIL: return "null";
case Variant::BOOL: return p_var.operator bool() ? "true" : "false";
case Variant::INT: return itos(p_var);
- case Variant::REAL: return rtos(p_var);
- case Variant::PACKED_INT_ARRAY:
- case Variant::PACKED_REAL_ARRAY:
+ case Variant::FLOAT: return rtos(p_var);
+ case Variant::PACKED_INT32_ARRAY:
+ case Variant::PACKED_INT64_ARRAY:
+ case Variant::PACKED_FLOAT32_ARRAY:
+ case Variant::PACKED_FLOAT64_ARRAY:
case Variant::PACKED_STRING_ARRAY:
case Variant::ARRAY: {
diff --git a/core/io/marshalls.cpp b/core/io/marshalls.cpp
index e97c26e05d..fbcaa582b7 100644
--- a/core/io/marshalls.cpp
+++ b/core/io/marshalls.cpp
@@ -147,7 +147,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
}
} break;
- case Variant::REAL: {
+ case Variant::FLOAT: {
if (type & ENCODE_FLAG_64) {
ERR_FAIL_COND_V(len < 8, ERR_INVALID_DATA);
@@ -186,7 +186,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
if (r_len)
(*r_len) += 4 * 2;
- } break; // 5
+ } break;
case Variant::VECTOR2I: {
ERR_FAIL_COND_V(len < 4 * 2, ERR_INVALID_DATA);
@@ -198,7 +198,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
if (r_len)
(*r_len) += 4 * 2;
- } break; // 5
+ } break;
case Variant::RECT2: {
ERR_FAIL_COND_V(len < 4 * 4, ERR_INVALID_DATA);
@@ -621,7 +621,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
}
} break;
- case Variant::PACKED_INT_ARRAY: {
+ case Variant::PACKED_INT32_ARRAY: {
ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA);
int32_t count = decode_uint32(buf);
@@ -630,12 +630,12 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
ERR_FAIL_MUL_OF(count, 4, ERR_INVALID_DATA);
ERR_FAIL_COND_V(count < 0 || count * 4 > len, ERR_INVALID_DATA);
- Vector<int> data;
+ Vector<int32_t> data;
if (count) {
//const int*rbuf=(const int*)buf;
data.resize(count);
- int *w = data.ptrw();
+ int32_t *w = data.ptrw();
for (int32_t i = 0; i < count; i++) {
w[i] = decode_uint32(&buf[i * 4]);
@@ -643,11 +643,37 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
}
r_variant = Variant(data);
if (r_len) {
- (*r_len) += 4 + count * sizeof(int);
+ (*r_len) += 4 + count * sizeof(int32_t);
}
} break;
- case Variant::PACKED_REAL_ARRAY: {
+ case Variant::PACKED_INT64_ARRAY: {
+
+ ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA);
+ int64_t count = decode_uint64(buf);
+ buf += 4;
+ len -= 4;
+ ERR_FAIL_MUL_OF(count, 8, ERR_INVALID_DATA);
+ ERR_FAIL_COND_V(count < 0 || count * 8 > len, ERR_INVALID_DATA);
+
+ Vector<int64_t> data;
+
+ if (count) {
+ //const int*rbuf=(const int*)buf;
+ data.resize(count);
+ int64_t *w = data.ptrw();
+ for (int64_t i = 0; i < count; i++) {
+
+ w[i] = decode_uint64(&buf[i * 8]);
+ }
+ }
+ r_variant = Variant(data);
+ if (r_len) {
+ (*r_len) += 4 + count * sizeof(int64_t);
+ }
+
+ } break;
+ case Variant::PACKED_FLOAT32_ARRAY: {
ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA);
int32_t count = decode_uint32(buf);
@@ -674,6 +700,33 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
}
} break;
+ case Variant::PACKED_FLOAT64_ARRAY: {
+
+ ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA);
+ int64_t count = decode_uint64(buf);
+ buf += 4;
+ len -= 4;
+ ERR_FAIL_MUL_OF(count, 8, ERR_INVALID_DATA);
+ ERR_FAIL_COND_V(count < 0 || count * 8 > len, ERR_INVALID_DATA);
+
+ Vector<double> data;
+
+ if (count) {
+ //const double*rbuf=(const double*)buf;
+ data.resize(count);
+ double *w = data.ptrw();
+ for (int64_t i = 0; i < count; i++) {
+
+ w[i] = decode_double(&buf[i * 8]);
+ }
+ }
+ r_variant = data;
+
+ if (r_len) {
+ (*r_len) += 4 + count * sizeof(double);
+ }
+
+ } break;
case Variant::PACKED_STRING_ARRAY: {
ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA);
@@ -851,7 +904,7 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
flags |= ENCODE_FLAG_64;
}
} break;
- case Variant::REAL: {
+ case Variant::FLOAT: {
double d = p_variant;
float f = d;
@@ -918,7 +971,7 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
r_len += 4;
}
} break;
- case Variant::REAL: {
+ case Variant::FLOAT: {
if (flags & ENCODE_FLAG_64) {
if (buf) {
@@ -1005,7 +1058,7 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
r_len += 2 * 4;
- } break; // 5
+ } break;
case Variant::VECTOR2I: {
if (buf) {
@@ -1016,7 +1069,7 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
r_len += 2 * 4;
- } break; // 5
+ } break;
case Variant::RECT2: {
if (buf) {
@@ -1333,33 +1386,50 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
}
} break;
- case Variant::PACKED_INT_ARRAY: {
+ case Variant::PACKED_INT32_ARRAY: {
- Vector<int> data = p_variant;
+ Vector<int32_t> data = p_variant;
int datalen = data.size();
int datasize = sizeof(int32_t);
if (buf) {
encode_uint32(datalen, buf);
buf += 4;
- const int *r = data.ptr();
- for (int i = 0; i < datalen; i++)
+ const int32_t *r = data.ptr();
+ for (int32_t i = 0; i < datalen; i++)
encode_uint32(r[i], &buf[i * datasize]);
}
r_len += 4 + datalen * datasize;
} break;
- case Variant::PACKED_REAL_ARRAY: {
+ case Variant::PACKED_INT64_ARRAY: {
+
+ Vector<int64_t> data = p_variant;
+ int datalen = data.size();
+ int datasize = sizeof(int64_t);
+
+ if (buf) {
+ encode_uint64(datalen, buf);
+ buf += 4;
+ const int64_t *r = data.ptr();
+ for (int64_t i = 0; i < datalen; i++)
+ encode_uint64(r[i], &buf[i * datasize]);
+ }
+
+ r_len += 4 + datalen * datasize;
+
+ } break;
+ case Variant::PACKED_FLOAT32_ARRAY: {
- Vector<real_t> data = p_variant;
+ Vector<float> data = p_variant;
int datalen = data.size();
- int datasize = sizeof(real_t);
+ int datasize = sizeof(float);
if (buf) {
encode_uint32(datalen, buf);
buf += 4;
- const real_t *r = data.ptr();
+ const float *r = data.ptr();
for (int i = 0; i < datalen; i++)
encode_float(r[i], &buf[i * datasize]);
}
@@ -1367,6 +1437,23 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
r_len += 4 + datalen * datasize;
} break;
+ case Variant::PACKED_FLOAT64_ARRAY: {
+
+ Vector<double> data = p_variant;
+ int datalen = data.size();
+ int datasize = sizeof(double);
+
+ if (buf) {
+ encode_uint32(datalen, buf);
+ buf += 4;
+ const double *r = data.ptr();
+ for (int i = 0; i < datalen; i++)
+ encode_double(r[i], &buf[i * datasize]);
+ }
+
+ r_len += 4 + datalen * datasize;
+
+ } break;
case Variant::PACKED_STRING_ARRAY: {
Vector<String> data = p_variant;
diff --git a/core/io/multiplayer_api.cpp b/core/io/multiplayer_api.cpp
index 1fcd00c0e4..2aef0a3274 100644
--- a/core/io/multiplayer_api.cpp
+++ b/core/io/multiplayer_api.cpp
@@ -34,6 +34,10 @@
#include "scene/main/node.h"
#include <stdint.h>
+#define NODE_ID_COMPRESSION_SHIFT 3
+#define NAME_ID_COMPRESSION_SHIFT 5
+#define BYTE_ONLY_OR_NO_ARGS_SHIFT 6
+
#ifdef DEBUG_ENABLED
#include "core/os/os.h"
#endif
@@ -51,7 +55,7 @@ _FORCE_INLINE_ bool _should_call_local(MultiplayerAPI::RPCMode mode, bool is_mas
case MultiplayerAPI::RPC_MODE_MASTERSYNC: {
if (is_master)
r_skip_rpc = true; // I am the master, so skip remote call.
- FALLTHROUGH;
+ [[fallthrough]];
}
case MultiplayerAPI::RPC_MODE_REMOTESYNC:
case MultiplayerAPI::RPC_MODE_PUPPETSYNC: {
@@ -168,6 +172,16 @@ Ref<NetworkedMultiplayerPeer> MultiplayerAPI::get_network_peer() const {
return network_peer;
}
+// Returns the packet size stripping the node path added when the node is not yet cached.
+int get_packet_len(uint32_t p_node_target, int p_packet_len) {
+ if (p_node_target & 0x80000000) {
+ int ofs = p_node_target & 0x7FFFFFFF;
+ return p_packet_len - (p_packet_len - ofs);
+ } else {
+ return p_packet_len;
+ }
+}
+
void MultiplayerAPI::_process_packet(int p_from, const uint8_t *p_packet, int p_packet_len) {
ERR_FAIL_COND_MSG(root_node == NULL, "Multiplayer root node was not initialized. If you are using custom multiplayer, remember to set the root node via MultiplayerAPI.set_root_node before using it.");
@@ -204,8 +218,8 @@ void MultiplayerAPI::_process_packet(int p_from, const uint8_t *p_packet, int p_
int name_id_offset = 1;
ERR_FAIL_COND_MSG(p_packet_len < packet_min_size, "Invalid packet received. Size too small.");
// Compute the meta size, which depends on the compression level.
- int node_id_compression = (p_packet[0] & 24) >> 3;
- int name_id_compression = (p_packet[0] & 32) >> 5;
+ int node_id_compression = (p_packet[0] & 24) >> NODE_ID_COMPRESSION_SHIFT;
+ int name_id_compression = (p_packet[0] & 32) >> NAME_ID_COMPRESSION_SHIFT;
switch (node_id_compression) {
case NETWORK_NODE_ID_COMPRESSION_8:
@@ -250,6 +264,7 @@ void MultiplayerAPI::_process_packet(int p_from, const uint8_t *p_packet, int p_
// Unreachable, checked before.
CRASH_NOW();
}
+
Node *node = _process_get_node(p_from, p_packet, node_target, p_packet_len);
ERR_FAIL_COND_MSG(node == NULL, "Invalid packet received. Requested node was not found.");
@@ -266,13 +281,14 @@ void MultiplayerAPI::_process_packet(int p_from, const uint8_t *p_packet, int p_
CRASH_NOW();
}
+ const int packet_len = get_packet_len(node_target, p_packet_len);
if (packet_type == NETWORK_COMMAND_REMOTE_CALL) {
- _process_rpc(node, name_id, p_from, p_packet, p_packet_len, packet_min_size);
+ _process_rpc(node, name_id, p_from, p_packet, packet_len, packet_min_size);
} else {
- _process_rset(node, name_id, p_from, p_packet, p_packet_len, packet_min_size);
+ _process_rset(node, name_id, p_from, p_packet, packet_len, packet_min_size);
}
} break;
@@ -326,7 +342,7 @@ Node *MultiplayerAPI::_process_get_node(int p_from, const uint8_t *p_packet, uin
void MultiplayerAPI::_process_rpc(Node *p_node, const uint16_t p_rpc_method_id, int p_from, const uint8_t *p_packet, int p_packet_len, int p_offset) {
- ERR_FAIL_COND_MSG(p_offset >= p_packet_len, "Invalid packet received. Size too small.");
+ ERR_FAIL_COND_MSG(p_offset > p_packet_len, "Invalid packet received. Size too small.");
// Check that remote can call the RPC on this node.
StringName name = p_node->get_node_rpc_method(p_rpc_method_id);
@@ -340,14 +356,30 @@ void MultiplayerAPI::_process_rpc(Node *p_node, const uint16_t p_rpc_method_id,
bool can_call = _can_call_mode(p_node, rpc_mode, p_from);
ERR_FAIL_COND_MSG(!can_call, "RPC '" + String(name) + "' is not allowed on node " + p_node->get_path() + " from: " + itos(p_from) + ". Mode is " + itos((int)rpc_mode) + ", master is " + itos(p_node->get_network_master()) + ".");
- int argc = p_packet[p_offset];
+ int argc = 0;
+ bool byte_only = false;
+
+ const bool byte_only_or_no_args = ((p_packet[0] & 64) >> BYTE_ONLY_OR_NO_ARGS_SHIFT) == 1;
+ if (byte_only_or_no_args) {
+ if (p_offset < p_packet_len) {
+ // This packet contains only bytes.
+ argc = 1;
+ byte_only = true;
+ } else {
+ // This rpc calls a method without parameters.
+ }
+ } else {
+ // Normal variant, takes the argument count from the packet.
+ ERR_FAIL_COND_MSG(p_offset >= p_packet_len, "Invalid packet received. Size too small.");
+ argc = p_packet[p_offset];
+ p_offset += 1;
+ }
+
Vector<Variant> args;
Vector<const Variant *> argp;
args.resize(argc);
argp.resize(argc);
- p_offset++;
-
#ifdef DEBUG_ENABLED
if (profiling) {
ObjectID id = p_node->get_instance_id();
@@ -356,16 +388,26 @@ void MultiplayerAPI::_process_rpc(Node *p_node, const uint16_t p_rpc_method_id,
}
#endif
- for (int i = 0; i < argc; i++) {
+ if (byte_only) {
+ Vector<uint8_t> pure_data;
+ const int len = p_packet_len - p_offset;
+ pure_data.resize(len);
+ memcpy(pure_data.ptrw(), &p_packet[p_offset], len);
+ args.write[0] = pure_data;
+ argp.write[0] = &args[0];
+ p_offset += len;
+ } else {
+ for (int i = 0; i < argc; i++) {
- ERR_FAIL_COND_MSG(p_offset >= p_packet_len, "Invalid packet received. Size too small.");
+ ERR_FAIL_COND_MSG(p_offset >= p_packet_len, "Invalid packet received. Size too small.");
- int vlen;
- Error err = _decode_and_decompress_variant(args.write[i], &p_packet[p_offset], p_packet_len - p_offset, &vlen);
- ERR_FAIL_COND_MSG(err != OK, "Invalid packet received. Unable to decode RPC argument.");
+ int vlen;
+ Error err = _decode_and_decompress_variant(args.write[i], &p_packet[p_offset], p_packet_len - p_offset, &vlen);
+ ERR_FAIL_COND_MSG(err != OK, "Invalid packet received. Unable to decode RPC argument.");
- argp.write[i] = &args[i];
- p_offset += vlen;
+ argp.write[i] = &args[i];
+ p_offset += vlen;
+ }
}
Callable::CallError ce;
@@ -742,10 +784,12 @@ void MultiplayerAPI::_send_rpc(Node *p_from, int p_to, bool p_unreliable, bool p
// - `NetworkCommands` in the first three bits.
// - `NetworkNodeIdCompression` in the next 2 bits.
// - `NetworkNameIdCompression` in the next 1 bit.
- // - So we still have the last two bits free!
+ // - `byte_only_or_no_args` in the next 1 bit.
+ // - So we still have the last bit free!
uint8_t command_type = p_set ? NETWORK_COMMAND_REMOTE_SET : NETWORK_COMMAND_REMOTE_CALL;
uint8_t node_id_compression = UINT8_MAX;
uint8_t name_id_compression = UINT8_MAX;
+ bool byte_only_or_no_args = false;
MAKE_ROOM(1);
// The meta is composed along the way, so just set 0 for now.
@@ -835,17 +879,28 @@ void MultiplayerAPI::_send_rpc(Node *p_from, int p_to, bool p_unreliable, bool p
ofs += 2;
}
- // Call arguments.
- MAKE_ROOM(ofs + 1);
- packet_cache.write[ofs] = p_argcount;
- ofs += 1;
- for (int i = 0; i < p_argcount; i++) {
- int len(0);
- Error err = _encode_and_compress_variant(*p_arg[i], NULL, len);
- ERR_FAIL_COND_MSG(err != OK, "Unable to encode RPC argument. THIS IS LIKELY A BUG IN THE ENGINE!");
- MAKE_ROOM(ofs + len);
- _encode_and_compress_variant(*p_arg[i], &(packet_cache.write[ofs]), len);
- ofs += len;
+ if (p_argcount == 0) {
+ byte_only_or_no_args = true;
+ } else if (p_argcount == 1 && p_arg[0]->get_type() == Variant::PACKED_BYTE_ARRAY) {
+ byte_only_or_no_args = true;
+ // Special optimization when only the byte vector is sent.
+ const Vector<uint8_t> data = *p_arg[0];
+ MAKE_ROOM(ofs + data.size());
+ copymem(&(packet_cache.write[ofs]), data.ptr(), sizeof(uint8_t) * data.size());
+ ofs += data.size();
+ } else {
+ // Arguments
+ MAKE_ROOM(ofs + 1);
+ packet_cache.write[ofs] = p_argcount;
+ ofs += 1;
+ for (int i = 0; i < p_argcount; i++) {
+ int len(0);
+ Error err = _encode_and_compress_variant(*p_arg[i], NULL, len);
+ ERR_FAIL_COND_MSG(err != OK, "Unable to encode RPC argument. THIS IS LIKELY A BUG IN THE ENGINE!");
+ MAKE_ROOM(ofs + len);
+ _encode_and_compress_variant(*p_arg[i], &(packet_cache.write[ofs]), len);
+ ofs += len;
+ }
}
}
@@ -854,7 +909,7 @@ void MultiplayerAPI::_send_rpc(Node *p_from, int p_to, bool p_unreliable, bool p
ERR_FAIL_COND(name_id_compression > 1);
// We can now set the meta
- packet_cache.write[0] = command_type + (node_id_compression << 3) + (name_id_compression << 5);
+ packet_cache.write[0] = command_type + (node_id_compression << NODE_ID_COMPRESSION_SHIFT) + (name_id_compression << NAME_ID_COMPRESSION_SHIFT) + ((byte_only_or_no_args ? 1 : 0) << BYTE_ONLY_OR_NO_ARGS_SHIFT);
#ifdef DEBUG_ENABLED
if (profiling) {
diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp
index 518323c5c4..8c343a0f43 100644
--- a/core/io/resource_format_binary.cpp
+++ b/core/io/resource_format_binary.cpp
@@ -46,7 +46,7 @@ enum {
VARIANT_NIL = 1,
VARIANT_BOOL = 2,
VARIANT_INT = 3,
- VARIANT_REAL = 4,
+ VARIANT_FLOAT = 4,
VARIANT_STRING = 5,
VARIANT_VECTOR2 = 10,
VARIANT_RECT2 = 11,
@@ -65,8 +65,8 @@ enum {
VARIANT_DICTIONARY = 26,
VARIANT_ARRAY = 30,
VARIANT_RAW_ARRAY = 31,
- VARIANT_INT_ARRAY = 32,
- VARIANT_REAL_ARRAY = 33,
+ VARIANT_INT32_ARRAY = 32,
+ VARIANT_FLOAT32_ARRAY = 33,
VARIANT_STRING_ARRAY = 34,
VARIANT_VECTOR3_ARRAY = 35,
VARIANT_COLOR_ARRAY = 36,
@@ -79,6 +79,8 @@ enum {
VARIANT_VECTOR2I = 45,
VARIANT_RECT2I = 46,
VARIANT_VECTOR3I = 47,
+ VARIANT_INT64_ARRAY = 48,
+ VARIANT_FLOAT64_ARRAY = 49,
OBJECT_EMPTY = 0,
OBJECT_EXTERNAL_RESOURCE = 1,
OBJECT_INTERNAL_RESOURCE = 2,
@@ -142,7 +144,7 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
r_v = int64_t(f->get_64());
} break;
- case VARIANT_REAL: {
+ case VARIANT_FLOAT: {
r_v = f->get_real();
} break;
@@ -452,14 +454,14 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
r_v = array;
} break;
- case VARIANT_INT_ARRAY: {
+ case VARIANT_INT32_ARRAY: {
uint32_t len = f->get_32();
- Vector<int> array;
+ Vector<int32_t> array;
array.resize(len);
- int *w = array.ptrw();
- f->get_buffer((uint8_t *)w, len * 4);
+ int32_t *w = array.ptrw();
+ f->get_buffer((uint8_t *)w, len * sizeof(int32_t));
#ifdef BIG_ENDIAN_ENABLED
{
uint32_t *ptr = (uint32_t *)w.ptr();
@@ -473,14 +475,35 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
r_v = array;
} break;
- case VARIANT_REAL_ARRAY: {
+ case VARIANT_INT64_ARRAY: {
uint32_t len = f->get_32();
- Vector<real_t> array;
+ Vector<int64_t> array;
array.resize(len);
- real_t *w = array.ptrw();
- f->get_buffer((uint8_t *)w, len * sizeof(real_t));
+ int64_t *w = array.ptrw();
+ f->get_buffer((uint8_t *)w, len * sizeof(int64_t));
+#ifdef BIG_ENDIAN_ENABLED
+ {
+ uint64_t *ptr = (uint64_t *)w.ptr();
+ for (int i = 0; i < len; i++) {
+
+ ptr[i] = BSWAP64(ptr[i]);
+ }
+ }
+
+#endif
+
+ r_v = array;
+ } break;
+ case VARIANT_FLOAT32_ARRAY: {
+
+ uint32_t len = f->get_32();
+
+ Vector<float> array;
+ array.resize(len);
+ float *w = array.ptrw();
+ f->get_buffer((uint8_t *)w, len * sizeof(float));
#ifdef BIG_ENDIAN_ENABLED
{
uint32_t *ptr = (uint32_t *)w.ptr();
@@ -494,6 +517,27 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
r_v = array;
} break;
+ case VARIANT_FLOAT64_ARRAY: {
+
+ uint32_t len = f->get_32();
+
+ Vector<double> array;
+ array.resize(len);
+ double *w = array.ptrw();
+ f->get_buffer((uint8_t *)w, len * sizeof(double));
+#ifdef BIG_ENDIAN_ENABLED
+ {
+ uint64_t *ptr = (uint64_t *)w.ptr();
+ for (int i = 0; i < len; i++) {
+
+ ptr[i] = BSWAP64(ptr[i]);
+ }
+ }
+
+#endif
+
+ r_v = array;
+ } break;
case VARIANT_STRING_ARRAY: {
uint32_t len = f->get_32();
@@ -1293,7 +1337,7 @@ void ResourceFormatSaverBinaryInstance::write_variant(FileAccess *f, const Varia
}
} break;
- case Variant::REAL: {
+ case Variant::FLOAT: {
double d = p_property;
float fl = d;
@@ -1302,7 +1346,7 @@ void ResourceFormatSaverBinaryInstance::write_variant(FileAccess *f, const Varia
f->store_double(d);
} else {
- f->store_32(VARIANT_REAL);
+ f->store_32(VARIANT_FLOAT);
f->store_real(fl);
}
@@ -1573,29 +1617,52 @@ void ResourceFormatSaverBinaryInstance::write_variant(FileAccess *f, const Varia
_pad_buffer(f, len);
} break;
- case Variant::PACKED_INT_ARRAY: {
+ case Variant::PACKED_INT32_ARRAY: {
- f->store_32(VARIANT_INT_ARRAY);
- Vector<int> arr = p_property;
+ f->store_32(VARIANT_INT32_ARRAY);
+ Vector<int32_t> arr = p_property;
int len = arr.size();
f->store_32(len);
- const int *r = arr.ptr();
+ const int32_t *r = arr.ptr();
for (int i = 0; i < len; i++)
f->store_32(r[i]);
} break;
- case Variant::PACKED_REAL_ARRAY: {
+ case Variant::PACKED_INT64_ARRAY: {
- f->store_32(VARIANT_REAL_ARRAY);
- Vector<real_t> arr = p_property;
+ f->store_32(VARIANT_INT64_ARRAY);
+ Vector<int64_t> arr = p_property;
int len = arr.size();
f->store_32(len);
- const real_t *r = arr.ptr();
+ const int64_t *r = arr.ptr();
+ for (int i = 0; i < len; i++)
+ f->store_64(r[i]);
+
+ } break;
+ case Variant::PACKED_FLOAT32_ARRAY: {
+
+ f->store_32(VARIANT_FLOAT32_ARRAY);
+ Vector<float> arr = p_property;
+ int len = arr.size();
+ f->store_32(len);
+ const float *r = arr.ptr();
for (int i = 0; i < len; i++) {
f->store_real(r[i]);
}
} break;
+ case Variant::PACKED_FLOAT64_ARRAY: {
+
+ f->store_32(VARIANT_FLOAT64_ARRAY);
+ Vector<double> arr = p_property;
+ int len = arr.size();
+ f->store_32(len);
+ const double *r = arr.ptr();
+ for (int i = 0; i < len; i++) {
+ f->store_double(r[i]);
+ }
+
+ } break;
case Variant::PACKED_STRING_ARRAY: {
f->store_32(VARIANT_STRING_ARRAY);
diff --git a/core/math/a_star.cpp b/core/math/a_star.cpp
index b26903e45a..847d4d8681 100644
--- a/core/math/a_star.cpp
+++ b/core/math/a_star.cpp
@@ -576,8 +576,8 @@ void AStar::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_point_path", "from_id", "to_id"), &AStar::get_point_path);
ClassDB::bind_method(D_METHOD("get_id_path", "from_id", "to_id"), &AStar::get_id_path);
- BIND_VMETHOD(MethodInfo(Variant::REAL, "_estimate_cost", PropertyInfo(Variant::INT, "from_id"), PropertyInfo(Variant::INT, "to_id")));
- BIND_VMETHOD(MethodInfo(Variant::REAL, "_compute_cost", PropertyInfo(Variant::INT, "from_id"), PropertyInfo(Variant::INT, "to_id")));
+ BIND_VMETHOD(MethodInfo(Variant::FLOAT, "_estimate_cost", PropertyInfo(Variant::INT, "from_id"), PropertyInfo(Variant::INT, "to_id")));
+ BIND_VMETHOD(MethodInfo(Variant::FLOAT, "_compute_cost", PropertyInfo(Variant::INT, "from_id"), PropertyInfo(Variant::INT, "to_id")));
}
AStar::AStar() {
diff --git a/core/math/expression.cpp b/core/math/expression.cpp
index 1130935567..058673b681 100644
--- a/core/math/expression.cpp
+++ b/core/math/expression.cpp
@@ -212,7 +212,7 @@ int Expression::get_func_argument_count(BuiltinFunc p_func) {
if (!p_inputs[m_arg]->is_num()) { \
r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; \
r_error.argument = m_arg; \
- r_error.expected = Variant::REAL; \
+ r_error.expected = Variant::FLOAT; \
return; \
}
@@ -314,7 +314,7 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant
int64_t i = *p_inputs[0];
*r_return = ABS(i);
- } else if (p_inputs[0]->get_type() == Variant::REAL) {
+ } else if (p_inputs[0]->get_type() == Variant::FLOAT) {
real_t r = *p_inputs[0];
*r_return = Math::abs(r);
@@ -322,7 +322,7 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant
r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
- r_error.expected = Variant::REAL;
+ r_error.expected = Variant::FLOAT;
}
} break;
case MATH_SIGN: {
@@ -331,7 +331,7 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant
int64_t i = *p_inputs[0];
*r_return = i < 0 ? -1 : (i > 0 ? +1 : 0);
- } else if (p_inputs[0]->get_type() == Variant::REAL) {
+ } else if (p_inputs[0]->get_type() == Variant::FLOAT) {
real_t r = *p_inputs[0];
*r_return = r < 0.0 ? -1.0 : (r > 0.0 ? +1.0 : 0.0);
@@ -339,7 +339,7 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant
r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
- r_error.expected = Variant::REAL;
+ r_error.expected = Variant::FLOAT;
}
} break;
case MATH_POW: {
@@ -1161,7 +1161,7 @@ Error Expression::_get_token(Token &r_token) {
if (is_float)
r_token.value = num.to_double();
else
- r_token.value = num.to_int();
+ r_token.value = num.to_int64();
return OK;
} else if ((cchar >= 'A' && cchar <= 'Z') || (cchar >= 'a' && cchar <= 'z') || cchar == '_') {
diff --git a/core/method_ptrcall.h b/core/method_ptrcall.h
index 7e21c2cc24..3db186ca69 100644
--- a/core/method_ptrcall.h
+++ b/core/method_ptrcall.h
@@ -133,8 +133,10 @@ MAKE_PTRARG(Callable);
MAKE_PTRARG(Signal);
MAKE_PTRARG(Array);
MAKE_PTRARG(PackedByteArray);
-MAKE_PTRARG(PackedIntArray);
-MAKE_PTRARG(PackedRealArray);
+MAKE_PTRARG(PackedInt32Array);
+MAKE_PTRARG(PackedInt64Array);
+MAKE_PTRARG(PackedFloat32Array);
+MAKE_PTRARG(PackedFloat64Array);
MAKE_PTRARG(PackedStringArray);
MAKE_PTRARG(PackedVector2Array);
MAKE_PTRARG(PackedVector3Array);
diff --git a/core/object.cpp b/core/object.cpp
index a61c4ae392..140ee811fe 100644
--- a/core/object.cpp
+++ b/core/object.cpp
@@ -1405,6 +1405,9 @@ Error Object::connect(const StringName &p_signal, const Callable &p_callable, co
ERR_FAIL_COND_V(p_callable.is_null(), ERR_INVALID_PARAMETER);
+ Object *target_object = p_callable.get_object();
+ ERR_FAIL_COND_V(!target_object, ERR_INVALID_PARAMETER);
+
SignalData *s = signal_map.getptr(p_signal);
if (!s) {
bool signal_is_valid = ClassDB::has_signal(get_class_name(), p_signal);
@@ -1449,7 +1452,7 @@ Error Object::connect(const StringName &p_signal, const Callable &p_callable, co
conn.flags = p_flags;
conn.binds = p_binds;
slot.conn = conn;
- slot.cE = p_callable.get_object()->connections.push_back(conn);
+ slot.cE = target_object->connections.push_back(conn);
if (p_flags & CONNECT_REFERENCE_COUNTED) {
slot.reference_count = 1;
}
@@ -1498,6 +1501,10 @@ void Object::disconnect(const StringName &p_signal, const Callable &p_callable)
void Object::_disconnect(const StringName &p_signal, const Callable &p_callable, bool p_force) {
ERR_FAIL_COND(p_callable.is_null());
+
+ Object *target_object = p_callable.get_object();
+ ERR_FAIL_COND(!target_object);
+
SignalData *s = signal_map.getptr(p_signal);
ERR_FAIL_COND_MSG(!s, vformat("Nonexistent signal '%s' in %s.", p_signal, to_string()));
@@ -1511,9 +1518,8 @@ void Object::_disconnect(const StringName &p_signal, const Callable &p_callable,
return;
}
}
- Object *object = p_callable.get_object();
- ERR_FAIL_COND(!object);
- object->connections.erase(slot->cE);
+
+ target_object->connections.erase(slot->cE);
s->slot_map.erase(p_callable);
if (s->slot_map.empty() && ClassDB::has_signal(get_class_name(), p_signal)) {
diff --git a/core/os/input_event.cpp b/core/os/input_event.cpp
index 7d1ae872f4..3cb9c2c1c2 100644
--- a/core/os/input_event.cpp
+++ b/core/os/input_event.cpp
@@ -541,7 +541,7 @@ void InputEventMouseButton::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_doubleclick", "doubleclick"), &InputEventMouseButton::set_doubleclick);
ClassDB::bind_method(D_METHOD("is_doubleclick"), &InputEventMouseButton::is_doubleclick);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "factor"), "set_factor", "get_factor");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "factor"), "set_factor", "get_factor");
ADD_PROPERTY(PropertyInfo(Variant::INT, "button_index"), "set_button_index", "get_button_index");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "pressed"), "set_pressed", "is_pressed");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "doubleclick"), "set_doubleclick", "is_doubleclick");
@@ -702,7 +702,7 @@ void InputEventMouseMotion::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_speed"), &InputEventMouseMotion::get_speed);
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "tilt"), "set_tilt", "get_tilt");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "pressure"), "set_pressure", "get_pressure");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pressure"), "set_pressure", "get_pressure");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "relative"), "set_relative", "get_relative");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "speed"), "set_speed", "get_speed");
}
@@ -780,7 +780,7 @@ void InputEventJoypadMotion::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_axis_value"), &InputEventJoypadMotion::get_axis_value);
ADD_PROPERTY(PropertyInfo(Variant::INT, "axis"), "set_axis", "get_axis");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "axis_value"), "set_axis_value", "get_axis_value");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "axis_value"), "set_axis_value", "get_axis_value");
}
InputEventJoypadMotion::InputEventJoypadMotion() {
@@ -861,7 +861,7 @@ void InputEventJoypadButton::_bind_methods() {
// ClassDB::bind_method(D_METHOD("is_pressed"), &InputEventJoypadButton::is_pressed);
ADD_PROPERTY(PropertyInfo(Variant::INT, "button_index"), "set_button_index", "get_button_index");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "pressure"), "set_pressure", "get_pressure");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pressure"), "set_pressure", "get_pressure");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "pressed"), "set_pressed", "is_pressed");
}
@@ -1100,7 +1100,7 @@ void InputEventAction::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "action"), "set_action", "get_action");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "pressed"), "set_pressed", "is_pressed");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "strength", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_strength", "get_strength");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "strength", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_strength", "get_strength");
}
InputEventAction::InputEventAction() {
@@ -1162,7 +1162,7 @@ void InputEventMagnifyGesture::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_factor", "factor"), &InputEventMagnifyGesture::set_factor);
ClassDB::bind_method(D_METHOD("get_factor"), &InputEventMagnifyGesture::get_factor);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "factor"), "set_factor", "get_factor");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "factor"), "set_factor", "get_factor");
}
InputEventMagnifyGesture::InputEventMagnifyGesture() {
diff --git a/core/os/main_loop.cpp b/core/os/main_loop.cpp
index 61bcb7dd32..ab43ce4af7 100644
--- a/core/os/main_loop.cpp
+++ b/core/os/main_loop.cpp
@@ -44,8 +44,8 @@ void MainLoop::_bind_methods() {
BIND_VMETHOD(MethodInfo("_input_event", PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")));
BIND_VMETHOD(MethodInfo("_input_text", PropertyInfo(Variant::STRING, "text")));
BIND_VMETHOD(MethodInfo("_initialize"));
- BIND_VMETHOD(MethodInfo(Variant::BOOL, "_iteration", PropertyInfo(Variant::REAL, "delta")));
- BIND_VMETHOD(MethodInfo(Variant::BOOL, "_idle", PropertyInfo(Variant::REAL, "delta")));
+ BIND_VMETHOD(MethodInfo(Variant::BOOL, "_iteration", PropertyInfo(Variant::FLOAT, "delta")));
+ BIND_VMETHOD(MethodInfo(Variant::BOOL, "_idle", PropertyInfo(Variant::FLOAT, "delta")));
BIND_VMETHOD(MethodInfo("_drop_files", PropertyInfo(Variant::PACKED_STRING_ARRAY, "files"), PropertyInfo(Variant::INT, "from_screen")));
BIND_VMETHOD(MethodInfo("_finalize"));
diff --git a/core/packed_data_container.cpp b/core/packed_data_container.cpp
index f23ee30a27..b82a366ef2 100644
--- a/core/packed_data_container.cpp
+++ b/core/packed_data_container.cpp
@@ -225,12 +225,12 @@ uint32_t PackedDataContainer::_pack(const Variant &p_data, Vector<uint8_t> &tmpd
string_cache[s] = tmpdata.size();
- FALLTHROUGH;
- };
+ [[fallthrough]];
+ }
case Variant::NIL:
case Variant::BOOL:
case Variant::INT:
- case Variant::REAL:
+ case Variant::FLOAT:
case Variant::VECTOR2:
case Variant::RECT2:
case Variant::VECTOR3:
@@ -241,8 +241,10 @@ uint32_t PackedDataContainer::_pack(const Variant &p_data, Vector<uint8_t> &tmpd
case Variant::BASIS:
case Variant::TRANSFORM:
case Variant::PACKED_BYTE_ARRAY:
- case Variant::PACKED_INT_ARRAY:
- case Variant::PACKED_REAL_ARRAY:
+ case Variant::PACKED_INT32_ARRAY:
+ case Variant::PACKED_INT64_ARRAY:
+ case Variant::PACKED_FLOAT32_ARRAY:
+ case Variant::PACKED_FLOAT64_ARRAY:
case Variant::PACKED_STRING_ARRAY:
case Variant::PACKED_VECTOR2_ARRAY:
case Variant::PACKED_VECTOR3_ARRAY:
diff --git a/core/type_info.h b/core/type_info.h
index 6861531fbd..5dacf67de4 100644
--- a/core/type_info.h
+++ b/core/type_info.h
@@ -137,8 +137,8 @@ MAKE_TYPE_INFO_WITH_META(int32_t, Variant::INT, GodotTypeInfo::METADATA_INT_IS_I
MAKE_TYPE_INFO_WITH_META(uint64_t, Variant::INT, GodotTypeInfo::METADATA_INT_IS_UINT64)
MAKE_TYPE_INFO_WITH_META(int64_t, Variant::INT, GodotTypeInfo::METADATA_INT_IS_INT64)
MAKE_TYPE_INFO(wchar_t, Variant::INT)
-MAKE_TYPE_INFO_WITH_META(float, Variant::REAL, GodotTypeInfo::METADATA_REAL_IS_FLOAT)
-MAKE_TYPE_INFO_WITH_META(double, Variant::REAL, GodotTypeInfo::METADATA_REAL_IS_DOUBLE)
+MAKE_TYPE_INFO_WITH_META(float, Variant::FLOAT, GodotTypeInfo::METADATA_REAL_IS_FLOAT)
+MAKE_TYPE_INFO_WITH_META(double, Variant::FLOAT, GodotTypeInfo::METADATA_REAL_IS_DOUBLE)
MAKE_TYPE_INFO(String, Variant::STRING)
MAKE_TYPE_INFO(Vector2, Variant::VECTOR2)
@@ -159,8 +159,10 @@ MAKE_TYPE_INFO(Signal, Variant::SIGNAL)
MAKE_TYPE_INFO(Dictionary, Variant::DICTIONARY)
MAKE_TYPE_INFO(Array, Variant::ARRAY)
MAKE_TYPE_INFO(PackedByteArray, Variant::PACKED_BYTE_ARRAY)
-MAKE_TYPE_INFO(PackedIntArray, Variant::PACKED_INT_ARRAY)
-MAKE_TYPE_INFO(PackedRealArray, Variant::PACKED_REAL_ARRAY)
+MAKE_TYPE_INFO(PackedInt32Array, Variant::PACKED_INT32_ARRAY)
+MAKE_TYPE_INFO(PackedInt64Array, Variant::PACKED_INT64_ARRAY)
+MAKE_TYPE_INFO(PackedFloat32Array, Variant::PACKED_FLOAT32_ARRAY)
+MAKE_TYPE_INFO(PackedFloat64Array, Variant::PACKED_FLOAT64_ARRAY)
MAKE_TYPE_INFO(PackedStringArray, Variant::PACKED_STRING_ARRAY)
MAKE_TYPE_INFO(PackedVector2Array, Variant::PACKED_VECTOR2_ARRAY)
MAKE_TYPE_INFO(PackedVector3Array, Variant::PACKED_VECTOR3_ARRAY)
@@ -221,20 +223,6 @@ MAKE_TEMPLATE_TYPE_INFO(Vector, Plane, Variant::ARRAY)
MAKE_TEMPLATE_TYPE_INFO(Vector, Face3, Variant::PACKED_VECTOR3_ARRAY)
MAKE_TEMPLATE_TYPE_INFO(Vector, StringName, Variant::PACKED_STRING_ARRAY)
-/*
-MAKE_TEMPLATE_TYPE_INFO(Vector, uint8_t, Variant::PACKED_BYTE_ARRAY)
-MAKE_TEMPLATE_TYPE_INFO(Vector, int, Variant::PACKED_INT_ARRAY)
-MAKE_TEMPLATE_TYPE_INFO(Vector, float, Variant::PACKED_REAL_ARRAY)
-MAKE_TEMPLATE_TYPE_INFO(Vector, String, Variant::PACKED_STRING_ARRAY)
-MAKE_TEMPLATE_TYPE_INFO(Vector, Vector2, Variant::PACKED_VECTOR2_ARRAY)
-MAKE_TEMPLATE_TYPE_INFO(Vector, Vector3, Variant::PACKED_VECTOR3_ARRAY)
-MAKE_TEMPLATE_TYPE_INFO(Vector, Color, Variant::PACKED_COLOR_ARRAY)
-
-
-MAKE_TEMPLATE_TYPE_INFO(Vector, Plane, Variant::ARRAY)
-MAKE_TEMPLATE_TYPE_INFO(Vector, Face3, Variant::PACKED_VECTOR3_ARRAY)
-*/
-
template <typename T>
struct GetTypeInfo<T *, typename EnableIf<TypeInherits<Object, T>::value>::type> {
static const Variant::Type VARIANT_TYPE = Variant::OBJECT;
diff --git a/core/typedefs.h b/core/typedefs.h
index 174e65cda7..5376b0718a 100644
--- a/core/typedefs.h
+++ b/core/typedefs.h
@@ -335,28 +335,6 @@ struct _GlobalLock {
*/
#define CAST_INT_TO_UCHAR_PTR(ptr) ((uint8_t *)(uintptr_t)(ptr))
-/** Hint for compilers that this fallthrough in a switch is intentional.
- * Can be replaced by [[fallthrough]] annotation if we move to C++17.
- * Including conditional support for it for people who set -std=c++17
- * themselves.
- * Requires a trailing semicolon when used.
- */
-#if __cplusplus >= 201703L
-#define FALLTHROUGH [[fallthrough]]
-#elif defined(__GNUC__) && __GNUC__ >= 7
-#define FALLTHROUGH __attribute__((fallthrough))
-#elif defined(__llvm__) && __cplusplus >= 201103L && defined(__has_feature)
-#if __has_feature(cxx_attributes) && defined(__has_warning)
-#if __has_warning("-Wimplicit-fallthrough")
-#define FALLTHROUGH [[clang::fallthrough]]
-#endif
-#endif
-#endif
-
-#ifndef FALLTHROUGH
-#define FALLTHROUGH
-#endif
-
// Home-made index sequence trick, so it can be used everywhere without the costly include of std::tuple.
// https://stackoverflow.com/questions/15014096/c-index-of-type-during-variadic-template-expansion
diff --git a/core/ustring.cpp b/core/ustring.cpp
index c4543b89da..1d4d9c2dfd 100644
--- a/core/ustring.cpp
+++ b/core/ustring.cpp
@@ -2169,6 +2169,7 @@ int64_t String::to_int(const CharType *p_str, int p_len) {
} else {
break;
}
+ [[fallthrough]];
}
case READING_INT: {
diff --git a/core/variant.cpp b/core/variant.cpp
index 1acb0e7a73..7bdaab8fa8 100644
--- a/core/variant.cpp
+++ b/core/variant.cpp
@@ -57,7 +57,7 @@ String Variant::get_type_name(Variant::Type p_type) {
return "int";
} break;
- case REAL: {
+ case FLOAT: {
return "float";
@@ -175,14 +175,24 @@ String Variant::get_type_name(Variant::Type p_type) {
return "PackedByteArray";
} break;
- case PACKED_INT_ARRAY: {
+ case PACKED_INT32_ARRAY: {
- return "PackedIntArray";
+ return "PackedInt32Array";
} break;
- case PACKED_REAL_ARRAY: {
+ case PACKED_INT64_ARRAY: {
- return "PackedRealArray";
+ return "PackedInt64Array";
+
+ } break;
+ case PACKED_FLOAT32_ARRAY: {
+
+ return "PackedFloat32Array";
+
+ } break;
+ case PACKED_FLOAT64_ARRAY: {
+
+ return "PackedFloat64Array";
} break;
case PACKED_STRING_ARRAY: {
@@ -230,7 +240,7 @@ bool Variant::can_convert(Variant::Type p_type_from, Variant::Type p_type_to) {
static const Type valid[] = {
INT,
- REAL,
+ FLOAT,
STRING,
NIL,
};
@@ -241,7 +251,7 @@ bool Variant::can_convert(Variant::Type p_type_from, Variant::Type p_type_to) {
static const Type valid[] = {
BOOL,
- REAL,
+ FLOAT,
STRING,
NIL,
};
@@ -249,7 +259,7 @@ bool Variant::can_convert(Variant::Type p_type_from, Variant::Type p_type_to) {
valid_types = valid;
} break;
- case REAL: {
+ case FLOAT: {
static const Type valid[] = {
BOOL,
@@ -425,9 +435,11 @@ bool Variant::can_convert(Variant::Type p_type_from, Variant::Type p_type_to) {
static const Type valid[] = {
PACKED_BYTE_ARRAY,
- PACKED_INT_ARRAY,
+ PACKED_INT32_ARRAY,
+ PACKED_INT64_ARRAY,
+ PACKED_FLOAT32_ARRAY,
+ PACKED_FLOAT64_ARRAY,
PACKED_STRING_ARRAY,
- PACKED_REAL_ARRAY,
PACKED_COLOR_ARRAY,
PACKED_VECTOR2_ARRAY,
PACKED_VECTOR3_ARRAY,
@@ -446,15 +458,32 @@ bool Variant::can_convert(Variant::Type p_type_from, Variant::Type p_type_to) {
valid_types = valid;
} break;
- case PACKED_INT_ARRAY: {
+ case PACKED_INT32_ARRAY: {
+
+ static const Type valid[] = {
+ ARRAY,
+ NIL
+ };
+ valid_types = valid;
+ } break;
+ case PACKED_INT64_ARRAY: {
+
+ static const Type valid[] = {
+ ARRAY,
+ NIL
+ };
+ valid_types = valid;
+ } break;
+ case PACKED_FLOAT32_ARRAY: {
static const Type valid[] = {
ARRAY,
NIL
};
+
valid_types = valid;
} break;
- case PACKED_REAL_ARRAY: {
+ case PACKED_FLOAT64_ARRAY: {
static const Type valid[] = {
ARRAY,
@@ -547,7 +576,7 @@ bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type
static const Type valid[] = {
INT,
- REAL,
+ FLOAT,
//STRING,
NIL,
};
@@ -558,7 +587,7 @@ bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type
static const Type valid[] = {
BOOL,
- REAL,
+ FLOAT,
//STRING,
NIL,
};
@@ -566,7 +595,7 @@ bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type
valid_types = valid;
} break;
- case REAL: {
+ case FLOAT: {
static const Type valid[] = {
BOOL,
@@ -743,9 +772,11 @@ bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type
static const Type valid[] = {
PACKED_BYTE_ARRAY,
- PACKED_INT_ARRAY,
+ PACKED_INT32_ARRAY,
+ PACKED_INT64_ARRAY,
+ PACKED_FLOAT32_ARRAY,
+ PACKED_FLOAT64_ARRAY,
PACKED_STRING_ARRAY,
- PACKED_REAL_ARRAY,
PACKED_COLOR_ARRAY,
PACKED_VECTOR2_ARRAY,
PACKED_VECTOR3_ARRAY,
@@ -764,7 +795,15 @@ bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type
valid_types = valid;
} break;
- case PACKED_INT_ARRAY: {
+ case PACKED_INT32_ARRAY: {
+
+ static const Type valid[] = {
+ ARRAY,
+ NIL
+ };
+ valid_types = valid;
+ } break;
+ case PACKED_INT64_ARRAY: {
static const Type valid[] = {
ARRAY,
@@ -772,7 +811,16 @@ bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type
};
valid_types = valid;
} break;
- case PACKED_REAL_ARRAY: {
+ case PACKED_FLOAT32_ARRAY: {
+
+ static const Type valid[] = {
+ ARRAY,
+ NIL
+ };
+
+ valid_types = valid;
+ } break;
+ case PACKED_FLOAT64_ARRAY: {
static const Type valid[] = {
ARRAY,
@@ -882,9 +930,9 @@ bool Variant::is_zero() const {
return _data._int == 0;
} break;
- case REAL: {
+ case FLOAT: {
- return _data._real == 0;
+ return _data._float == 0;
} break;
case STRING: {
@@ -1005,37 +1053,47 @@ bool Variant::is_zero() const {
// arrays
case PACKED_BYTE_ARRAY: {
- return reinterpret_cast<const Vector<uint8_t> *>(_data._mem)->size() == 0;
+ return PackedArrayRef<uint8_t>::get_array(_data.packed_array).size() == 0;
+
+ } break;
+ case PACKED_INT32_ARRAY: {
+
+ return PackedArrayRef<int32_t>::get_array(_data.packed_array).size() == 0;
+
+ } break;
+ case PACKED_INT64_ARRAY: {
+
+ return PackedArrayRef<int64_t>::get_array(_data.packed_array).size() == 0;
} break;
- case PACKED_INT_ARRAY: {
+ case PACKED_FLOAT32_ARRAY: {
- return reinterpret_cast<const Vector<int> *>(_data._mem)->size() == 0;
+ return PackedArrayRef<float>::get_array(_data.packed_array).size() == 0;
} break;
- case PACKED_REAL_ARRAY: {
+ case PACKED_FLOAT64_ARRAY: {
- return reinterpret_cast<const Vector<real_t> *>(_data._mem)->size() == 0;
+ return PackedArrayRef<double>::get_array(_data.packed_array).size() == 0;
} break;
case PACKED_STRING_ARRAY: {
- return reinterpret_cast<const Vector<String> *>(_data._mem)->size() == 0;
+ return PackedArrayRef<String>::get_array(_data.packed_array).size() == 0;
} break;
case PACKED_VECTOR2_ARRAY: {
- return reinterpret_cast<const Vector<Vector2> *>(_data._mem)->size() == 0;
+ return PackedArrayRef<Vector2>::get_array(_data.packed_array).size() == 0;
} break;
case PACKED_VECTOR3_ARRAY: {
- return reinterpret_cast<const Vector<Vector3> *>(_data._mem)->size() == 0;
+ return PackedArrayRef<Vector3>::get_array(_data.packed_array).size() == 0;
} break;
case PACKED_COLOR_ARRAY: {
- return reinterpret_cast<const Vector<Color> *>(_data._mem)->size() == 0;
+ return PackedArrayRef<Color>::get_array(_data.packed_array).size() == 0;
} break;
default: {
@@ -1063,9 +1121,9 @@ bool Variant::is_one() const {
return _data._int == 1;
} break;
- case REAL: {
+ case FLOAT: {
- return _data._real == 1;
+ return _data._float == 1;
} break;
case VECTOR2: {
@@ -1131,7 +1189,7 @@ void Variant::reference(const Variant &p_variant) {
case NIL:
case BOOL:
case INT:
- case REAL:
+ case FLOAT:
break;
default:
clear();
@@ -1154,9 +1212,9 @@ void Variant::reference(const Variant &p_variant) {
_data._int = p_variant._data._int;
} break;
- case REAL: {
+ case FLOAT: {
- _data._real = p_variant._data._real;
+ _data._float = p_variant._data._float;
} break;
case STRING: {
@@ -1275,37 +1333,74 @@ void Variant::reference(const Variant &p_variant) {
// arrays
case PACKED_BYTE_ARRAY: {
- memnew_placement(_data._mem, Vector<uint8_t>(*reinterpret_cast<const Vector<uint8_t> *>(p_variant._data._mem)));
+ _data.packed_array = static_cast<PackedArrayRef<uint8_t> *>(p_variant._data.packed_array)->reference();
+ if (!_data.packed_array) {
+ _data.packed_array = PackedArrayRef<uint8_t>::create();
+ }
} break;
- case PACKED_INT_ARRAY: {
+ case PACKED_INT32_ARRAY: {
- memnew_placement(_data._mem, Vector<int>(*reinterpret_cast<const Vector<int> *>(p_variant._data._mem)));
+ _data.packed_array = static_cast<PackedArrayRef<int32_t> *>(p_variant._data.packed_array)->reference();
+ if (!_data.packed_array) {
+ _data.packed_array = PackedArrayRef<int32_t>::create();
+ }
} break;
- case PACKED_REAL_ARRAY: {
+ case PACKED_INT64_ARRAY: {
- memnew_placement(_data._mem, Vector<real_t>(*reinterpret_cast<const Vector<real_t> *>(p_variant._data._mem)));
+ _data.packed_array = static_cast<PackedArrayRef<int64_t> *>(p_variant._data.packed_array)->reference();
+ if (!_data.packed_array) {
+ _data.packed_array = PackedArrayRef<int64_t>::create();
+ }
+
+ } break;
+ case PACKED_FLOAT32_ARRAY: {
+
+ _data.packed_array = static_cast<PackedArrayRef<float> *>(p_variant._data.packed_array)->reference();
+ if (!_data.packed_array) {
+ _data.packed_array = PackedArrayRef<float>::create();
+ }
+
+ } break;
+ case PACKED_FLOAT64_ARRAY: {
+
+ _data.packed_array = static_cast<PackedArrayRef<double> *>(p_variant._data.packed_array)->reference();
+ if (!_data.packed_array) {
+ _data.packed_array = PackedArrayRef<double>::create();
+ }
} break;
case PACKED_STRING_ARRAY: {
- memnew_placement(_data._mem, Vector<String>(*reinterpret_cast<const Vector<String> *>(p_variant._data._mem)));
+ _data.packed_array = static_cast<PackedArrayRef<String> *>(p_variant._data.packed_array)->reference();
+ if (!_data.packed_array) {
+ _data.packed_array = PackedArrayRef<String>::create();
+ }
} break;
case PACKED_VECTOR2_ARRAY: {
- memnew_placement(_data._mem, Vector<Vector2>(*reinterpret_cast<const Vector<Vector2> *>(p_variant._data._mem)));
+ _data.packed_array = static_cast<PackedArrayRef<Vector2> *>(p_variant._data.packed_array)->reference();
+ if (!_data.packed_array) {
+ _data.packed_array = PackedArrayRef<Vector2>::create();
+ }
} break;
case PACKED_VECTOR3_ARRAY: {
- memnew_placement(_data._mem, Vector<Vector3>(*reinterpret_cast<const Vector<Vector3> *>(p_variant._data._mem)));
+ _data.packed_array = static_cast<PackedArrayRef<Vector3> *>(p_variant._data.packed_array)->reference();
+ if (!_data.packed_array) {
+ _data.packed_array = PackedArrayRef<Vector3>::create();
+ }
} break;
case PACKED_COLOR_ARRAY: {
- memnew_placement(_data._mem, Vector<Color>(*reinterpret_cast<const Vector<Color> *>(p_variant._data._mem)));
+ _data.packed_array = static_cast<PackedArrayRef<Color> *>(p_variant._data.packed_array)->reference();
+ if (!_data.packed_array) {
+ _data.packed_array = PackedArrayRef<Color>::create();
+ }
} break;
default: {
@@ -1318,7 +1413,7 @@ void Variant::zero() {
case NIL: break;
case BOOL: this->_data._bool = false; break;
case INT: this->_data._int = 0; break;
- case REAL: this->_data._real = 0; break;
+ case FLOAT: this->_data._float = 0; break;
case VECTOR2: *reinterpret_cast<Vector2 *>(this->_data._mem) = Vector2(); break;
case VECTOR2I: *reinterpret_cast<Vector2i *>(this->_data._mem) = Vector2i(); break;
case RECT2: *reinterpret_cast<Rect2 *>(this->_data._mem) = Rect2(); break;
@@ -1409,31 +1504,39 @@ void Variant::clear() {
// arrays
case PACKED_BYTE_ARRAY: {
- reinterpret_cast<Vector<uint8_t> *>(_data._mem)->~Vector<uint8_t>();
+ PackedArrayRefBase::destroy(_data.packed_array);
+ } break;
+ case PACKED_INT32_ARRAY: {
+
+ PackedArrayRefBase::destroy(_data.packed_array);
} break;
- case PACKED_INT_ARRAY: {
+ case PACKED_INT64_ARRAY: {
- reinterpret_cast<Vector<int> *>(_data._mem)->~Vector<int>();
+ PackedArrayRefBase::destroy(_data.packed_array);
} break;
- case PACKED_REAL_ARRAY: {
+ case PACKED_FLOAT32_ARRAY: {
- reinterpret_cast<Vector<real_t> *>(_data._mem)->~Vector<real_t>();
+ PackedArrayRefBase::destroy(_data.packed_array);
+ } break;
+ case PACKED_FLOAT64_ARRAY: {
+
+ PackedArrayRefBase::destroy(_data.packed_array);
} break;
case PACKED_STRING_ARRAY: {
- reinterpret_cast<Vector<String> *>(_data._mem)->~Vector<String>();
+ PackedArrayRefBase::destroy(_data.packed_array);
} break;
case PACKED_VECTOR2_ARRAY: {
- reinterpret_cast<Vector<Vector2> *>(_data._mem)->~Vector<Vector2>();
+ PackedArrayRefBase::destroy(_data.packed_array);
} break;
case PACKED_VECTOR3_ARRAY: {
- reinterpret_cast<Vector<Vector3> *>(_data._mem)->~Vector<Vector3>();
+ PackedArrayRefBase::destroy(_data.packed_array);
} break;
case PACKED_COLOR_ARRAY: {
- reinterpret_cast<Vector<Color> *>(_data._mem)->~Vector<Color>();
+ PackedArrayRefBase::destroy(_data.packed_array);
} break;
default: {
} /* not needed */
@@ -1449,7 +1552,7 @@ Variant::operator signed int() const {
case NIL: return 0;
case BOOL: return _data._bool ? 1 : 0;
case INT: return _data._int;
- case REAL: return _data._real;
+ case FLOAT: return _data._float;
case STRING: return operator String().to_int();
default: {
@@ -1464,7 +1567,7 @@ Variant::operator unsigned int() const {
case NIL: return 0;
case BOOL: return _data._bool ? 1 : 0;
case INT: return _data._int;
- case REAL: return _data._real;
+ case FLOAT: return _data._float;
case STRING: return operator String().to_int();
default: {
@@ -1480,7 +1583,7 @@ Variant::operator int64_t() const {
case NIL: return 0;
case BOOL: return _data._bool ? 1 : 0;
case INT: return _data._int;
- case REAL: return _data._real;
+ case FLOAT: return _data._float;
case STRING: return operator String().to_int64();
default: {
@@ -1497,7 +1600,7 @@ Variant::operator long unsigned int() const {
case NIL: return 0;
case BOOL: return _data._bool ? 1 : 0;
case INT: return _data._int;
- case REAL: return _data._real;
+ case FLOAT: return _data._real;
case STRING: return operator String().to_int();
default: {
@@ -1516,7 +1619,7 @@ Variant::operator uint64_t() const {
case NIL: return 0;
case BOOL: return _data._bool ? 1 : 0;
case INT: return _data._int;
- case REAL: return _data._real;
+ case FLOAT: return _data._float;
case STRING: return operator String().to_int();
default: {
@@ -1528,6 +1631,8 @@ Variant::operator uint64_t() const {
Variant::operator ObjectID() const {
if (type == INT) {
return ObjectID(_data._int);
+ } else if (type == OBJECT) {
+ return _get_obj().id;
} else {
return ObjectID();
}
@@ -1541,7 +1646,7 @@ Variant::operator signed long() const {
case NIL: return 0;
case BOOL: return _data._bool ? 1 : 0;
case INT: return _data._int;
- case REAL: return _data._real;
+ case FLOAT: return _data._real;
case STRING: return operator String().to_int();
default: {
@@ -1559,7 +1664,7 @@ Variant::operator unsigned long() const {
case NIL: return 0;
case BOOL: return _data._bool ? 1 : 0;
case INT: return _data._int;
- case REAL: return _data._real;
+ case FLOAT: return _data._real;
case STRING: return operator String().to_int();
default: {
@@ -1578,7 +1683,7 @@ Variant::operator signed short() const {
case NIL: return 0;
case BOOL: return _data._bool ? 1 : 0;
case INT: return _data._int;
- case REAL: return _data._real;
+ case FLOAT: return _data._float;
case STRING: return operator String().to_int();
default: {
@@ -1593,7 +1698,7 @@ Variant::operator unsigned short() const {
case NIL: return 0;
case BOOL: return _data._bool ? 1 : 0;
case INT: return _data._int;
- case REAL: return _data._real;
+ case FLOAT: return _data._float;
case STRING: return operator String().to_int();
default: {
@@ -1608,7 +1713,7 @@ Variant::operator signed char() const {
case NIL: return 0;
case BOOL: return _data._bool ? 1 : 0;
case INT: return _data._int;
- case REAL: return _data._real;
+ case FLOAT: return _data._float;
case STRING: return operator String().to_int();
default: {
@@ -1623,7 +1728,7 @@ Variant::operator unsigned char() const {
case NIL: return 0;
case BOOL: return _data._bool ? 1 : 0;
case INT: return _data._int;
- case REAL: return _data._real;
+ case FLOAT: return _data._float;
case STRING: return operator String().to_int();
default: {
@@ -1644,7 +1749,7 @@ Variant::operator float() const {
case NIL: return 0;
case BOOL: return _data._bool ? 1.0 : 0.0;
case INT: return (float)_data._int;
- case REAL: return _data._real;
+ case FLOAT: return _data._float;
case STRING: return operator String().to_double();
default: {
@@ -1659,7 +1764,7 @@ Variant::operator double() const {
case NIL: return 0;
case BOOL: return _data._bool ? 1.0 : 0.0;
case INT: return (double)_data._int;
- case REAL: return _data._real;
+ case FLOAT: return _data._float;
case STRING: return operator String().to_double();
default: {
@@ -1702,7 +1807,7 @@ String Variant::stringify(List<const void *> &stack) const {
case NIL: return "Null";
case BOOL: return _data._bool ? "True" : "False";
case INT: return itos(_data._int);
- case REAL: return rtos(_data._real);
+ case FLOAT: return rtos(_data._float);
case STRING: return *reinterpret_cast<const String *>(_data._mem);
case VECTOR2: return "(" + operator Vector2() + ")";
case VECTOR2I: return "(" + operator Vector2i() + ")";
@@ -1824,9 +1929,9 @@ String Variant::stringify(List<const void *> &stack) const {
str += "]";
return str;
} break;
- case PACKED_INT_ARRAY: {
+ case PACKED_INT32_ARRAY: {
- Vector<int> vec = operator Vector<int>();
+ Vector<int32_t> vec = operator Vector<int32_t>();
String str("[");
for (int i = 0; i < vec.size(); i++) {
@@ -1837,9 +1942,35 @@ String Variant::stringify(List<const void *> &stack) const {
str += "]";
return str;
} break;
- case PACKED_REAL_ARRAY: {
+ case PACKED_INT64_ARRAY: {
- Vector<real_t> vec = operator Vector<real_t>();
+ Vector<int64_t> vec = operator Vector<int64_t>();
+ String str("[");
+ for (int i = 0; i < vec.size(); i++) {
+
+ if (i > 0)
+ str += ", ";
+ str = str + itos(vec[i]);
+ }
+ str += "]";
+ return str;
+ } break;
+ case PACKED_FLOAT32_ARRAY: {
+
+ Vector<float> vec = operator Vector<float>();
+ String str("[");
+ for (int i = 0; i < vec.size(); i++) {
+
+ if (i > 0)
+ str += ", ";
+ str = str + rtos(vec[i]);
+ }
+ str += "]";
+ return str;
+ } break;
+ case PACKED_FLOAT64_ARRAY: {
+
+ Vector<double> vec = operator Vector<double>();
String str("[");
for (int i = 0; i < vec.size(); i++) {
@@ -2195,11 +2326,17 @@ inline DA _convert_array_from_variant(const Variant &p_variant) {
case Variant::PACKED_BYTE_ARRAY: {
return _convert_array<DA, Vector<uint8_t> >(p_variant.operator Vector<uint8_t>());
}
- case Variant::PACKED_INT_ARRAY: {
- return _convert_array<DA, Vector<int> >(p_variant.operator Vector<int>());
+ case Variant::PACKED_INT32_ARRAY: {
+ return _convert_array<DA, Vector<int32_t> >(p_variant.operator Vector<int32_t>());
}
- case Variant::PACKED_REAL_ARRAY: {
- return _convert_array<DA, Vector<real_t> >(p_variant.operator Vector<real_t>());
+ case Variant::PACKED_INT64_ARRAY: {
+ return _convert_array<DA, Vector<int64_t> >(p_variant.operator Vector<int64_t>());
+ }
+ case Variant::PACKED_FLOAT32_ARRAY: {
+ return _convert_array<DA, Vector<float> >(p_variant.operator Vector<float>());
+ }
+ case Variant::PACKED_FLOAT64_ARRAY: {
+ return _convert_array<DA, Vector<double> >(p_variant.operator Vector<double>());
}
case Variant::PACKED_STRING_ARRAY: {
return _convert_array<DA, Vector<String> >(p_variant.operator Vector<String>());
@@ -2230,43 +2367,59 @@ Variant::operator Array() const {
Variant::operator Vector<uint8_t>() const {
if (type == PACKED_BYTE_ARRAY)
- return *reinterpret_cast<const Vector<uint8_t> *>(_data._mem);
+ return static_cast<PackedArrayRef<uint8_t> *>(_data.packed_array)->array;
else
return _convert_array_from_variant<Vector<uint8_t> >(*this);
}
-Variant::operator Vector<int>() const {
+Variant::operator Vector<int32_t>() const {
- if (type == PACKED_INT_ARRAY)
- return *reinterpret_cast<const Vector<int> *>(_data._mem);
+ if (type == PACKED_INT32_ARRAY)
+ return static_cast<PackedArrayRef<int32_t> *>(_data.packed_array)->array;
else
return _convert_array_from_variant<Vector<int> >(*this);
}
-Variant::operator Vector<real_t>() const {
+Variant::operator Vector<int64_t>() const {
- if (type == PACKED_REAL_ARRAY)
- return *reinterpret_cast<const Vector<real_t> *>(_data._mem);
+ if (type == PACKED_INT64_ARRAY)
+ return static_cast<PackedArrayRef<int64_t> *>(_data.packed_array)->array;
else
- return _convert_array_from_variant<Vector<real_t> >(*this);
+ return _convert_array_from_variant<Vector<int64_t> >(*this);
+}
+
+Variant::operator Vector<float>() const {
+
+ if (type == PACKED_FLOAT32_ARRAY)
+ return static_cast<PackedArrayRef<float> *>(_data.packed_array)->array;
+ else
+ return _convert_array_from_variant<Vector<float> >(*this);
+}
+
+Variant::operator Vector<double>() const {
+
+ if (type == PACKED_FLOAT64_ARRAY)
+ return static_cast<PackedArrayRef<double> *>(_data.packed_array)->array;
+ else
+ return _convert_array_from_variant<Vector<double> >(*this);
}
Variant::operator Vector<String>() const {
if (type == PACKED_STRING_ARRAY)
- return *reinterpret_cast<const Vector<String> *>(_data._mem);
+ return static_cast<PackedArrayRef<String> *>(_data.packed_array)->array;
else
return _convert_array_from_variant<Vector<String> >(*this);
}
Variant::operator Vector<Vector3>() const {
if (type == PACKED_VECTOR3_ARRAY)
- return *reinterpret_cast<const Vector<Vector3> *>(_data._mem);
+ return static_cast<PackedArrayRef<Vector3> *>(_data.packed_array)->array;
else
return _convert_array_from_variant<Vector<Vector3> >(*this);
}
Variant::operator Vector<Vector2>() const {
if (type == PACKED_VECTOR2_ARRAY)
- return *reinterpret_cast<const Vector<Vector2> *>(_data._mem);
+ return static_cast<PackedArrayRef<Vector2> *>(_data.packed_array)->array;
else
return _convert_array_from_variant<Vector<Vector2> >(*this);
}
@@ -2274,7 +2427,7 @@ Variant::operator Vector<Vector2>() const {
Variant::operator Vector<Color>() const {
if (type == PACKED_COLOR_ARRAY)
- return *reinterpret_cast<const Vector<Color> *>(_data._mem);
+ return static_cast<PackedArrayRef<Color> *>(_data.packed_array)->array;
else
return _convert_array_from_variant<Vector<Color> >(*this);
}
@@ -2365,7 +2518,7 @@ Variant::operator Orientation() const {
Variant::operator IP_Address() const {
- if (type == PACKED_REAL_ARRAY || type == PACKED_INT_ARRAY || type == PACKED_BYTE_ARRAY) {
+ if (type == PACKED_FLOAT32_ARRAY || type == PACKED_INT32_ARRAY || type == PACKED_FLOAT64_ARRAY || type == PACKED_INT64_ARRAY || type == PACKED_BYTE_ARRAY) {
Vector<int> addr = operator Vector<int>();
if (addr.size() == 4) {
@@ -2449,13 +2602,13 @@ Variant::Variant(unsigned char p_char) {
}
Variant::Variant(float p_float) {
- type = REAL;
- _data._real = p_float;
+ type = FLOAT;
+ _data._float = p_float;
}
Variant::Variant(double p_double) {
- type = REAL;
- _data._real = p_double;
+ type = FLOAT;
+ _data._float = p_double;
}
Variant::Variant(const ObjectID &p_id) {
@@ -2647,41 +2800,56 @@ Variant::Variant(const Vector<RID> &p_array) {
}
}
-Variant::Variant(const Vector<uint8_t> &p_raw_array) {
+Variant::Variant(const Vector<uint8_t> &p_byte_array) {
type = PACKED_BYTE_ARRAY;
- memnew_placement(_data._mem, Vector<uint8_t>(p_raw_array));
+
+ _data.packed_array = PackedArrayRef<uint8_t>::create(p_byte_array);
}
-Variant::Variant(const Vector<int> &p_int_array) {
+Variant::Variant(const Vector<int32_t> &p_int32_array) {
- type = PACKED_INT_ARRAY;
- memnew_placement(_data._mem, Vector<int>(p_int_array));
+ type = PACKED_INT32_ARRAY;
+ _data.packed_array = PackedArrayRef<int32_t>::create(p_int32_array);
}
-Variant::Variant(const Vector<real_t> &p_real_array) {
- type = PACKED_REAL_ARRAY;
- memnew_placement(_data._mem, Vector<real_t>(p_real_array));
+Variant::Variant(const Vector<int64_t> &p_int64_array) {
+
+ type = PACKED_INT64_ARRAY;
+ _data.packed_array = PackedArrayRef<int64_t>::create(p_int64_array);
+}
+
+Variant::Variant(const Vector<float> &p_float32_array) {
+
+ type = PACKED_FLOAT32_ARRAY;
+ _data.packed_array = PackedArrayRef<float>::create(p_float32_array);
}
+
+Variant::Variant(const Vector<double> &p_float64_array) {
+
+ type = PACKED_FLOAT64_ARRAY;
+ _data.packed_array = PackedArrayRef<double>::create(p_float64_array);
+}
+
Variant::Variant(const Vector<String> &p_string_array) {
type = PACKED_STRING_ARRAY;
- memnew_placement(_data._mem, Vector<String>(p_string_array));
+ _data.packed_array = PackedArrayRef<String>::create(p_string_array);
}
Variant::Variant(const Vector<Vector3> &p_vector3_array) {
type = PACKED_VECTOR3_ARRAY;
- memnew_placement(_data._mem, Vector<Vector3>(p_vector3_array));
+ _data.packed_array = PackedArrayRef<Vector3>::create(p_vector3_array);
}
Variant::Variant(const Vector<Vector2> &p_vector2_array) {
type = PACKED_VECTOR2_ARRAY;
- memnew_placement(_data._mem, Vector<Vector2>(p_vector2_array));
+ _data.packed_array = PackedArrayRef<Vector2>::create(p_vector2_array);
}
Variant::Variant(const Vector<Color> &p_color_array) {
type = PACKED_COLOR_ARRAY;
- memnew_placement(_data._mem, Vector<Color>(p_color_array));
+ _data.packed_array = PackedArrayRef<Color>::create(p_color_array);
}
Variant::Variant(const Vector<Face3> &p_face_array) {
@@ -2753,9 +2921,9 @@ void Variant::operator=(const Variant &p_variant) {
_data._int = p_variant._data._int;
} break;
- case REAL: {
+ case FLOAT: {
- _data._real = p_variant._data._real;
+ _data._float = p_variant._data._float;
} break;
case STRING: {
@@ -2874,31 +3042,39 @@ void Variant::operator=(const Variant &p_variant) {
// arrays
case PACKED_BYTE_ARRAY: {
- *reinterpret_cast<Vector<uint8_t> *>(_data._mem) = *reinterpret_cast<const Vector<uint8_t> *>(p_variant._data._mem);
+ _data.packed_array = PackedArrayRef<uint8_t>::reference_from(_data.packed_array, p_variant._data.packed_array);
} break;
- case PACKED_INT_ARRAY: {
+ case PACKED_INT32_ARRAY: {
- *reinterpret_cast<Vector<int> *>(_data._mem) = *reinterpret_cast<const Vector<int> *>(p_variant._data._mem);
+ _data.packed_array = PackedArrayRef<int32_t>::reference_from(_data.packed_array, p_variant._data.packed_array);
} break;
- case PACKED_REAL_ARRAY: {
+ case PACKED_INT64_ARRAY: {
- *reinterpret_cast<Vector<real_t> *>(_data._mem) = *reinterpret_cast<const Vector<real_t> *>(p_variant._data._mem);
+ _data.packed_array = PackedArrayRef<int64_t>::reference_from(_data.packed_array, p_variant._data.packed_array);
+ } break;
+ case PACKED_FLOAT32_ARRAY: {
+
+ _data.packed_array = PackedArrayRef<float>::reference_from(_data.packed_array, p_variant._data.packed_array);
+ } break;
+ case PACKED_FLOAT64_ARRAY: {
+
+ _data.packed_array = PackedArrayRef<double>::reference_from(_data.packed_array, p_variant._data.packed_array);
} break;
case PACKED_STRING_ARRAY: {
- *reinterpret_cast<Vector<String> *>(_data._mem) = *reinterpret_cast<const Vector<String> *>(p_variant._data._mem);
+ _data.packed_array = PackedArrayRef<String>::reference_from(_data.packed_array, p_variant._data.packed_array);
} break;
case PACKED_VECTOR2_ARRAY: {
- *reinterpret_cast<Vector<Vector2> *>(_data._mem) = *reinterpret_cast<const Vector<Vector2> *>(p_variant._data._mem);
+ _data.packed_array = PackedArrayRef<Vector2>::reference_from(_data.packed_array, p_variant._data.packed_array);
} break;
case PACKED_VECTOR3_ARRAY: {
- *reinterpret_cast<Vector<Vector3> *>(_data._mem) = *reinterpret_cast<const Vector<Vector3> *>(p_variant._data._mem);
+ _data.packed_array = PackedArrayRef<Vector3>::reference_from(_data.packed_array, p_variant._data.packed_array);
} break;
case PACKED_COLOR_ARRAY: {
- *reinterpret_cast<Vector<Color> *>(_data._mem) = *reinterpret_cast<const Vector<Color> *>(p_variant._data._mem);
+ _data.packed_array = PackedArrayRef<Color>::reference_from(_data.packed_array, p_variant._data.packed_array);
} break;
default: {
}
@@ -2938,9 +3114,9 @@ uint32_t Variant::hash() const {
return _data._int;
} break;
- case REAL: {
+ case FLOAT: {
- return hash_djb2_one_float(_data._real);
+ return hash_djb2_one_float(_data._float);
} break;
case STRING: {
@@ -3106,7 +3282,7 @@ uint32_t Variant::hash() const {
} break;
case PACKED_BYTE_ARRAY: {
- const Vector<uint8_t> &arr = *reinterpret_cast<const Vector<uint8_t> *>(_data._mem);
+ const Vector<uint8_t> &arr = PackedArrayRef<uint8_t>::get_array(_data.packed_array);
int len = arr.size();
if (likely(len)) {
const uint8_t *r = arr.ptr();
@@ -3116,26 +3292,51 @@ uint32_t Variant::hash() const {
}
} break;
- case PACKED_INT_ARRAY: {
+ case PACKED_INT32_ARRAY: {
- const Vector<int> &arr = *reinterpret_cast<const Vector<int> *>(_data._mem);
+ const Vector<int32_t> &arr = PackedArrayRef<int32_t>::get_array(_data.packed_array);
int len = arr.size();
if (likely(len)) {
- const int *r = arr.ptr();
- return hash_djb2_buffer((uint8_t *)&r[0], len * sizeof(int));
+ const int32_t *r = arr.ptr();
+ return hash_djb2_buffer((uint8_t *)&r[0], len * sizeof(int32_t));
} else {
return hash_djb2_one_64(0);
}
} break;
- case PACKED_REAL_ARRAY: {
+ case PACKED_INT64_ARRAY: {
- const Vector<real_t> &arr = *reinterpret_cast<const Vector<real_t> *>(_data._mem);
+ const Vector<int64_t> &arr = PackedArrayRef<int64_t>::get_array(_data.packed_array);
+ int len = arr.size();
+ if (likely(len)) {
+ const int64_t *r = arr.ptr();
+ return hash_djb2_buffer((uint8_t *)&r[0], len * sizeof(int64_t));
+ } else {
+ return hash_djb2_one_64(0);
+ }
+
+ } break;
+ case PACKED_FLOAT32_ARRAY: {
+
+ const Vector<float> &arr = PackedArrayRef<float>::get_array(_data.packed_array);
int len = arr.size();
if (likely(len)) {
- const real_t *r = arr.ptr();
- return hash_djb2_buffer((uint8_t *)&r[0], len * sizeof(real_t));
+ const float *r = arr.ptr();
+ return hash_djb2_buffer((uint8_t *)&r[0], len * sizeof(float));
+ } else {
+ return hash_djb2_one_float(0.0);
+ }
+
+ } break;
+ case PACKED_FLOAT64_ARRAY: {
+
+ const Vector<double> &arr = PackedArrayRef<double>::get_array(_data.packed_array);
+ int len = arr.size();
+
+ if (likely(len)) {
+ const double *r = arr.ptr();
+ return hash_djb2_buffer((uint8_t *)&r[0], len * sizeof(double));
} else {
return hash_djb2_one_float(0.0);
}
@@ -3144,7 +3345,7 @@ uint32_t Variant::hash() const {
case PACKED_STRING_ARRAY: {
uint32_t hash = 5831;
- const Vector<String> &arr = *reinterpret_cast<const Vector<String> *>(_data._mem);
+ const Vector<String> &arr = PackedArrayRef<String>::get_array(_data.packed_array);
int len = arr.size();
if (likely(len)) {
@@ -3160,7 +3361,7 @@ uint32_t Variant::hash() const {
case PACKED_VECTOR2_ARRAY: {
uint32_t hash = 5831;
- const Vector<Vector2> &arr = *reinterpret_cast<const Vector<Vector2> *>(_data._mem);
+ const Vector<Vector2> &arr = PackedArrayRef<Vector2>::get_array(_data.packed_array);
int len = arr.size();
if (likely(len)) {
@@ -3177,7 +3378,7 @@ uint32_t Variant::hash() const {
case PACKED_VECTOR3_ARRAY: {
uint32_t hash = 5831;
- const Vector<Vector3> &arr = *reinterpret_cast<const Vector<Vector3> *>(_data._mem);
+ const Vector<Vector3> &arr = PackedArrayRef<Vector3>::get_array(_data.packed_array);
int len = arr.size();
if (likely(len)) {
@@ -3195,7 +3396,7 @@ uint32_t Variant::hash() const {
case PACKED_COLOR_ARRAY: {
uint32_t hash = 5831;
- const Vector<Color> &arr = *reinterpret_cast<const Vector<Color> *>(_data._mem);
+ const Vector<Color> &arr = PackedArrayRef<Color>::get_array(_data.packed_array);
int len = arr.size();
if (likely(len)) {
@@ -3242,21 +3443,21 @@ uint32_t Variant::hash() const {
(hash_compare_scalar((p_lhs).b, (p_rhs).b)) && \
(hash_compare_scalar((p_lhs).a, (p_rhs).a))
-#define hash_compare_pool_array(p_lhs, p_rhs, p_type, p_compare_func) \
- const Vector<p_type> &l = *reinterpret_cast<const Vector<p_type> *>(p_lhs); \
- const Vector<p_type> &r = *reinterpret_cast<const Vector<p_type> *>(p_rhs); \
- \
- if (l.size() != r.size()) \
- return false; \
- \
- const p_type *lr = l.ptr(); \
- const p_type *rr = r.ptr(); \
- \
- for (int i = 0; i < l.size(); ++i) { \
- if (!p_compare_func((lr[i]), (rr[i]))) \
- return false; \
- } \
- \
+#define hash_compare_packed_array(p_lhs, p_rhs, p_type, p_compare_func) \
+ const Vector<p_type> &l = PackedArrayRef<p_type>::get_array(p_lhs); \
+ const Vector<p_type> &r = PackedArrayRef<p_type>::get_array(p_rhs); \
+ \
+ if (l.size() != r.size()) \
+ return false; \
+ \
+ const p_type *lr = l.ptr(); \
+ const p_type *rr = r.ptr(); \
+ \
+ for (int i = 0; i < l.size(); ++i) { \
+ if (!p_compare_func((lr[i]), (rr[i]))) \
+ return false; \
+ } \
+ \
return true
bool Variant::hash_compare(const Variant &p_variant) const {
@@ -3264,8 +3465,8 @@ bool Variant::hash_compare(const Variant &p_variant) const {
return false;
switch (type) {
- case REAL: {
- return hash_compare_scalar(_data._real, p_variant._data._real);
+ case FLOAT: {
+ return hash_compare_scalar(_data._float, p_variant._data._float);
} break;
case VECTOR2: {
@@ -3389,20 +3590,25 @@ bool Variant::hash_compare(const Variant &p_variant) const {
return true;
} break;
- case PACKED_REAL_ARRAY: {
- hash_compare_pool_array(_data._mem, p_variant._data._mem, real_t, hash_compare_scalar);
+ // This is for floating point comparisons only.
+ case PACKED_FLOAT32_ARRAY: {
+ hash_compare_packed_array(_data.packed_array, p_variant._data.packed_array, float, hash_compare_scalar);
+ } break;
+
+ case PACKED_FLOAT64_ARRAY: {
+ hash_compare_packed_array(_data.packed_array, p_variant._data.packed_array, double, hash_compare_scalar);
} break;
case PACKED_VECTOR2_ARRAY: {
- hash_compare_pool_array(_data._mem, p_variant._data._mem, Vector2, hash_compare_vector2);
+ hash_compare_packed_array(_data.packed_array, p_variant._data.packed_array, Vector2, hash_compare_vector2);
} break;
case PACKED_VECTOR3_ARRAY: {
- hash_compare_pool_array(_data._mem, p_variant._data._mem, Vector3, hash_compare_vector3);
+ hash_compare_packed_array(_data.packed_array, p_variant._data.packed_array, Vector3, hash_compare_vector3);
} break;
case PACKED_COLOR_ARRAY: {
- hash_compare_pool_array(_data._mem, p_variant._data._mem, Color, hash_compare_color);
+ hash_compare_packed_array(_data.packed_array, p_variant._data.packed_array, Color, hash_compare_color);
} break;
default:
diff --git a/core/variant.h b/core/variant.h
index b1be95de12..614d39e84a 100644
--- a/core/variant.h
+++ b/core/variant.h
@@ -58,8 +58,10 @@ struct PropertyInfo;
struct MethodInfo;
typedef Vector<uint8_t> PackedByteArray;
-typedef Vector<int> PackedIntArray;
-typedef Vector<real_t> PackedRealArray;
+typedef Vector<int32_t> PackedInt32Array;
+typedef Vector<int64_t> PackedInt64Array;
+typedef Vector<float> PackedFloat32Array;
+typedef Vector<double> PackedFloat64Array;
typedef Vector<String> PackedStringArray;
typedef Vector<Vector2> PackedVector2Array;
typedef Vector<Vector3> PackedVector3Array;
@@ -76,18 +78,16 @@ class Variant {
public:
// If this changes the table in variant_op must be updated
enum Type {
-
NIL,
// atomic types
BOOL,
INT,
- REAL,
+ FLOAT,
STRING,
// math types
-
- VECTOR2, // 5
+ VECTOR2,
VECTOR2I,
RECT2,
RECT2I,
@@ -95,7 +95,7 @@ public:
VECTOR3I,
TRANSFORM2D,
PLANE,
- QUAT, // 10
+ QUAT,
AABB,
BASIS,
TRANSFORM,
@@ -103,24 +103,26 @@ public:
// misc types
COLOR,
STRING_NAME,
- NODE_PATH, // 15
+ NODE_PATH,
_RID,
OBJECT,
CALLABLE,
SIGNAL,
DICTIONARY,
ARRAY,
- // arrays
- PACKED_BYTE_ARRAY, // 20
- PACKED_INT_ARRAY,
- PACKED_REAL_ARRAY,
+
+ // typed arrays
+ PACKED_BYTE_ARRAY,
+ PACKED_INT32_ARRAY,
+ PACKED_INT64_ARRAY,
+ PACKED_FLOAT32_ARRAY,
+ PACKED_FLOAT64_ARRAY,
PACKED_STRING_ARRAY,
PACKED_VECTOR2_ARRAY,
- PACKED_VECTOR3_ARRAY, // 25
+ PACKED_VECTOR3_ARRAY,
PACKED_COLOR_ARRAY,
VARIANT_MAX
-
};
private:
@@ -136,17 +138,77 @@ private:
Object *obj;
};
+ /* array helpers */
+ struct PackedArrayRefBase {
+ SafeRefCount refcount;
+ _FORCE_INLINE_ PackedArrayRefBase *reference() {
+ if (this->refcount.ref()) {
+ return this;
+ } else {
+ return nullptr;
+ }
+ }
+ static _FORCE_INLINE_ PackedArrayRefBase *reference_from(PackedArrayRefBase *p_base, PackedArrayRefBase *p_from) {
+ if (p_base == p_from) {
+ return p_base; //same thing, do nothing
+ }
+
+ if (p_from->reference()) {
+ if (p_base->refcount.unref()) {
+ memdelete(p_base);
+ }
+ return p_from;
+ } else {
+ return p_base; //keep, could not reference new
+ }
+ }
+ static _FORCE_INLINE_ void destroy(PackedArrayRefBase *p_array) {
+ if (p_array->refcount.unref()) {
+ memdelete(p_array);
+ }
+ }
+ _FORCE_INLINE_ virtual ~PackedArrayRefBase() {} //needs virtual destructor, but make inline
+ };
+
+ template <class T>
+ struct PackedArrayRef : public PackedArrayRefBase {
+ Vector<T> array;
+ static _FORCE_INLINE_ PackedArrayRef<T> *create() {
+ return memnew(PackedArrayRef<T>);
+ }
+ static _FORCE_INLINE_ PackedArrayRef<T> *create(const Vector<T> &p_from) {
+ return memnew(PackedArrayRef<T>(p_from));
+ }
+
+ static _FORCE_INLINE_ const Vector<T> &get_array(PackedArrayRefBase *p_base) {
+ return static_cast<PackedArrayRef<T> *>(p_base)->array;
+ }
+ static _FORCE_INLINE_ Vector<T> *get_array_ptr(const PackedArrayRefBase *p_base) {
+ return &const_cast<PackedArrayRef<T> *>(static_cast<const PackedArrayRef<T> *>(p_base))->array;
+ }
+
+ _FORCE_INLINE_ PackedArrayRef(const Vector<T> &p_from) {
+ array = p_from;
+ refcount.init();
+ }
+ _FORCE_INLINE_ PackedArrayRef() {
+ refcount.init();
+ }
+ };
+
+ /* end of array helpers */
_ALWAYS_INLINE_ ObjData &_get_obj();
_ALWAYS_INLINE_ const ObjData &_get_obj() const;
union {
bool _bool;
int64_t _int;
- double _real;
+ double _float;
Transform2D *_transform2d;
::AABB *_aabb;
Basis *_basis;
Transform *_transform;
+ PackedArrayRefBase *packed_array;
void *_ptr; //generic pointer
uint8_t _mem[sizeof(ObjData) > (sizeof(real_t) * 4) ? sizeof(ObjData) : (sizeof(real_t) * 4)];
} _data GCC_ALIGNED_8;
@@ -155,14 +217,20 @@ private:
void clear();
public:
- _FORCE_INLINE_ Type get_type() const { return type; }
+ _FORCE_INLINE_ Type get_type() const {
+ return type;
+ }
static String get_type_name(Variant::Type p_type);
static bool can_convert(Type p_type_from, Type p_type_to);
static bool can_convert_strict(Type p_type_from, Type p_type_to);
bool is_ref() const;
- _FORCE_INLINE_ bool is_num() const { return type == INT || type == REAL; };
- _FORCE_INLINE_ bool is_array() const { return type >= ARRAY; };
+ _FORCE_INLINE_ bool is_num() const {
+ return type == INT || type == FLOAT;
+ };
+ _FORCE_INLINE_ bool is_array() const {
+ return type >= ARRAY;
+ };
bool is_shared() const;
bool is_zero() const;
bool is_one() const;
@@ -218,8 +286,10 @@ public:
operator Array() const;
operator Vector<uint8_t>() const;
- operator Vector<int>() const;
- operator Vector<real_t>() const;
+ operator Vector<int32_t>() const;
+ operator Vector<int64_t>() const;
+ operator Vector<float>() const;
+ operator Vector<double>() const;
operator Vector<String>() const;
operator Vector<Vector3>() const;
operator Vector<Color>() const;
@@ -283,9 +353,11 @@ public:
Variant(const Array &p_array);
Variant(const Vector<Plane> &p_array); // helper
- Variant(const Vector<uint8_t> &p_raw_array);
- Variant(const Vector<int> &p_int_array);
- Variant(const Vector<real_t> &p_real_array);
+ Variant(const Vector<uint8_t> &p_byte_array);
+ Variant(const Vector<int32_t> &p_int32_array);
+ Variant(const Vector<int64_t> &p_int64_array);
+ Variant(const Vector<float> &p_float32_array);
+ Variant(const Vector<double> &p_float64_array);
Variant(const Vector<String> &p_string_array);
Variant(const Vector<Vector3> &p_vector3_array);
Variant(const Vector<Color> &p_color_array);
@@ -405,7 +477,9 @@ public:
void operator=(const Variant &p_variant); // only this is enough for all the other types
Variant(const Variant &p_variant);
- _FORCE_INLINE_ Variant() { type = NIL; }
+ _FORCE_INLINE_ Variant() {
+ type = NIL;
+ }
_FORCE_INLINE_ ~Variant() {
if (type != Variant::NIL) clear();
}
diff --git a/core/variant_call.cpp b/core/variant_call.cpp
index 0f7c1275ef..9cc08b54e6 100644
--- a/core/variant_call.cpp
+++ b/core/variant_call.cpp
@@ -666,90 +666,139 @@ struct _VariantCall {
r_ret = s;
}
- VCALL_LOCALMEM0R(PackedByteArray, size);
- VCALL_LOCALMEM0R(PackedByteArray, empty);
- VCALL_LOCALMEM2(PackedByteArray, set);
- VCALL_LOCALMEM1R(PackedByteArray, get);
- VCALL_LOCALMEM1(PackedByteArray, push_back);
- VCALL_LOCALMEM1(PackedByteArray, resize);
- VCALL_LOCALMEM2R(PackedByteArray, insert);
- VCALL_LOCALMEM1(PackedByteArray, remove);
- VCALL_LOCALMEM1(PackedByteArray, append);
- VCALL_LOCALMEM1(PackedByteArray, append_array);
- VCALL_LOCALMEM0(PackedByteArray, invert);
- VCALL_LOCALMEM2R(PackedByteArray, subarray);
-
- VCALL_LOCALMEM0R(PackedIntArray, size);
- VCALL_LOCALMEM0R(PackedIntArray, empty);
- VCALL_LOCALMEM2(PackedIntArray, set);
- VCALL_LOCALMEM1R(PackedIntArray, get);
- VCALL_LOCALMEM1(PackedIntArray, push_back);
- VCALL_LOCALMEM1(PackedIntArray, resize);
- VCALL_LOCALMEM2R(PackedIntArray, insert);
- VCALL_LOCALMEM1(PackedIntArray, remove);
- VCALL_LOCALMEM1(PackedIntArray, append);
- VCALL_LOCALMEM1(PackedIntArray, append_array);
- VCALL_LOCALMEM0(PackedIntArray, invert);
-
- VCALL_LOCALMEM0R(PackedRealArray, size);
- VCALL_LOCALMEM0R(PackedRealArray, empty);
- VCALL_LOCALMEM2(PackedRealArray, set);
- VCALL_LOCALMEM1R(PackedRealArray, get);
- VCALL_LOCALMEM1(PackedRealArray, push_back);
- VCALL_LOCALMEM1(PackedRealArray, resize);
- VCALL_LOCALMEM2R(PackedRealArray, insert);
- VCALL_LOCALMEM1(PackedRealArray, remove);
- VCALL_LOCALMEM1(PackedRealArray, append);
- VCALL_LOCALMEM1(PackedRealArray, append_array);
- VCALL_LOCALMEM0(PackedRealArray, invert);
-
- VCALL_LOCALMEM0R(PackedStringArray, size);
- VCALL_LOCALMEM0R(PackedStringArray, empty);
- VCALL_LOCALMEM2(PackedStringArray, set);
- VCALL_LOCALMEM1R(PackedStringArray, get);
- VCALL_LOCALMEM1(PackedStringArray, push_back);
- VCALL_LOCALMEM1(PackedStringArray, resize);
- VCALL_LOCALMEM2R(PackedStringArray, insert);
- VCALL_LOCALMEM1(PackedStringArray, remove);
- VCALL_LOCALMEM1(PackedStringArray, append);
- VCALL_LOCALMEM1(PackedStringArray, append_array);
- VCALL_LOCALMEM0(PackedStringArray, invert);
-
- VCALL_LOCALMEM0R(PackedVector2Array, size);
- VCALL_LOCALMEM0R(PackedVector2Array, empty);
- VCALL_LOCALMEM2(PackedVector2Array, set);
- VCALL_LOCALMEM1R(PackedVector2Array, get);
- VCALL_LOCALMEM1(PackedVector2Array, push_back);
- VCALL_LOCALMEM1(PackedVector2Array, resize);
- VCALL_LOCALMEM2R(PackedVector2Array, insert);
- VCALL_LOCALMEM1(PackedVector2Array, remove);
- VCALL_LOCALMEM1(PackedVector2Array, append);
- VCALL_LOCALMEM1(PackedVector2Array, append_array);
- VCALL_LOCALMEM0(PackedVector2Array, invert);
-
- VCALL_LOCALMEM0R(PackedVector3Array, size);
- VCALL_LOCALMEM0R(PackedVector3Array, empty);
- VCALL_LOCALMEM2(PackedVector3Array, set);
- VCALL_LOCALMEM1R(PackedVector3Array, get);
- VCALL_LOCALMEM1(PackedVector3Array, push_back);
- VCALL_LOCALMEM1(PackedVector3Array, resize);
- VCALL_LOCALMEM2R(PackedVector3Array, insert);
- VCALL_LOCALMEM1(PackedVector3Array, remove);
- VCALL_LOCALMEM1(PackedVector3Array, append);
- VCALL_LOCALMEM1(PackedVector3Array, append_array);
- VCALL_LOCALMEM0(PackedVector3Array, invert);
-
- VCALL_LOCALMEM0R(PackedColorArray, size);
- VCALL_LOCALMEM0R(PackedColorArray, empty);
- VCALL_LOCALMEM2(PackedColorArray, set);
- VCALL_LOCALMEM1R(PackedColorArray, get);
- VCALL_LOCALMEM1(PackedColorArray, push_back);
- VCALL_LOCALMEM1(PackedColorArray, resize);
- VCALL_LOCALMEM2R(PackedColorArray, insert);
- VCALL_LOCALMEM1(PackedColorArray, remove);
- VCALL_LOCALMEM1(PackedColorArray, append);
- VCALL_LOCALMEM1(PackedColorArray, append_array);
- VCALL_LOCALMEM0(PackedColorArray, invert);
+#define VCALL_PARRMEM0(m_type, m_elemtype, m_method) \
+ static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(); }
+#define VCALL_PARRMEM0R(m_type, m_elemtype, m_method) \
+ static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { r_ret = Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(); }
+#define VCALL_PARRMEM1(m_type, m_elemtype, m_method) \
+ static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(*p_args[0]); }
+#define VCALL_PARRMEM1R(m_type, m_elemtype, m_method) \
+ static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { r_ret = Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(*p_args[0]); }
+#define VCALL_PARRMEM2(m_type, m_elemtype, m_method) \
+ static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(*p_args[0], *p_args[1]); }
+#define VCALL_PARRMEM2R(m_type, m_elemtype, m_method) \
+ static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { r_ret = Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(*p_args[0], *p_args[1]); }
+#define VCALL_PARRMEM3(m_type, m_elemtype, m_method) \
+ static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(*p_args[0], *p_args[1], *p_args[2]); }
+#define VCALL_PARRMEM3R(m_type, m_elemtype, m_method) \
+ static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { r_ret = Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(*p_args[0], *p_args[1], *p_args[2]); }
+#define VCALL_PARRMEM4(m_type, m_elemtype, m_method) \
+ static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(*p_args[0], *p_args[1], *p_args[2], *p_args[3]); }
+#define VCALL_PARRMEM4R(m_type, m_elemtype, m_method) \
+ static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { r_ret = Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(*p_args[0], *p_args[1], *p_args[2], *p_args[3]); }
+#define VCALL_PARRMEM5(m_type, m_elemtype, m_method) \
+ static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(*p_args[0], *p_args[1], *p_args[2], *p_args[3], *p_args[4]); }
+#define VCALL_PARRMEM5R(m_type, m_elemtype, m_method) \
+ static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { r_ret = Variant::PackedArrayRef<m_elemtype>::get_array_ptr(p_self._data.packed_array)->m_method(*p_args[0], *p_args[1], *p_args[2], *p_args[3], *p_args[4]); }
+
+ VCALL_PARRMEM0R(PackedByteArray, uint8_t, size);
+ VCALL_PARRMEM0R(PackedByteArray, uint8_t, empty);
+ VCALL_PARRMEM2(PackedByteArray, uint8_t, set);
+ VCALL_PARRMEM1R(PackedByteArray, uint8_t, get);
+ VCALL_PARRMEM1(PackedByteArray, uint8_t, push_back);
+ VCALL_PARRMEM1(PackedByteArray, uint8_t, resize);
+ VCALL_PARRMEM2R(PackedByteArray, uint8_t, insert);
+ VCALL_PARRMEM1(PackedByteArray, uint8_t, remove);
+ VCALL_PARRMEM1(PackedByteArray, uint8_t, append);
+ VCALL_PARRMEM1(PackedByteArray, uint8_t, append_array);
+ VCALL_PARRMEM0(PackedByteArray, uint8_t, invert);
+ VCALL_PARRMEM2R(PackedByteArray, uint8_t, subarray);
+
+ VCALL_PARRMEM0R(PackedInt32Array, int32_t, size);
+ VCALL_PARRMEM0R(PackedInt32Array, int32_t, empty);
+ VCALL_PARRMEM2(PackedInt32Array, int32_t, set);
+ VCALL_PARRMEM1R(PackedInt32Array, int32_t, get);
+ VCALL_PARRMEM1(PackedInt32Array, int32_t, push_back);
+ VCALL_PARRMEM1(PackedInt32Array, int32_t, resize);
+ VCALL_PARRMEM2R(PackedInt32Array, int32_t, insert);
+ VCALL_PARRMEM1(PackedInt32Array, int32_t, remove);
+ VCALL_PARRMEM1(PackedInt32Array, int32_t, append);
+ VCALL_PARRMEM1(PackedInt32Array, int32_t, append_array);
+ VCALL_PARRMEM0(PackedInt32Array, int32_t, invert);
+
+ VCALL_PARRMEM0R(PackedInt64Array, int64_t, size);
+ VCALL_PARRMEM0R(PackedInt64Array, int64_t, empty);
+ VCALL_PARRMEM2(PackedInt64Array, int64_t, set);
+ VCALL_PARRMEM1R(PackedInt64Array, int64_t, get);
+ VCALL_PARRMEM1(PackedInt64Array, int64_t, push_back);
+ VCALL_PARRMEM1(PackedInt64Array, int64_t, resize);
+ VCALL_PARRMEM2R(PackedInt64Array, int64_t, insert);
+ VCALL_PARRMEM1(PackedInt64Array, int64_t, remove);
+ VCALL_PARRMEM1(PackedInt64Array, int64_t, append);
+ VCALL_PARRMEM1(PackedInt64Array, int64_t, append_array);
+ VCALL_PARRMEM0(PackedInt64Array, int64_t, invert);
+
+ VCALL_PARRMEM0R(PackedFloat32Array, float, size);
+ VCALL_PARRMEM0R(PackedFloat32Array, float, empty);
+ VCALL_PARRMEM2(PackedFloat32Array, float, set);
+ VCALL_PARRMEM1R(PackedFloat32Array, float, get);
+ VCALL_PARRMEM1(PackedFloat32Array, float, push_back);
+ VCALL_PARRMEM1(PackedFloat32Array, float, resize);
+ VCALL_PARRMEM2R(PackedFloat32Array, float, insert);
+ VCALL_PARRMEM1(PackedFloat32Array, float, remove);
+ VCALL_PARRMEM1(PackedFloat32Array, float, append);
+ VCALL_PARRMEM1(PackedFloat32Array, float, append_array);
+ VCALL_PARRMEM0(PackedFloat32Array, float, invert);
+
+ VCALL_PARRMEM0R(PackedFloat64Array, double, size);
+ VCALL_PARRMEM0R(PackedFloat64Array, double, empty);
+ VCALL_PARRMEM2(PackedFloat64Array, double, set);
+ VCALL_PARRMEM1R(PackedFloat64Array, double, get);
+ VCALL_PARRMEM1(PackedFloat64Array, double, push_back);
+ VCALL_PARRMEM1(PackedFloat64Array, double, resize);
+ VCALL_PARRMEM2R(PackedFloat64Array, double, insert);
+ VCALL_PARRMEM1(PackedFloat64Array, double, remove);
+ VCALL_PARRMEM1(PackedFloat64Array, double, append);
+ VCALL_PARRMEM1(PackedFloat64Array, double, append_array);
+ VCALL_PARRMEM0(PackedFloat64Array, double, invert);
+
+ VCALL_PARRMEM0R(PackedStringArray, String, size);
+ VCALL_PARRMEM0R(PackedStringArray, String, empty);
+ VCALL_PARRMEM2(PackedStringArray, String, set);
+ VCALL_PARRMEM1R(PackedStringArray, String, get);
+ VCALL_PARRMEM1(PackedStringArray, String, push_back);
+ VCALL_PARRMEM1(PackedStringArray, String, resize);
+ VCALL_PARRMEM2R(PackedStringArray, String, insert);
+ VCALL_PARRMEM1(PackedStringArray, String, remove);
+ VCALL_PARRMEM1(PackedStringArray, String, append);
+ VCALL_PARRMEM1(PackedStringArray, String, append_array);
+ VCALL_PARRMEM0(PackedStringArray, String, invert);
+
+ VCALL_PARRMEM0R(PackedVector2Array, Vector2, size);
+ VCALL_PARRMEM0R(PackedVector2Array, Vector2, empty);
+ VCALL_PARRMEM2(PackedVector2Array, Vector2, set);
+ VCALL_PARRMEM1R(PackedVector2Array, Vector2, get);
+ VCALL_PARRMEM1(PackedVector2Array, Vector2, push_back);
+ VCALL_PARRMEM1(PackedVector2Array, Vector2, resize);
+ VCALL_PARRMEM2R(PackedVector2Array, Vector2, insert);
+ VCALL_PARRMEM1(PackedVector2Array, Vector2, remove);
+ VCALL_PARRMEM1(PackedVector2Array, Vector2, append);
+ VCALL_PARRMEM1(PackedVector2Array, Vector2, append_array);
+ VCALL_PARRMEM0(PackedVector2Array, Vector2, invert);
+
+ VCALL_PARRMEM0R(PackedVector3Array, Vector3, size);
+ VCALL_PARRMEM0R(PackedVector3Array, Vector3, empty);
+ VCALL_PARRMEM2(PackedVector3Array, Vector3, set);
+ VCALL_PARRMEM1R(PackedVector3Array, Vector3, get);
+ VCALL_PARRMEM1(PackedVector3Array, Vector3, push_back);
+ VCALL_PARRMEM1(PackedVector3Array, Vector3, resize);
+ VCALL_PARRMEM2R(PackedVector3Array, Vector3, insert);
+ VCALL_PARRMEM1(PackedVector3Array, Vector3, remove);
+ VCALL_PARRMEM1(PackedVector3Array, Vector3, append);
+ VCALL_PARRMEM1(PackedVector3Array, Vector3, append_array);
+ VCALL_PARRMEM0(PackedVector3Array, Vector3, invert);
+
+ VCALL_PARRMEM0R(PackedColorArray, Color, size);
+ VCALL_PARRMEM0R(PackedColorArray, Color, empty);
+ VCALL_PARRMEM2(PackedColorArray, Color, set);
+ VCALL_PARRMEM1R(PackedColorArray, Color, get);
+ VCALL_PARRMEM1(PackedColorArray, Color, push_back);
+ VCALL_PARRMEM1(PackedColorArray, Color, resize);
+ VCALL_PARRMEM2R(PackedColorArray, Color, insert);
+ VCALL_PARRMEM1(PackedColorArray, Color, remove);
+ VCALL_PARRMEM1(PackedColorArray, Color, append);
+ VCALL_PARRMEM1(PackedColorArray, Color, append_array);
+ VCALL_PARRMEM0(PackedColorArray, Color, invert);
#define VCALL_PTR0(m_type, m_method) \
static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { reinterpret_cast<m_type *>(p_self._data._ptr)->m_method(); }
@@ -1236,20 +1285,20 @@ Variant Variant::construct(const Variant::Type p_type, const Variant **p_args, i
// atomic types
case BOOL: return Variant(false);
case INT: return 0;
- case REAL: return 0.0f;
+ case FLOAT: return 0.0f;
case STRING:
return String();
// math types
case VECTOR2:
- return Vector2(); // 5
+ return Vector2();
case RECT2: return Rect2();
case VECTOR3: return Vector3();
case TRANSFORM2D: return Transform2D();
case PLANE: return Plane();
case QUAT: return Quat();
case AABB:
- return ::AABB(); // 10
+ return ::AABB();
case BASIS: return Basis();
case TRANSFORM:
return Transform();
@@ -1257,22 +1306,24 @@ Variant Variant::construct(const Variant::Type p_type, const Variant **p_args, i
// misc types
case COLOR: return Color();
case STRING_NAME:
- return StringName(); // 15
+ return StringName();
case NODE_PATH:
- return NodePath(); // 15
+ return NodePath();
case _RID: return RID();
case OBJECT: return (Object *)NULL;
case CALLABLE: return Callable();
case SIGNAL: return Signal();
case DICTIONARY: return Dictionary();
case ARRAY:
- return Array(); // 20
+ return Array();
case PACKED_BYTE_ARRAY: return PackedByteArray();
- case PACKED_INT_ARRAY: return PackedIntArray();
- case PACKED_REAL_ARRAY: return PackedRealArray();
+ case PACKED_INT32_ARRAY: return PackedInt32Array();
+ case PACKED_INT64_ARRAY: return PackedInt64Array();
+ case PACKED_FLOAT32_ARRAY: return PackedFloat32Array();
+ case PACKED_FLOAT64_ARRAY: return PackedFloat64Array();
case PACKED_STRING_ARRAY: return PackedStringArray();
case PACKED_VECTOR2_ARRAY:
- return PackedVector2Array(); // 25
+ return PackedVector2Array();
case PACKED_VECTOR3_ARRAY: return PackedVector3Array();
case PACKED_COLOR_ARRAY: return PackedColorArray();
default: return Variant();
@@ -1294,7 +1345,7 @@ Variant Variant::construct(const Variant::Type p_type, const Variant **p_args, i
case INT: {
return (int64_t(*p_args[0]));
}
- case REAL: {
+ case FLOAT: {
return real_t(*p_args[0]);
}
case STRING: {
@@ -1313,7 +1364,7 @@ Variant Variant::construct(const Variant::Type p_type, const Variant **p_args, i
case PLANE: return (Plane(*p_args[0]));
case QUAT: return (p_args[0]->operator Quat());
case AABB:
- return (::AABB(*p_args[0])); // 10
+ return (::AABB(*p_args[0]));
case BASIS: return (Basis(p_args[0]->operator Basis()));
case TRANSFORM:
return (Transform(p_args[0]->operator Transform()));
@@ -1321,24 +1372,26 @@ Variant Variant::construct(const Variant::Type p_type, const Variant **p_args, i
// misc types
case COLOR: return p_args[0]->type == Variant::STRING ? Color::html(*p_args[0]) : Color::hex(*p_args[0]);
case STRING_NAME:
- return (StringName(p_args[0]->operator StringName())); // 15
+ return (StringName(p_args[0]->operator StringName()));
case NODE_PATH:
- return (NodePath(p_args[0]->operator NodePath())); // 15
+ return (NodePath(p_args[0]->operator NodePath()));
case _RID: return (RID(*p_args[0]));
case OBJECT: return ((Object *)(p_args[0]->operator Object *()));
case CALLABLE: return ((Callable)(p_args[0]->operator Callable()));
case SIGNAL: return ((Signal)(p_args[0]->operator Signal()));
case DICTIONARY: return p_args[0]->operator Dictionary();
case ARRAY:
- return p_args[0]->operator Array(); // 20
+ return p_args[0]->operator Array();
// arrays
case PACKED_BYTE_ARRAY: return (PackedByteArray(*p_args[0]));
- case PACKED_INT_ARRAY: return (PackedIntArray(*p_args[0]));
- case PACKED_REAL_ARRAY: return (PackedRealArray(*p_args[0]));
+ case PACKED_INT32_ARRAY: return (PackedInt32Array(*p_args[0]));
+ case PACKED_INT64_ARRAY: return (PackedInt64Array(*p_args[0]));
+ case PACKED_FLOAT32_ARRAY: return (PackedFloat32Array(*p_args[0]));
+ case PACKED_FLOAT64_ARRAY: return (PackedFloat64Array(*p_args[0]));
case PACKED_STRING_ARRAY: return (PackedStringArray(*p_args[0]));
case PACKED_VECTOR2_ARRAY:
- return (PackedVector2Array(*p_args[0])); // 25
+ return (PackedVector2Array(*p_args[0]));
case PACKED_VECTOR3_ARRAY: return (PackedVector3Array(*p_args[0]));
case PACKED_COLOR_ARRAY: return (PackedColorArray(*p_args[0]));
default: return Variant();
@@ -1672,7 +1725,7 @@ void register_variant_methods() {
ADDFUNC1R(STRING, BOOL, String, is_subsequence_of, STRING, "text", varray());
ADDFUNC1R(STRING, BOOL, String, is_subsequence_ofi, STRING, "text", varray());
ADDFUNC0R(STRING, PACKED_STRING_ARRAY, String, bigrams, varray());
- ADDFUNC1R(STRING, REAL, String, similarity, STRING, "text", varray());
+ ADDFUNC1R(STRING, FLOAT, String, similarity, STRING, "text", varray());
ADDFUNC2R(STRING, STRING, String, format, NIL, "values", STRING, "placeholder", varray("{_}"));
ADDFUNC2R(STRING, STRING, String, replace, STRING, "what", STRING, "forwhat", varray());
@@ -1682,7 +1735,7 @@ void register_variant_methods() {
ADDFUNC0R(STRING, STRING, String, capitalize, varray());
ADDFUNC3R(STRING, PACKED_STRING_ARRAY, String, split, STRING, "delimiter", BOOL, "allow_empty", INT, "maxsplit", varray(true, 0));
ADDFUNC3R(STRING, PACKED_STRING_ARRAY, String, rsplit, STRING, "delimiter", BOOL, "allow_empty", INT, "maxsplit", varray(true, 0));
- ADDFUNC2R(STRING, PACKED_REAL_ARRAY, String, split_floats, STRING, "delimiter", BOOL, "allow_empty", varray(true));
+ ADDFUNC2R(STRING, PACKED_FLOAT32_ARRAY, String, split_floats, STRING, "delimiter", BOOL, "allow_empty", varray(true));
ADDFUNC0R(STRING, STRING, String, to_upper, varray());
ADDFUNC0R(STRING, STRING, String, to_lower, varray());
@@ -1729,7 +1782,7 @@ void register_variant_methods() {
ADDFUNC0R(STRING, BOOL, String, is_valid_ip_address, varray());
ADDFUNC0R(STRING, BOOL, String, is_valid_filename, varray());
ADDFUNC0R(STRING, INT, String, to_int, varray());
- ADDFUNC0R(STRING, REAL, String, to_float, varray());
+ ADDFUNC0R(STRING, FLOAT, String, to_float, varray());
ADDFUNC0R(STRING, INT, String, hex_to_int, varray());
ADDFUNC1R(STRING, STRING, String, pad_decimals, INT, "digits", varray());
ADDFUNC1R(STRING, STRING, String, pad_zeros, INT, "digits", varray());
@@ -1739,45 +1792,45 @@ void register_variant_methods() {
ADDFUNC0R(STRING, PACKED_BYTE_ARRAY, String, to_ascii, varray());
ADDFUNC0R(STRING, PACKED_BYTE_ARRAY, String, to_utf8, varray());
- ADDFUNC0R(VECTOR2, REAL, Vector2, angle, varray());
- ADDFUNC1R(VECTOR2, REAL, Vector2, angle_to, VECTOR2, "to", varray());
- ADDFUNC1R(VECTOR2, REAL, Vector2, angle_to_point, VECTOR2, "to", varray());
+ ADDFUNC0R(VECTOR2, FLOAT, Vector2, angle, varray());
+ ADDFUNC1R(VECTOR2, FLOAT, Vector2, angle_to, VECTOR2, "to", varray());
+ ADDFUNC1R(VECTOR2, FLOAT, Vector2, angle_to_point, VECTOR2, "to", varray());
ADDFUNC1R(VECTOR2, VECTOR2, Vector2, direction_to, VECTOR2, "b", varray());
- ADDFUNC1R(VECTOR2, REAL, Vector2, distance_to, VECTOR2, "to", varray());
- ADDFUNC1R(VECTOR2, REAL, Vector2, distance_squared_to, VECTOR2, "to", varray());
- ADDFUNC0R(VECTOR2, REAL, Vector2, length, varray());
- ADDFUNC0R(VECTOR2, REAL, Vector2, length_squared, varray());
+ ADDFUNC1R(VECTOR2, FLOAT, Vector2, distance_to, VECTOR2, "to", varray());
+ ADDFUNC1R(VECTOR2, FLOAT, Vector2, distance_squared_to, VECTOR2, "to", varray());
+ ADDFUNC0R(VECTOR2, FLOAT, Vector2, length, varray());
+ ADDFUNC0R(VECTOR2, FLOAT, Vector2, length_squared, varray());
ADDFUNC0R(VECTOR2, VECTOR2, Vector2, normalized, varray());
ADDFUNC0R(VECTOR2, BOOL, Vector2, is_normalized, varray());
ADDFUNC1R(VECTOR2, BOOL, Vector2, is_equal_approx, VECTOR2, "v", varray());
- ADDFUNC1R(VECTOR2, VECTOR2, Vector2, posmod, REAL, "mod", varray());
+ ADDFUNC1R(VECTOR2, VECTOR2, Vector2, posmod, FLOAT, "mod", varray());
ADDFUNC1R(VECTOR2, VECTOR2, Vector2, posmodv, VECTOR2, "modv", varray());
ADDFUNC1R(VECTOR2, VECTOR2, Vector2, project, VECTOR2, "b", varray());
- ADDFUNC2R(VECTOR2, VECTOR2, Vector2, linear_interpolate, VECTOR2, "b", REAL, "t", varray());
- ADDFUNC2R(VECTOR2, VECTOR2, Vector2, slerp, VECTOR2, "b", REAL, "t", varray());
- ADDFUNC4R(VECTOR2, VECTOR2, Vector2, cubic_interpolate, VECTOR2, "b", VECTOR2, "pre_a", VECTOR2, "post_b", REAL, "t", varray());
- ADDFUNC2R(VECTOR2, VECTOR2, Vector2, move_toward, VECTOR2, "to", REAL, "delta", varray());
- ADDFUNC1R(VECTOR2, VECTOR2, Vector2, rotated, REAL, "phi", varray());
+ ADDFUNC2R(VECTOR2, VECTOR2, Vector2, linear_interpolate, VECTOR2, "b", FLOAT, "t", varray());
+ ADDFUNC2R(VECTOR2, VECTOR2, Vector2, slerp, VECTOR2, "b", FLOAT, "t", varray());
+ ADDFUNC4R(VECTOR2, VECTOR2, Vector2, cubic_interpolate, VECTOR2, "b", VECTOR2, "pre_a", VECTOR2, "post_b", FLOAT, "t", varray());
+ ADDFUNC2R(VECTOR2, VECTOR2, Vector2, move_toward, VECTOR2, "to", FLOAT, "delta", varray());
+ ADDFUNC1R(VECTOR2, VECTOR2, Vector2, rotated, FLOAT, "phi", varray());
ADDFUNC0R(VECTOR2, VECTOR2, Vector2, tangent, varray());
ADDFUNC0R(VECTOR2, VECTOR2, Vector2, floor, varray());
ADDFUNC0R(VECTOR2, VECTOR2, Vector2, ceil, varray());
ADDFUNC0R(VECTOR2, VECTOR2, Vector2, round, varray());
ADDFUNC1R(VECTOR2, VECTOR2, Vector2, snapped, VECTOR2, "by", varray());
- ADDFUNC0R(VECTOR2, REAL, Vector2, aspect, varray());
- ADDFUNC1R(VECTOR2, REAL, Vector2, dot, VECTOR2, "with", varray());
+ ADDFUNC0R(VECTOR2, FLOAT, Vector2, aspect, varray());
+ ADDFUNC1R(VECTOR2, FLOAT, Vector2, dot, VECTOR2, "with", varray());
ADDFUNC1R(VECTOR2, VECTOR2, Vector2, slide, VECTOR2, "n", varray());
ADDFUNC1R(VECTOR2, VECTOR2, Vector2, bounce, VECTOR2, "n", varray());
ADDFUNC1R(VECTOR2, VECTOR2, Vector2, reflect, VECTOR2, "n", varray());
- ADDFUNC1R(VECTOR2, REAL, Vector2, cross, VECTOR2, "with", varray());
+ ADDFUNC1R(VECTOR2, FLOAT, Vector2, cross, VECTOR2, "with", varray());
ADDFUNC0R(VECTOR2, VECTOR2, Vector2, abs, varray());
- ADDFUNC1R(VECTOR2, VECTOR2, Vector2, clamped, REAL, "length", varray());
+ ADDFUNC1R(VECTOR2, VECTOR2, Vector2, clamped, FLOAT, "length", varray());
ADDFUNC0R(VECTOR2, VECTOR2, Vector2, sign, varray());
- ADDFUNC0R(VECTOR2I, REAL, Vector2i, aspect, varray());
+ ADDFUNC0R(VECTOR2I, FLOAT, Vector2i, aspect, varray());
ADDFUNC0R(VECTOR2I, VECTOR2I, Vector2i, sign, varray());
ADDFUNC0R(VECTOR2I, VECTOR2I, Vector2i, abs, varray());
- ADDFUNC0R(RECT2, REAL, Rect2, get_area, varray());
+ ADDFUNC0R(RECT2, FLOAT, Rect2, get_area, varray());
ADDFUNC0R(RECT2, BOOL, Rect2, has_no_area, varray());
ADDFUNC1R(RECT2, BOOL, Rect2, has_point, VECTOR2, "point", varray());
ADDFUNC1R(RECT2, BOOL, Rect2, is_equal_approx, RECT2, "rect", varray());
@@ -1786,9 +1839,9 @@ void register_variant_methods() {
ADDFUNC1R(RECT2, RECT2, Rect2, clip, RECT2, "b", varray());
ADDFUNC1R(RECT2, RECT2, Rect2, merge, RECT2, "b", varray());
ADDFUNC1R(RECT2, RECT2, Rect2, expand, VECTOR2, "to", varray());
- ADDFUNC1R(RECT2, RECT2, Rect2, grow, REAL, "by", varray());
- ADDFUNC2R(RECT2, RECT2, Rect2, grow_margin, INT, "margin", REAL, "by", varray());
- ADDFUNC4R(RECT2, RECT2, Rect2, grow_individual, REAL, "left", REAL, "top", REAL, "right", REAL, " bottom", varray());
+ ADDFUNC1R(RECT2, RECT2, Rect2, grow, FLOAT, "by", varray());
+ ADDFUNC2R(RECT2, RECT2, Rect2, grow_margin, INT, "margin", FLOAT, "by", varray());
+ ADDFUNC4R(RECT2, RECT2, Rect2, grow_individual, FLOAT, "left", FLOAT, "top", FLOAT, "right", FLOAT, " bottom", varray());
ADDFUNC0R(RECT2, RECT2, Rect2, abs, varray());
ADDFUNC0R(RECT2I, INT, Rect2i, get_area, varray());
@@ -1806,23 +1859,23 @@ void register_variant_methods() {
ADDFUNC0R(VECTOR3, INT, Vector3, min_axis, varray());
ADDFUNC0R(VECTOR3, INT, Vector3, max_axis, varray());
- ADDFUNC1R(VECTOR3, REAL, Vector3, angle_to, VECTOR3, "to", varray());
+ ADDFUNC1R(VECTOR3, FLOAT, Vector3, angle_to, VECTOR3, "to", varray());
ADDFUNC1R(VECTOR3, VECTOR3, Vector3, direction_to, VECTOR3, "b", varray());
- ADDFUNC1R(VECTOR3, REAL, Vector3, distance_to, VECTOR3, "b", varray());
- ADDFUNC1R(VECTOR3, REAL, Vector3, distance_squared_to, VECTOR3, "b", varray());
- ADDFUNC0R(VECTOR3, REAL, Vector3, length, varray());
- ADDFUNC0R(VECTOR3, REAL, Vector3, length_squared, varray());
+ ADDFUNC1R(VECTOR3, FLOAT, Vector3, distance_to, VECTOR3, "b", varray());
+ ADDFUNC1R(VECTOR3, FLOAT, Vector3, distance_squared_to, VECTOR3, "b", varray());
+ ADDFUNC0R(VECTOR3, FLOAT, Vector3, length, varray());
+ ADDFUNC0R(VECTOR3, FLOAT, Vector3, length_squared, varray());
ADDFUNC0R(VECTOR3, VECTOR3, Vector3, normalized, varray());
ADDFUNC0R(VECTOR3, BOOL, Vector3, is_normalized, varray());
ADDFUNC1R(VECTOR3, BOOL, Vector3, is_equal_approx, VECTOR3, "v", varray());
ADDFUNC0R(VECTOR3, VECTOR3, Vector3, inverse, varray());
ADDFUNC1R(VECTOR3, VECTOR3, Vector3, snapped, VECTOR3, "by", varray());
- ADDFUNC2R(VECTOR3, VECTOR3, Vector3, rotated, VECTOR3, "axis", REAL, "phi", varray());
- ADDFUNC2R(VECTOR3, VECTOR3, Vector3, linear_interpolate, VECTOR3, "b", REAL, "t", varray());
- ADDFUNC2R(VECTOR3, VECTOR3, Vector3, slerp, VECTOR3, "b", REAL, "t", varray());
- ADDFUNC4R(VECTOR3, VECTOR3, Vector3, cubic_interpolate, VECTOR3, "b", VECTOR3, "pre_a", VECTOR3, "post_b", REAL, "t", varray());
- ADDFUNC2R(VECTOR3, VECTOR3, Vector3, move_toward, VECTOR3, "to", REAL, "delta", varray());
- ADDFUNC1R(VECTOR3, REAL, Vector3, dot, VECTOR3, "b", varray());
+ ADDFUNC2R(VECTOR3, VECTOR3, Vector3, rotated, VECTOR3, "axis", FLOAT, "phi", varray());
+ ADDFUNC2R(VECTOR3, VECTOR3, Vector3, linear_interpolate, VECTOR3, "b", FLOAT, "t", varray());
+ ADDFUNC2R(VECTOR3, VECTOR3, Vector3, slerp, VECTOR3, "b", FLOAT, "t", varray());
+ ADDFUNC4R(VECTOR3, VECTOR3, Vector3, cubic_interpolate, VECTOR3, "b", VECTOR3, "pre_a", VECTOR3, "post_b", FLOAT, "t", varray());
+ ADDFUNC2R(VECTOR3, VECTOR3, Vector3, move_toward, VECTOR3, "to", FLOAT, "delta", varray());
+ ADDFUNC1R(VECTOR3, FLOAT, Vector3, dot, VECTOR3, "b", varray());
ADDFUNC1R(VECTOR3, VECTOR3, Vector3, cross, VECTOR3, "b", varray());
ADDFUNC1R(VECTOR3, BASIS, Vector3, outer, VECTOR3, "b", varray());
ADDFUNC0R(VECTOR3, BASIS, Vector3, to_diagonal_matrix, varray());
@@ -1830,7 +1883,7 @@ void register_variant_methods() {
ADDFUNC0R(VECTOR3, VECTOR3, Vector3, floor, varray());
ADDFUNC0R(VECTOR3, VECTOR3, Vector3, ceil, varray());
ADDFUNC0R(VECTOR3, VECTOR3, Vector3, round, varray());
- ADDFUNC1R(VECTOR3, VECTOR3, Vector3, posmod, REAL, "mod", varray());
+ ADDFUNC1R(VECTOR3, VECTOR3, Vector3, posmod, FLOAT, "mod", varray());
ADDFUNC1R(VECTOR3, VECTOR3, Vector3, posmodv, VECTOR3, "modv", varray());
ADDFUNC1R(VECTOR3, VECTOR3, Vector3, project, VECTOR3, "b", varray());
ADDFUNC1R(VECTOR3, VECTOR3, Vector3, slide, VECTOR3, "n", varray());
@@ -1847,27 +1900,27 @@ void register_variant_methods() {
ADDFUNC0R(PLANE, VECTOR3, Plane, get_any_point, varray());
ADDFUNC1R(PLANE, BOOL, Plane, is_equal_approx, PLANE, "plane", varray());
ADDFUNC1R(PLANE, BOOL, Plane, is_point_over, VECTOR3, "point", varray());
- ADDFUNC1R(PLANE, REAL, Plane, distance_to, VECTOR3, "point", varray());
- ADDFUNC2R(PLANE, BOOL, Plane, has_point, VECTOR3, "point", REAL, "epsilon", varray(CMP_EPSILON));
+ ADDFUNC1R(PLANE, FLOAT, Plane, distance_to, VECTOR3, "point", varray());
+ ADDFUNC2R(PLANE, BOOL, Plane, has_point, VECTOR3, "point", FLOAT, "epsilon", varray(CMP_EPSILON));
ADDFUNC1R(PLANE, VECTOR3, Plane, project, VECTOR3, "point", varray());
ADDFUNC2R(PLANE, VECTOR3, Plane, intersect_3, PLANE, "b", PLANE, "c", varray());
ADDFUNC2R(PLANE, VECTOR3, Plane, intersects_ray, VECTOR3, "from", VECTOR3, "dir", varray());
ADDFUNC2R(PLANE, VECTOR3, Plane, intersects_segment, VECTOR3, "begin", VECTOR3, "end", varray());
- ADDFUNC0R(QUAT, REAL, Quat, length, varray());
- ADDFUNC0R(QUAT, REAL, Quat, length_squared, varray());
+ ADDFUNC0R(QUAT, FLOAT, Quat, length, varray());
+ ADDFUNC0R(QUAT, FLOAT, Quat, length_squared, varray());
ADDFUNC0R(QUAT, QUAT, Quat, normalized, varray());
ADDFUNC0R(QUAT, BOOL, Quat, is_normalized, varray());
ADDFUNC1R(QUAT, BOOL, Quat, is_equal_approx, QUAT, "quat", varray());
ADDFUNC0R(QUAT, QUAT, Quat, inverse, varray());
- ADDFUNC1R(QUAT, REAL, Quat, dot, QUAT, "b", varray());
+ ADDFUNC1R(QUAT, FLOAT, Quat, dot, QUAT, "b", varray());
ADDFUNC1R(QUAT, VECTOR3, Quat, xform, VECTOR3, "v", varray());
- ADDFUNC2R(QUAT, QUAT, Quat, slerp, QUAT, "b", REAL, "t", varray());
- ADDFUNC2R(QUAT, QUAT, Quat, slerpni, QUAT, "b", REAL, "t", varray());
- ADDFUNC4R(QUAT, QUAT, Quat, cubic_slerp, QUAT, "b", QUAT, "pre_a", QUAT, "post_b", REAL, "t", varray());
+ ADDFUNC2R(QUAT, QUAT, Quat, slerp, QUAT, "b", FLOAT, "t", varray());
+ ADDFUNC2R(QUAT, QUAT, Quat, slerpni, QUAT, "b", FLOAT, "t", varray());
+ ADDFUNC4R(QUAT, QUAT, Quat, cubic_slerp, QUAT, "b", QUAT, "pre_a", QUAT, "post_b", FLOAT, "t", varray());
ADDFUNC0R(QUAT, VECTOR3, Quat, get_euler, varray());
ADDFUNC1(QUAT, NIL, Quat, set_euler, VECTOR3, "euler", varray());
- ADDFUNC2(QUAT, NIL, Quat, set_axis_angle, VECTOR3, "axis", REAL, "angle", varray());
+ ADDFUNC2(QUAT, NIL, Quat, set_axis_angle, VECTOR3, "axis", FLOAT, "angle", varray());
ADDFUNC0R(COLOR, INT, Color, to_argb32, varray());
ADDFUNC0R(COLOR, INT, Color, to_abgr32, varray());
@@ -1877,12 +1930,12 @@ void register_variant_methods() {
ADDFUNC0R(COLOR, INT, Color, to_rgba64, varray());
ADDFUNC0R(COLOR, COLOR, Color, inverted, varray());
ADDFUNC0R(COLOR, COLOR, Color, contrasted, varray());
- ADDFUNC2R(COLOR, COLOR, Color, linear_interpolate, COLOR, "b", REAL, "t", varray());
+ ADDFUNC2R(COLOR, COLOR, Color, linear_interpolate, COLOR, "b", FLOAT, "t", varray());
ADDFUNC1R(COLOR, COLOR, Color, blend, COLOR, "over", varray());
- ADDFUNC1R(COLOR, COLOR, Color, lightened, REAL, "amount", varray());
- ADDFUNC1R(COLOR, COLOR, Color, darkened, REAL, "amount", varray());
+ ADDFUNC1R(COLOR, COLOR, Color, lightened, FLOAT, "amount", varray());
+ ADDFUNC1R(COLOR, COLOR, Color, darkened, FLOAT, "amount", varray());
ADDFUNC1R(COLOR, STRING, Color, to_html, BOOL, "with_alpha", varray(true));
- ADDFUNC4R(COLOR, COLOR, Color, from_hsv, REAL, "h", REAL, "s", REAL, "v", REAL, "a", varray(1.0));
+ ADDFUNC4R(COLOR, COLOR, Color, from_hsv, FLOAT, "h", FLOAT, "s", FLOAT, "v", FLOAT, "a", varray(1.0));
ADDFUNC1R(COLOR, BOOL, Color, is_equal_approx, COLOR, "color", varray());
ADDFUNC0R(_RID, INT, RID, get_id, varray());
@@ -1976,27 +2029,49 @@ void register_variant_methods() {
ADDFUNC1R(PACKED_BYTE_ARRAY, PACKED_BYTE_ARRAY, PackedByteArray, compress, INT, "compression_mode", varray(0));
ADDFUNC2R(PACKED_BYTE_ARRAY, PACKED_BYTE_ARRAY, PackedByteArray, decompress, INT, "buffer_size", INT, "compression_mode", varray(0));
- ADDFUNC0R(PACKED_INT_ARRAY, INT, PackedIntArray, size, varray());
- ADDFUNC0R(PACKED_INT_ARRAY, BOOL, PackedIntArray, empty, varray());
- ADDFUNC2(PACKED_INT_ARRAY, NIL, PackedIntArray, set, INT, "idx", INT, "integer", varray());
- ADDFUNC1(PACKED_INT_ARRAY, NIL, PackedIntArray, push_back, INT, "integer", varray());
- ADDFUNC1(PACKED_INT_ARRAY, NIL, PackedIntArray, append, INT, "integer", varray());
- ADDFUNC1(PACKED_INT_ARRAY, NIL, PackedIntArray, append_array, PACKED_INT_ARRAY, "array", varray());
- ADDFUNC1(PACKED_INT_ARRAY, NIL, PackedIntArray, remove, INT, "idx", varray());
- ADDFUNC2R(PACKED_INT_ARRAY, INT, PackedIntArray, insert, INT, "idx", INT, "integer", varray());
- ADDFUNC1(PACKED_INT_ARRAY, NIL, PackedIntArray, resize, INT, "idx", varray());
- ADDFUNC0(PACKED_INT_ARRAY, NIL, PackedIntArray, invert, varray());
-
- ADDFUNC0R(PACKED_REAL_ARRAY, INT, PackedRealArray, size, varray());
- ADDFUNC0R(PACKED_REAL_ARRAY, BOOL, PackedRealArray, empty, varray());
- ADDFUNC2(PACKED_REAL_ARRAY, NIL, PackedRealArray, set, INT, "idx", REAL, "value", varray());
- ADDFUNC1(PACKED_REAL_ARRAY, NIL, PackedRealArray, push_back, REAL, "value", varray());
- ADDFUNC1(PACKED_REAL_ARRAY, NIL, PackedRealArray, append, REAL, "value", varray());
- ADDFUNC1(PACKED_REAL_ARRAY, NIL, PackedRealArray, append_array, PACKED_REAL_ARRAY, "array", varray());
- ADDFUNC1(PACKED_REAL_ARRAY, NIL, PackedRealArray, remove, INT, "idx", varray());
- ADDFUNC2R(PACKED_REAL_ARRAY, INT, PackedRealArray, insert, INT, "idx", REAL, "value", varray());
- ADDFUNC1(PACKED_REAL_ARRAY, NIL, PackedRealArray, resize, INT, "idx", varray());
- ADDFUNC0(PACKED_REAL_ARRAY, NIL, PackedRealArray, invert, varray());
+ ADDFUNC0R(PACKED_INT32_ARRAY, INT, PackedInt32Array, size, varray());
+ ADDFUNC0R(PACKED_INT32_ARRAY, BOOL, PackedInt32Array, empty, varray());
+ ADDFUNC2(PACKED_INT32_ARRAY, NIL, PackedInt32Array, set, INT, "idx", INT, "integer", varray());
+ ADDFUNC1(PACKED_INT32_ARRAY, NIL, PackedInt32Array, push_back, INT, "integer", varray());
+ ADDFUNC1(PACKED_INT32_ARRAY, NIL, PackedInt32Array, append, INT, "integer", varray());
+ ADDFUNC1(PACKED_INT32_ARRAY, NIL, PackedInt32Array, append_array, PACKED_INT32_ARRAY, "array", varray());
+ ADDFUNC1(PACKED_INT32_ARRAY, NIL, PackedInt32Array, remove, INT, "idx", varray());
+ ADDFUNC2R(PACKED_INT32_ARRAY, INT, PackedInt32Array, insert, INT, "idx", INT, "integer", varray());
+ ADDFUNC1(PACKED_INT32_ARRAY, NIL, PackedInt32Array, resize, INT, "idx", varray());
+ ADDFUNC0(PACKED_INT32_ARRAY, NIL, PackedInt32Array, invert, varray());
+
+ ADDFUNC0R(PACKED_INT64_ARRAY, INT, PackedInt64Array, size, varray());
+ ADDFUNC0R(PACKED_INT64_ARRAY, BOOL, PackedInt64Array, empty, varray());
+ ADDFUNC2(PACKED_INT64_ARRAY, NIL, PackedInt64Array, set, INT, "idx", INT, "integer", varray());
+ ADDFUNC1(PACKED_INT64_ARRAY, NIL, PackedInt64Array, push_back, INT, "integer", varray());
+ ADDFUNC1(PACKED_INT64_ARRAY, NIL, PackedInt64Array, append, INT, "integer", varray());
+ ADDFUNC1(PACKED_INT64_ARRAY, NIL, PackedInt64Array, append_array, PACKED_INT64_ARRAY, "array", varray());
+ ADDFUNC1(PACKED_INT64_ARRAY, NIL, PackedInt64Array, remove, INT, "idx", varray());
+ ADDFUNC2R(PACKED_INT64_ARRAY, INT, PackedInt64Array, insert, INT, "idx", INT, "integer", varray());
+ ADDFUNC1(PACKED_INT64_ARRAY, NIL, PackedInt64Array, resize, INT, "idx", varray());
+ ADDFUNC0(PACKED_INT64_ARRAY, NIL, PackedInt64Array, invert, varray());
+
+ ADDFUNC0R(PACKED_FLOAT32_ARRAY, INT, PackedFloat32Array, size, varray());
+ ADDFUNC0R(PACKED_FLOAT32_ARRAY, BOOL, PackedFloat32Array, empty, varray());
+ ADDFUNC2(PACKED_FLOAT32_ARRAY, NIL, PackedFloat32Array, set, INT, "idx", FLOAT, "value", varray());
+ ADDFUNC1(PACKED_FLOAT32_ARRAY, NIL, PackedFloat32Array, push_back, FLOAT, "value", varray());
+ ADDFUNC1(PACKED_FLOAT32_ARRAY, NIL, PackedFloat32Array, append, FLOAT, "value", varray());
+ ADDFUNC1(PACKED_FLOAT32_ARRAY, NIL, PackedFloat32Array, append_array, PACKED_FLOAT32_ARRAY, "array", varray());
+ ADDFUNC1(PACKED_FLOAT32_ARRAY, NIL, PackedFloat32Array, remove, INT, "idx", varray());
+ ADDFUNC2R(PACKED_FLOAT32_ARRAY, INT, PackedFloat32Array, insert, INT, "idx", FLOAT, "value", varray());
+ ADDFUNC1(PACKED_FLOAT32_ARRAY, NIL, PackedFloat32Array, resize, INT, "idx", varray());
+ ADDFUNC0(PACKED_FLOAT32_ARRAY, NIL, PackedFloat32Array, invert, varray());
+
+ ADDFUNC0R(PACKED_FLOAT64_ARRAY, INT, PackedFloat64Array, size, varray());
+ ADDFUNC0R(PACKED_FLOAT64_ARRAY, BOOL, PackedFloat64Array, empty, varray());
+ ADDFUNC2(PACKED_FLOAT64_ARRAY, NIL, PackedFloat64Array, set, INT, "idx", FLOAT, "value", varray());
+ ADDFUNC1(PACKED_FLOAT64_ARRAY, NIL, PackedFloat64Array, push_back, FLOAT, "value", varray());
+ ADDFUNC1(PACKED_FLOAT64_ARRAY, NIL, PackedFloat64Array, append, FLOAT, "value", varray());
+ ADDFUNC1(PACKED_FLOAT64_ARRAY, NIL, PackedFloat64Array, append_array, PACKED_FLOAT64_ARRAY, "array", varray());
+ ADDFUNC1(PACKED_FLOAT64_ARRAY, NIL, PackedFloat64Array, remove, INT, "idx", varray());
+ ADDFUNC2R(PACKED_FLOAT64_ARRAY, INT, PackedFloat64Array, insert, INT, "idx", FLOAT, "value", varray());
+ ADDFUNC1(PACKED_FLOAT64_ARRAY, NIL, PackedFloat64Array, resize, INT, "idx", varray());
+ ADDFUNC0(PACKED_FLOAT64_ARRAY, NIL, PackedFloat64Array, invert, varray());
ADDFUNC0R(PACKED_STRING_ARRAY, INT, PackedStringArray, size, varray());
ADDFUNC0R(PACKED_STRING_ARRAY, BOOL, PackedStringArray, empty, varray());
@@ -2044,7 +2119,7 @@ void register_variant_methods() {
//pointerbased
- ADDFUNC0R(AABB, REAL, AABB, get_area, varray());
+ ADDFUNC0R(AABB, FLOAT, AABB, get_area, varray());
ADDFUNC0R(AABB, BOOL, AABB, has_no_area, varray());
ADDFUNC0R(AABB, BOOL, AABB, has_no_surface, varray());
ADDFUNC1R(AABB, BOOL, AABB, has_point, VECTOR3, "point", varray());
@@ -2056,94 +2131,94 @@ void register_variant_methods() {
ADDFUNC1R(AABB, AABB, AABB, intersection, AABB, "with", varray());
ADDFUNC1R(AABB, AABB, AABB, merge, AABB, "with", varray());
ADDFUNC1R(AABB, AABB, AABB, expand, VECTOR3, "to_point", varray());
- ADDFUNC1R(AABB, AABB, AABB, grow, REAL, "by", varray());
+ ADDFUNC1R(AABB, AABB, AABB, grow, FLOAT, "by", varray());
ADDFUNC1R(AABB, VECTOR3, AABB, get_support, VECTOR3, "dir", varray());
ADDFUNC0R(AABB, VECTOR3, AABB, get_longest_axis, varray());
ADDFUNC0R(AABB, INT, AABB, get_longest_axis_index, varray());
- ADDFUNC0R(AABB, REAL, AABB, get_longest_axis_size, varray());
+ ADDFUNC0R(AABB, FLOAT, AABB, get_longest_axis_size, varray());
ADDFUNC0R(AABB, VECTOR3, AABB, get_shortest_axis, varray());
ADDFUNC0R(AABB, INT, AABB, get_shortest_axis_index, varray());
- ADDFUNC0R(AABB, REAL, AABB, get_shortest_axis_size, varray());
+ ADDFUNC0R(AABB, FLOAT, AABB, get_shortest_axis_size, varray());
ADDFUNC1R(AABB, VECTOR3, AABB, get_endpoint, INT, "idx", varray());
ADDFUNC0R(TRANSFORM2D, TRANSFORM2D, Transform2D, inverse, varray());
ADDFUNC0R(TRANSFORM2D, TRANSFORM2D, Transform2D, affine_inverse, varray());
- ADDFUNC0R(TRANSFORM2D, REAL, Transform2D, get_rotation, varray());
+ ADDFUNC0R(TRANSFORM2D, FLOAT, Transform2D, get_rotation, varray());
ADDFUNC0R(TRANSFORM2D, VECTOR2, Transform2D, get_origin, varray());
ADDFUNC0R(TRANSFORM2D, VECTOR2, Transform2D, get_scale, varray());
ADDFUNC0R(TRANSFORM2D, TRANSFORM2D, Transform2D, orthonormalized, varray());
- ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, rotated, REAL, "phi", varray());
+ ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, rotated, FLOAT, "phi", varray());
ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, scaled, VECTOR2, "scale", varray());
ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, translated, VECTOR2, "offset", varray());
ADDFUNC1R(TRANSFORM2D, NIL, Transform2D, xform, NIL, "v", varray());
ADDFUNC1R(TRANSFORM2D, NIL, Transform2D, xform_inv, NIL, "v", varray());
ADDFUNC1R(TRANSFORM2D, VECTOR2, Transform2D, basis_xform, VECTOR2, "v", varray());
ADDFUNC1R(TRANSFORM2D, VECTOR2, Transform2D, basis_xform_inv, VECTOR2, "v", varray());
- ADDFUNC2R(TRANSFORM2D, TRANSFORM2D, Transform2D, interpolate_with, TRANSFORM2D, "transform", REAL, "weight", varray());
+ ADDFUNC2R(TRANSFORM2D, TRANSFORM2D, Transform2D, interpolate_with, TRANSFORM2D, "transform", FLOAT, "weight", varray());
ADDFUNC1R(TRANSFORM2D, BOOL, Transform2D, is_equal_approx, TRANSFORM2D, "transform", varray());
ADDFUNC0R(BASIS, BASIS, Basis, inverse, varray());
ADDFUNC0R(BASIS, BASIS, Basis, transposed, varray());
ADDFUNC0R(BASIS, BASIS, Basis, orthonormalized, varray());
- ADDFUNC0R(BASIS, REAL, Basis, determinant, varray());
- ADDFUNC2R(BASIS, BASIS, Basis, rotated, VECTOR3, "axis", REAL, "phi", varray());
+ ADDFUNC0R(BASIS, FLOAT, Basis, determinant, varray());
+ ADDFUNC2R(BASIS, BASIS, Basis, rotated, VECTOR3, "axis", FLOAT, "phi", varray());
ADDFUNC1R(BASIS, BASIS, Basis, scaled, VECTOR3, "scale", varray());
ADDFUNC0R(BASIS, VECTOR3, Basis, get_scale, varray());
ADDFUNC0R(BASIS, VECTOR3, Basis, get_euler, varray());
- ADDFUNC1R(BASIS, REAL, Basis, tdotx, VECTOR3, "with", varray());
- ADDFUNC1R(BASIS, REAL, Basis, tdoty, VECTOR3, "with", varray());
- ADDFUNC1R(BASIS, REAL, Basis, tdotz, VECTOR3, "with", varray());
+ ADDFUNC1R(BASIS, FLOAT, Basis, tdotx, VECTOR3, "with", varray());
+ ADDFUNC1R(BASIS, FLOAT, Basis, tdoty, VECTOR3, "with", varray());
+ ADDFUNC1R(BASIS, FLOAT, Basis, tdotz, VECTOR3, "with", varray());
ADDFUNC1R(BASIS, VECTOR3, Basis, xform, VECTOR3, "v", varray());
ADDFUNC1R(BASIS, VECTOR3, Basis, xform_inv, VECTOR3, "v", varray());
ADDFUNC0R(BASIS, INT, Basis, get_orthogonal_index, varray());
- ADDFUNC2R(BASIS, BASIS, Basis, slerp, BASIS, "b", REAL, "t", varray());
- ADDFUNC2R(BASIS, BOOL, Basis, is_equal_approx, BASIS, "b", REAL, "epsilon", varray(CMP_EPSILON)); // TODO: Replace in 4.0, see other TODO.
+ ADDFUNC2R(BASIS, BASIS, Basis, slerp, BASIS, "b", FLOAT, "t", varray());
+ ADDFUNC2R(BASIS, BOOL, Basis, is_equal_approx, BASIS, "b", FLOAT, "epsilon", varray(CMP_EPSILON)); // TODO: Replace in 4.0, see other TODO.
ADDFUNC0R(BASIS, QUAT, Basis, get_rotation_quat, varray());
ADDFUNC0R(TRANSFORM, TRANSFORM, Transform, inverse, varray());
ADDFUNC0R(TRANSFORM, TRANSFORM, Transform, affine_inverse, varray());
ADDFUNC0R(TRANSFORM, TRANSFORM, Transform, orthonormalized, varray());
- ADDFUNC2R(TRANSFORM, TRANSFORM, Transform, rotated, VECTOR3, "axis", REAL, "phi", varray());
+ ADDFUNC2R(TRANSFORM, TRANSFORM, Transform, rotated, VECTOR3, "axis", FLOAT, "phi", varray());
ADDFUNC1R(TRANSFORM, TRANSFORM, Transform, scaled, VECTOR3, "scale", varray());
ADDFUNC1R(TRANSFORM, TRANSFORM, Transform, translated, VECTOR3, "offset", varray());
ADDFUNC2R(TRANSFORM, TRANSFORM, Transform, looking_at, VECTOR3, "target", VECTOR3, "up", varray());
- ADDFUNC2R(TRANSFORM, TRANSFORM, Transform, interpolate_with, TRANSFORM, "transform", REAL, "weight", varray());
+ ADDFUNC2R(TRANSFORM, TRANSFORM, Transform, interpolate_with, TRANSFORM, "transform", FLOAT, "weight", varray());
ADDFUNC1R(TRANSFORM, BOOL, Transform, is_equal_approx, TRANSFORM, "transform", varray());
ADDFUNC1R(TRANSFORM, NIL, Transform, xform, NIL, "v", varray());
ADDFUNC1R(TRANSFORM, NIL, Transform, xform_inv, NIL, "v", varray());
/* REGISTER CONSTRUCTORS */
- _VariantCall::add_constructor(_VariantCall::Vector2_init1, Variant::VECTOR2, "x", Variant::REAL, "y", Variant::REAL);
+ _VariantCall::add_constructor(_VariantCall::Vector2_init1, Variant::VECTOR2, "x", Variant::FLOAT, "y", Variant::FLOAT);
_VariantCall::add_constructor(_VariantCall::Vector2i_init1, Variant::VECTOR2I, "x", Variant::INT, "y", Variant::INT);
_VariantCall::add_constructor(_VariantCall::Rect2_init1, Variant::RECT2, "position", Variant::VECTOR2, "size", Variant::VECTOR2);
- _VariantCall::add_constructor(_VariantCall::Rect2_init2, Variant::RECT2, "x", Variant::REAL, "y", Variant::REAL, "width", Variant::REAL, "height", Variant::REAL);
+ _VariantCall::add_constructor(_VariantCall::Rect2_init2, Variant::RECT2, "x", Variant::FLOAT, "y", Variant::FLOAT, "width", Variant::FLOAT, "height", Variant::FLOAT);
_VariantCall::add_constructor(_VariantCall::Rect2i_init1, Variant::RECT2I, "position", Variant::VECTOR2, "size", Variant::VECTOR2);
_VariantCall::add_constructor(_VariantCall::Rect2i_init2, Variant::RECT2I, "x", Variant::INT, "y", Variant::INT, "width", Variant::INT, "height", Variant::INT);
- _VariantCall::add_constructor(_VariantCall::Transform2D_init2, Variant::TRANSFORM2D, "rotation", Variant::REAL, "position", Variant::VECTOR2);
+ _VariantCall::add_constructor(_VariantCall::Transform2D_init2, Variant::TRANSFORM2D, "rotation", Variant::FLOAT, "position", Variant::VECTOR2);
_VariantCall::add_constructor(_VariantCall::Transform2D_init3, Variant::TRANSFORM2D, "x_axis", Variant::VECTOR2, "y_axis", Variant::VECTOR2, "origin", Variant::VECTOR2);
- _VariantCall::add_constructor(_VariantCall::Vector3_init1, Variant::VECTOR3, "x", Variant::REAL, "y", Variant::REAL, "z", Variant::REAL);
+ _VariantCall::add_constructor(_VariantCall::Vector3_init1, Variant::VECTOR3, "x", Variant::FLOAT, "y", Variant::FLOAT, "z", Variant::FLOAT);
_VariantCall::add_constructor(_VariantCall::Vector3i_init1, Variant::VECTOR3I, "x", Variant::INT, "y", Variant::INT, "z", Variant::INT);
- _VariantCall::add_constructor(_VariantCall::Plane_init1, Variant::PLANE, "a", Variant::REAL, "b", Variant::REAL, "c", Variant::REAL, "d", Variant::REAL);
+ _VariantCall::add_constructor(_VariantCall::Plane_init1, Variant::PLANE, "a", Variant::FLOAT, "b", Variant::FLOAT, "c", Variant::FLOAT, "d", Variant::FLOAT);
_VariantCall::add_constructor(_VariantCall::Plane_init2, Variant::PLANE, "v1", Variant::VECTOR3, "v2", Variant::VECTOR3, "v3", Variant::VECTOR3);
- _VariantCall::add_constructor(_VariantCall::Plane_init3, Variant::PLANE, "normal", Variant::VECTOR3, "d", Variant::REAL);
+ _VariantCall::add_constructor(_VariantCall::Plane_init3, Variant::PLANE, "normal", Variant::VECTOR3, "d", Variant::FLOAT);
- _VariantCall::add_constructor(_VariantCall::Quat_init1, Variant::QUAT, "x", Variant::REAL, "y", Variant::REAL, "z", Variant::REAL, "w", Variant::REAL);
- _VariantCall::add_constructor(_VariantCall::Quat_init2, Variant::QUAT, "axis", Variant::VECTOR3, "angle", Variant::REAL);
+ _VariantCall::add_constructor(_VariantCall::Quat_init1, Variant::QUAT, "x", Variant::FLOAT, "y", Variant::FLOAT, "z", Variant::FLOAT, "w", Variant::FLOAT);
+ _VariantCall::add_constructor(_VariantCall::Quat_init2, Variant::QUAT, "axis", Variant::VECTOR3, "angle", Variant::FLOAT);
_VariantCall::add_constructor(_VariantCall::Quat_init3, Variant::QUAT, "euler", Variant::VECTOR3);
- _VariantCall::add_constructor(_VariantCall::Color_init1, Variant::COLOR, "r", Variant::REAL, "g", Variant::REAL, "b", Variant::REAL, "a", Variant::REAL);
- _VariantCall::add_constructor(_VariantCall::Color_init2, Variant::COLOR, "r", Variant::REAL, "g", Variant::REAL, "b", Variant::REAL);
+ _VariantCall::add_constructor(_VariantCall::Color_init1, Variant::COLOR, "r", Variant::FLOAT, "g", Variant::FLOAT, "b", Variant::FLOAT, "a", Variant::FLOAT);
+ _VariantCall::add_constructor(_VariantCall::Color_init2, Variant::COLOR, "r", Variant::FLOAT, "g", Variant::FLOAT, "b", Variant::FLOAT);
_VariantCall::add_constructor(_VariantCall::AABB_init1, Variant::AABB, "position", Variant::VECTOR3, "size", Variant::VECTOR3);
_VariantCall::add_constructor(_VariantCall::Basis_init1, Variant::BASIS, "x_axis", Variant::VECTOR3, "y_axis", Variant::VECTOR3, "z_axis", Variant::VECTOR3);
- _VariantCall::add_constructor(_VariantCall::Basis_init2, Variant::BASIS, "axis", Variant::VECTOR3, "phi", Variant::REAL);
+ _VariantCall::add_constructor(_VariantCall::Basis_init2, Variant::BASIS, "axis", Variant::VECTOR3, "phi", Variant::FLOAT);
_VariantCall::add_constructor(_VariantCall::Transform_init1, Variant::TRANSFORM, "x_axis", Variant::VECTOR3, "y_axis", Variant::VECTOR3, "z_axis", Variant::VECTOR3, "origin", Variant::VECTOR3);
_VariantCall::add_constructor(_VariantCall::Transform_init2, Variant::TRANSFORM, "basis", Variant::BASIS, "origin", Variant::VECTOR3);
diff --git a/core/variant_op.cpp b/core/variant_op.cpp
index 6af4b3887c..36d1278929 100644
--- a/core/variant_op.cpp
+++ b/core/variant_op.cpp
@@ -41,7 +41,7 @@
#define CASE_TYPE_ALL_BUT_INT(PREFIX, OP) \
CASE_TYPE(PREFIX, OP, NIL) \
CASE_TYPE(PREFIX, OP, BOOL) \
- CASE_TYPE(PREFIX, OP, REAL) \
+ CASE_TYPE(PREFIX, OP, FLOAT) \
CASE_TYPE(PREFIX, OP, STRING) \
CASE_TYPE(PREFIX, OP, VECTOR2) \
CASE_TYPE(PREFIX, OP, VECTOR2I) \
@@ -65,8 +65,10 @@
CASE_TYPE(PREFIX, OP, DICTIONARY) \
CASE_TYPE(PREFIX, OP, ARRAY) \
CASE_TYPE(PREFIX, OP, PACKED_BYTE_ARRAY) \
- CASE_TYPE(PREFIX, OP, PACKED_INT_ARRAY) \
- CASE_TYPE(PREFIX, OP, PACKED_REAL_ARRAY) \
+ CASE_TYPE(PREFIX, OP, PACKED_INT32_ARRAY) \
+ CASE_TYPE(PREFIX, OP, PACKED_INT64_ARRAY) \
+ CASE_TYPE(PREFIX, OP, PACKED_FLOAT32_ARRAY) \
+ CASE_TYPE(PREFIX, OP, PACKED_FLOAT64_ARRAY) \
CASE_TYPE(PREFIX, OP, PACKED_STRING_ARRAY) \
CASE_TYPE(PREFIX, OP, PACKED_VECTOR2_ARRAY) \
CASE_TYPE(PREFIX, OP, PACKED_VECTOR3_ARRAY) \
@@ -80,7 +82,7 @@
TYPE(PREFIX, OP, NIL), \
TYPE(PREFIX, OP, BOOL), \
TYPE(PREFIX, OP, INT), \
- TYPE(PREFIX, OP, REAL), \
+ TYPE(PREFIX, OP, FLOAT), \
TYPE(PREFIX, OP, STRING), \
TYPE(PREFIX, OP, VECTOR2), \
TYPE(PREFIX, OP, VECTOR2I), \
@@ -104,8 +106,10 @@
TYPE(PREFIX, OP, DICTIONARY), \
TYPE(PREFIX, OP, ARRAY), \
TYPE(PREFIX, OP, PACKED_BYTE_ARRAY), \
- TYPE(PREFIX, OP, PACKED_INT_ARRAY), \
- TYPE(PREFIX, OP, PACKED_REAL_ARRAY), \
+ TYPE(PREFIX, OP, PACKED_INT32_ARRAY), \
+ TYPE(PREFIX, OP, PACKED_INT64_ARRAY), \
+ TYPE(PREFIX, OP, PACKED_FLOAT32_ARRAY), \
+ TYPE(PREFIX, OP, PACKED_FLOAT64_ARRAY), \
TYPE(PREFIX, OP, PACKED_STRING_ARRAY), \
TYPE(PREFIX, OP, PACKED_VECTOR2_ARRAY), \
TYPE(PREFIX, OP, PACKED_VECTOR3_ARRAY), \
@@ -177,21 +181,21 @@ bool Variant::booleanize() const {
return; \
}
-#define DEFAULT_OP_NUM(m_prefix, m_op_name, m_name, m_op, m_type) \
- CASE_TYPE(m_prefix, m_op_name, m_name) { \
- if (p_b.type == INT) _RETURN(p_a._data.m_type m_op p_b._data._int); \
- if (p_b.type == REAL) _RETURN(p_a._data.m_type m_op p_b._data._real); \
- \
- _RETURN_FAIL \
+#define DEFAULT_OP_NUM(m_prefix, m_op_name, m_name, m_op, m_type) \
+ CASE_TYPE(m_prefix, m_op_name, m_name) { \
+ if (p_b.type == INT) _RETURN(p_a._data.m_type m_op p_b._data._int); \
+ if (p_b.type == FLOAT) _RETURN(p_a._data.m_type m_op p_b._data._float); \
+ \
+ _RETURN_FAIL \
};
-#define DEFAULT_OP_NUM_NULL(m_prefix, m_op_name, m_name, m_op, m_type) \
- CASE_TYPE(m_prefix, m_op_name, m_name) { \
- if (p_b.type == INT) _RETURN(p_a._data.m_type m_op p_b._data._int); \
- if (p_b.type == REAL) _RETURN(p_a._data.m_type m_op p_b._data._real); \
- if (p_b.type == NIL) _RETURN(!(p_b.type m_op NIL)); \
- \
- _RETURN_FAIL \
+#define DEFAULT_OP_NUM_NULL(m_prefix, m_op_name, m_name, m_op, m_type) \
+ CASE_TYPE(m_prefix, m_op_name, m_name) { \
+ if (p_b.type == INT) _RETURN(p_a._data.m_type m_op p_b._data._int); \
+ if (p_b.type == FLOAT) _RETURN(p_a._data.m_type m_op p_b._data._float); \
+ if (p_b.type == NIL) _RETURN(!(p_b.type m_op NIL)); \
+ \
+ _RETURN_FAIL \
};
#ifdef DEBUG_ENABLED
@@ -204,23 +208,23 @@ bool Variant::booleanize() const {
} \
_RETURN(p_a._data.m_type / p_b._data._int); \
} \
- if (p_b.type == REAL) { \
- if (p_b._data._real == 0) { \
+ if (p_b.type == FLOAT) { \
+ if (p_b._data._float == 0) { \
r_valid = false; \
_RETURN("Division By Zero"); \
} \
- _RETURN(p_a._data.m_type / p_b._data._real); \
+ _RETURN(p_a._data.m_type / p_b._data._float); \
} \
\
_RETURN_FAIL \
};
#else
-#define DEFAULT_OP_NUM_DIV(m_prefix, m_op_name, m_name, m_type) \
- CASE_TYPE(m_prefix, m_op_name, m_name) { \
- if (p_b.type == INT) _RETURN(p_a._data.m_type / p_b._data._int); \
- if (p_b.type == REAL) _RETURN(p_a._data.m_type / p_b._data._real); \
- \
- _RETURN_FAIL \
+#define DEFAULT_OP_NUM_DIV(m_prefix, m_op_name, m_name, m_type) \
+ CASE_TYPE(m_prefix, m_op_name, m_name) { \
+ if (p_b.type == INT) _RETURN(p_a._data.m_type / p_b._data._int); \
+ if (p_b.type == FLOAT) _RETURN(p_a._data.m_type / p_b._data._float); \
+ \
+ _RETURN_FAIL \
};
#endif
@@ -237,7 +241,7 @@ bool Variant::booleanize() const {
#define DEFAULT_OP_NUM_VEC(m_prefix, m_op_name, m_name, m_op, m_type) \
CASE_TYPE(m_prefix, m_op_name, m_name) { \
if (p_b.type == INT) _RETURN(p_a._data.m_type m_op p_b._data._int); \
- if (p_b.type == REAL) _RETURN(p_a._data.m_type m_op p_b._data._real); \
+ if (p_b.type == FLOAT) _RETURN(p_a._data.m_type m_op p_b._data._float); \
if (p_b.type == VECTOR2) _RETURN(p_a._data.m_type m_op *reinterpret_cast<const Vector2 *>(p_b._data._mem)); \
if (p_b.type == VECTOR3) _RETURN(p_a._data.m_type m_op *reinterpret_cast<const Vector3 *>(p_b._data._mem)); \
if (p_b.type == VECTOR2I) _RETURN(p_a._data.m_type m_op *reinterpret_cast<const Vector2 *>(p_b._data._mem)); \
@@ -332,7 +336,7 @@ bool Variant::booleanize() const {
CASE_TYPE(m_prefix, m_op_name, m_name) { \
if (p_b.type == m_name) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op *reinterpret_cast<const m_type *>(p_b._data._mem)); \
if (p_b.type == INT) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op p_b._data._int); \
- if (p_b.type == REAL) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op p_b._data._real); \
+ if (p_b.type == FLOAT) _RETURN(*reinterpret_cast<const m_type *>(p_a._data._mem) m_op p_b._data._float); \
\
_RETURN_FAIL \
}
@@ -392,8 +396,8 @@ bool Variant::booleanize() const {
if (p_a.type != p_b.type) \
_RETURN_FAIL \
\
- const Vector<m_type> &array_a = *reinterpret_cast<const Vector<m_type> *>(p_a._data._mem); \
- const Vector<m_type> &array_b = *reinterpret_cast<const Vector<m_type> *>(p_b._data._mem); \
+ const Vector<m_type> &array_a = PackedArrayRef<m_type>::get_array(p_a._data.packed_array); \
+ const Vector<m_type> &array_b = PackedArrayRef<m_type>::get_array(p_b._data.packed_array); \
\
int a_len = array_a.size(); \
if (a_len m_opa array_b.size()) { \
@@ -416,8 +420,8 @@ bool Variant::booleanize() const {
if (p_a.type != p_b.type) \
_RETURN_FAIL; \
\
- const Vector<m_type> &array_a = *reinterpret_cast<const Vector<m_type> *>(p_a._data._mem); \
- const Vector<m_type> &array_b = *reinterpret_cast<const Vector<m_type> *>(p_b._data._mem); \
+ const Vector<m_type> &array_a = PackedArrayRef<m_type>::get_array(p_a._data.packed_array); \
+ const Vector<m_type> &array_b = PackedArrayRef<m_type>::get_array(p_b._data.packed_array); \
Vector<m_type> sum = array_a; \
sum.append_array(array_b); \
_RETURN(sum); \
@@ -496,7 +500,7 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
}
DEFAULT_OP_NUM_NULL(math, OP_EQUAL, INT, ==, _int);
- DEFAULT_OP_NUM_NULL(math, OP_EQUAL, REAL, ==, _real);
+ DEFAULT_OP_NUM_NULL(math, OP_EQUAL, FLOAT, ==, _float);
DEFAULT_OP_STR_NULL(math, OP_EQUAL, STRING, ==, String);
DEFAULT_OP_LOCALMEM_NULL(math, OP_EQUAL, VECTOR2, ==, Vector2);
DEFAULT_OP_LOCALMEM_NULL(math, OP_EQUAL, VECTOR2I, ==, Vector2i);
@@ -516,8 +520,10 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
DEFAULT_OP_LOCALMEM_NULL(math, OP_EQUAL, _RID, ==, RID);
DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, PACKED_BYTE_ARRAY, uint8_t);
- DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, PACKED_INT_ARRAY, int);
- DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, PACKED_REAL_ARRAY, real_t);
+ DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, PACKED_INT32_ARRAY, int32_t);
+ DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, PACKED_INT64_ARRAY, int64_t);
+ DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, PACKED_FLOAT32_ARRAY, float);
+ DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, PACKED_FLOAT64_ARRAY, double);
DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, PACKED_STRING_ARRAY, String);
DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, PACKED_VECTOR2_ARRAY, Vector2);
DEFAULT_OP_ARRAY_EQ(math, OP_EQUAL, PACKED_VECTOR3_ARRAY, Vector3);
@@ -593,7 +599,7 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
}
DEFAULT_OP_NUM_NULL(math, OP_NOT_EQUAL, INT, !=, _int);
- DEFAULT_OP_NUM_NULL(math, OP_NOT_EQUAL, REAL, !=, _real);
+ DEFAULT_OP_NUM_NULL(math, OP_NOT_EQUAL, FLOAT, !=, _float);
DEFAULT_OP_STR_NULL(math, OP_NOT_EQUAL, STRING, !=, String);
DEFAULT_OP_LOCALMEM_NULL(math, OP_NOT_EQUAL, VECTOR2, !=, Vector2);
DEFAULT_OP_LOCALMEM_NULL(math, OP_NOT_EQUAL, VECTOR2I, !=, Vector2i);
@@ -613,8 +619,10 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
DEFAULT_OP_LOCALMEM_NULL(math, OP_NOT_EQUAL, _RID, !=, RID);
DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, PACKED_BYTE_ARRAY, uint8_t);
- DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, PACKED_INT_ARRAY, int);
- DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, PACKED_REAL_ARRAY, real_t);
+ DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, PACKED_INT32_ARRAY, int32_t);
+ DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, PACKED_INT64_ARRAY, int64_t);
+ DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, PACKED_FLOAT32_ARRAY, float);
+ DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, PACKED_FLOAT64_ARRAY, double);
DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, PACKED_STRING_ARRAY, String);
DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, PACKED_VECTOR2_ARRAY, Vector2);
DEFAULT_OP_ARRAY_NEQ(math, OP_NOT_EQUAL, PACKED_VECTOR3_ARRAY, Vector3);
@@ -664,7 +672,7 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
}
DEFAULT_OP_NUM(math, OP_LESS, INT, <, _int);
- DEFAULT_OP_NUM(math, OP_LESS, REAL, <, _real);
+ DEFAULT_OP_NUM(math, OP_LESS, FLOAT, <, _float);
DEFAULT_OP_STR(math, OP_LESS, STRING, <, String);
DEFAULT_OP_LOCALMEM(math, OP_LESS, VECTOR2, <, Vector2);
DEFAULT_OP_LOCALMEM(math, OP_LESS, VECTOR2I, <, Vector2i);
@@ -672,8 +680,10 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
DEFAULT_OP_LOCALMEM(math, OP_LESS, VECTOR3I, <, Vector3i);
DEFAULT_OP_LOCALMEM(math, OP_LESS, _RID, <, RID);
DEFAULT_OP_ARRAY_LT(math, OP_LESS, PACKED_BYTE_ARRAY, uint8_t);
- DEFAULT_OP_ARRAY_LT(math, OP_LESS, PACKED_INT_ARRAY, int);
- DEFAULT_OP_ARRAY_LT(math, OP_LESS, PACKED_REAL_ARRAY, real_t);
+ DEFAULT_OP_ARRAY_LT(math, OP_LESS, PACKED_INT32_ARRAY, int32_t);
+ DEFAULT_OP_ARRAY_LT(math, OP_LESS, PACKED_INT64_ARRAY, int64_t);
+ DEFAULT_OP_ARRAY_LT(math, OP_LESS, PACKED_FLOAT32_ARRAY, float);
+ DEFAULT_OP_ARRAY_LT(math, OP_LESS, PACKED_FLOAT64_ARRAY, double);
DEFAULT_OP_ARRAY_LT(math, OP_LESS, PACKED_STRING_ARRAY, String);
DEFAULT_OP_ARRAY_LT(math, OP_LESS, PACKED_VECTOR2_ARRAY, Vector3);
DEFAULT_OP_ARRAY_LT(math, OP_LESS, PACKED_VECTOR3_ARRAY, Vector3);
@@ -703,7 +713,7 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
}
DEFAULT_OP_NUM(math, OP_LESS_EQUAL, INT, <=, _int);
- DEFAULT_OP_NUM(math, OP_LESS_EQUAL, REAL, <=, _real);
+ DEFAULT_OP_NUM(math, OP_LESS_EQUAL, FLOAT, <=, _float);
DEFAULT_OP_STR(math, OP_LESS_EQUAL, STRING, <=, String);
DEFAULT_OP_LOCALMEM(math, OP_LESS_EQUAL, VECTOR2, <=, Vector2);
DEFAULT_OP_LOCALMEM(math, OP_LESS_EQUAL, VECTOR2I, <=, Vector2i);
@@ -730,8 +740,10 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
CASE_TYPE(math, OP_LESS_EQUAL, DICTIONARY)
CASE_TYPE(math, OP_LESS_EQUAL, ARRAY)
CASE_TYPE(math, OP_LESS_EQUAL, PACKED_BYTE_ARRAY);
- CASE_TYPE(math, OP_LESS_EQUAL, PACKED_INT_ARRAY);
- CASE_TYPE(math, OP_LESS_EQUAL, PACKED_REAL_ARRAY);
+ CASE_TYPE(math, OP_LESS_EQUAL, PACKED_INT32_ARRAY);
+ CASE_TYPE(math, OP_LESS_EQUAL, PACKED_INT64_ARRAY);
+ CASE_TYPE(math, OP_LESS_EQUAL, PACKED_FLOAT32_ARRAY);
+ CASE_TYPE(math, OP_LESS_EQUAL, PACKED_FLOAT64_ARRAY);
CASE_TYPE(math, OP_LESS_EQUAL, PACKED_STRING_ARRAY);
CASE_TYPE(math, OP_LESS_EQUAL, PACKED_VECTOR2_ARRAY);
CASE_TYPE(math, OP_LESS_EQUAL, PACKED_VECTOR3_ARRAY);
@@ -779,7 +791,7 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
}
DEFAULT_OP_NUM(math, OP_GREATER, INT, >, _int);
- DEFAULT_OP_NUM(math, OP_GREATER, REAL, >, _real);
+ DEFAULT_OP_NUM(math, OP_GREATER, FLOAT, >, _float);
DEFAULT_OP_STR_REV(math, OP_GREATER, STRING, <, String);
DEFAULT_OP_LOCALMEM_REV(math, OP_GREATER, VECTOR2, <, Vector2);
DEFAULT_OP_LOCALMEM_REV(math, OP_GREATER, VECTOR2I, <, Vector2i);
@@ -787,8 +799,10 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
DEFAULT_OP_LOCALMEM_REV(math, OP_GREATER, VECTOR3I, <, Vector3i);
DEFAULT_OP_LOCALMEM_REV(math, OP_GREATER, _RID, <, RID);
DEFAULT_OP_ARRAY_GT(math, OP_GREATER, PACKED_BYTE_ARRAY, uint8_t);
- DEFAULT_OP_ARRAY_GT(math, OP_GREATER, PACKED_INT_ARRAY, int);
- DEFAULT_OP_ARRAY_GT(math, OP_GREATER, PACKED_REAL_ARRAY, real_t);
+ DEFAULT_OP_ARRAY_GT(math, OP_GREATER, PACKED_INT32_ARRAY, int32_t);
+ DEFAULT_OP_ARRAY_GT(math, OP_GREATER, PACKED_INT64_ARRAY, int64_t);
+ DEFAULT_OP_ARRAY_GT(math, OP_GREATER, PACKED_FLOAT32_ARRAY, float);
+ DEFAULT_OP_ARRAY_GT(math, OP_GREATER, PACKED_FLOAT64_ARRAY, double);
DEFAULT_OP_ARRAY_GT(math, OP_GREATER, PACKED_STRING_ARRAY, String);
DEFAULT_OP_ARRAY_GT(math, OP_GREATER, PACKED_VECTOR2_ARRAY, Vector3);
DEFAULT_OP_ARRAY_GT(math, OP_GREATER, PACKED_VECTOR3_ARRAY, Vector3);
@@ -821,7 +835,7 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
}
DEFAULT_OP_NUM(math, OP_GREATER_EQUAL, INT, >=, _int);
- DEFAULT_OP_NUM(math, OP_GREATER_EQUAL, REAL, >=, _real);
+ DEFAULT_OP_NUM(math, OP_GREATER_EQUAL, FLOAT, >=, _float);
DEFAULT_OP_STR_REV(math, OP_GREATER_EQUAL, STRING, <=, String);
DEFAULT_OP_LOCALMEM_REV(math, OP_GREATER_EQUAL, VECTOR2, <=, Vector2);
DEFAULT_OP_LOCALMEM_REV(math, OP_GREATER_EQUAL, VECTOR2I, <=, Vector2i);
@@ -848,8 +862,10 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
CASE_TYPE(math, OP_GREATER_EQUAL, DICTIONARY)
CASE_TYPE(math, OP_GREATER_EQUAL, ARRAY)
CASE_TYPE(math, OP_GREATER_EQUAL, PACKED_BYTE_ARRAY);
- CASE_TYPE(math, OP_GREATER_EQUAL, PACKED_INT_ARRAY);
- CASE_TYPE(math, OP_GREATER_EQUAL, PACKED_REAL_ARRAY);
+ CASE_TYPE(math, OP_GREATER_EQUAL, PACKED_INT32_ARRAY);
+ CASE_TYPE(math, OP_GREATER_EQUAL, PACKED_INT64_ARRAY);
+ CASE_TYPE(math, OP_GREATER_EQUAL, PACKED_FLOAT32_ARRAY);
+ CASE_TYPE(math, OP_GREATER_EQUAL, PACKED_FLOAT64_ARRAY);
CASE_TYPE(math, OP_GREATER_EQUAL, PACKED_STRING_ARRAY);
CASE_TYPE(math, OP_GREATER_EQUAL, PACKED_VECTOR2_ARRAY);
CASE_TYPE(math, OP_GREATER_EQUAL, PACKED_VECTOR3_ARRAY);
@@ -876,7 +892,7 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
}
DEFAULT_OP_NUM(math, OP_ADD, INT, +, _int);
- DEFAULT_OP_NUM(math, OP_ADD, REAL, +, _real);
+ DEFAULT_OP_NUM(math, OP_ADD, FLOAT, +, _float);
DEFAULT_OP_STR(math, OP_ADD, STRING, +, String);
DEFAULT_OP_LOCALMEM(math, OP_ADD, VECTOR2, +, Vector2);
DEFAULT_OP_LOCALMEM(math, OP_ADD, VECTOR2I, +, Vector2i);
@@ -886,8 +902,10 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
DEFAULT_OP_LOCALMEM(math, OP_ADD, COLOR, +, Color);
DEFAULT_OP_ARRAY_ADD(math, OP_ADD, PACKED_BYTE_ARRAY, uint8_t);
- DEFAULT_OP_ARRAY_ADD(math, OP_ADD, PACKED_INT_ARRAY, int);
- DEFAULT_OP_ARRAY_ADD(math, OP_ADD, PACKED_REAL_ARRAY, real_t);
+ DEFAULT_OP_ARRAY_ADD(math, OP_ADD, PACKED_INT32_ARRAY, int32_t);
+ DEFAULT_OP_ARRAY_ADD(math, OP_ADD, PACKED_INT64_ARRAY, int64_t);
+ DEFAULT_OP_ARRAY_ADD(math, OP_ADD, PACKED_FLOAT32_ARRAY, float);
+ DEFAULT_OP_ARRAY_ADD(math, OP_ADD, PACKED_FLOAT64_ARRAY, double);
DEFAULT_OP_ARRAY_ADD(math, OP_ADD, PACKED_STRING_ARRAY, String);
DEFAULT_OP_ARRAY_ADD(math, OP_ADD, PACKED_VECTOR2_ARRAY, Vector2);
DEFAULT_OP_ARRAY_ADD(math, OP_ADD, PACKED_VECTOR3_ARRAY, Vector3);
@@ -915,7 +933,7 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
SWITCH_OP(math, OP_SUBTRACT, p_a.type) {
DEFAULT_OP_NUM(math, OP_SUBTRACT, INT, -, _int);
- DEFAULT_OP_NUM(math, OP_SUBTRACT, REAL, -, _real);
+ DEFAULT_OP_NUM(math, OP_SUBTRACT, FLOAT, -, _float);
DEFAULT_OP_LOCALMEM(math, OP_SUBTRACT, VECTOR2, -, Vector2);
DEFAULT_OP_LOCALMEM(math, OP_SUBTRACT, VECTOR2I, -, Vector2i);
DEFAULT_OP_LOCALMEM(math, OP_SUBTRACT, VECTOR3, -, Vector3);
@@ -943,8 +961,10 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
CASE_TYPE(math, OP_SUBTRACT, DICTIONARY)
CASE_TYPE(math, OP_SUBTRACT, ARRAY)
CASE_TYPE(math, OP_SUBTRACT, PACKED_BYTE_ARRAY);
- CASE_TYPE(math, OP_SUBTRACT, PACKED_INT_ARRAY);
- CASE_TYPE(math, OP_SUBTRACT, PACKED_REAL_ARRAY);
+ CASE_TYPE(math, OP_SUBTRACT, PACKED_INT32_ARRAY);
+ CASE_TYPE(math, OP_SUBTRACT, PACKED_INT64_ARRAY);
+ CASE_TYPE(math, OP_SUBTRACT, PACKED_FLOAT32_ARRAY);
+ CASE_TYPE(math, OP_SUBTRACT, PACKED_FLOAT64_ARRAY);
CASE_TYPE(math, OP_SUBTRACT, PACKED_STRING_ARRAY);
CASE_TYPE(math, OP_SUBTRACT, PACKED_VECTOR2_ARRAY);
CASE_TYPE(math, OP_SUBTRACT, PACKED_VECTOR3_ARRAY);
@@ -973,8 +993,8 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
case QUAT: {
_RETURN(*reinterpret_cast<const Quat *>(p_a._data._mem) * *reinterpret_cast<const Quat *>(p_b._data._mem));
}
- case REAL: {
- _RETURN(*reinterpret_cast<const Quat *>(p_a._data._mem) * p_b._data._real);
+ case FLOAT: {
+ _RETURN(*reinterpret_cast<const Quat *>(p_a._data._mem) * p_b._data._float);
}
default: _RETURN_FAIL;
}
@@ -1005,7 +1025,7 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
}
DEFAULT_OP_NUM_VEC(math, OP_MULTIPLY, INT, *, _int);
- DEFAULT_OP_NUM_VEC(math, OP_MULTIPLY, REAL, *, _real);
+ DEFAULT_OP_NUM_VEC(math, OP_MULTIPLY, FLOAT, *, _float);
DEFAULT_OP_LOCALMEM_NUM(math, OP_MULTIPLY, VECTOR2, *, Vector2);
DEFAULT_OP_LOCALMEM_NUM(math, OP_MULTIPLY, VECTOR2I, *, Vector2i);
DEFAULT_OP_LOCALMEM_NUM(math, OP_MULTIPLY, VECTOR3, *, Vector3);
@@ -1029,8 +1049,10 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
CASE_TYPE(math, OP_MULTIPLY, DICTIONARY)
CASE_TYPE(math, OP_MULTIPLY, ARRAY)
CASE_TYPE(math, OP_MULTIPLY, PACKED_BYTE_ARRAY);
- CASE_TYPE(math, OP_MULTIPLY, PACKED_INT_ARRAY);
- CASE_TYPE(math, OP_MULTIPLY, PACKED_REAL_ARRAY);
+ CASE_TYPE(math, OP_MULTIPLY, PACKED_INT32_ARRAY);
+ CASE_TYPE(math, OP_MULTIPLY, PACKED_INT64_ARRAY);
+ CASE_TYPE(math, OP_MULTIPLY, PACKED_FLOAT32_ARRAY);
+ CASE_TYPE(math, OP_MULTIPLY, PACKED_FLOAT64_ARRAY);
CASE_TYPE(math, OP_MULTIPLY, PACKED_STRING_ARRAY);
CASE_TYPE(math, OP_MULTIPLY, PACKED_VECTOR2_ARRAY);
CASE_TYPE(math, OP_MULTIPLY, PACKED_VECTOR3_ARRAY);
@@ -1040,19 +1062,19 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
SWITCH_OP(math, OP_DIVIDE, p_a.type) {
CASE_TYPE(math, OP_DIVIDE, QUAT) {
- if (p_b.type != REAL)
+ if (p_b.type != FLOAT)
_RETURN_FAIL;
#ifdef DEBUG_ENABLED
- if (p_b._data._real == 0) {
+ if (p_b._data._float == 0) {
r_valid = false;
_RETURN("Division By Zero");
}
#endif
- _RETURN(*reinterpret_cast<const Quat *>(p_a._data._mem) / p_b._data._real);
+ _RETURN(*reinterpret_cast<const Quat *>(p_a._data._mem) / p_b._data._float);
}
DEFAULT_OP_NUM_DIV(math, OP_DIVIDE, INT, _int);
- DEFAULT_OP_NUM_DIV(math, OP_DIVIDE, REAL, _real);
+ DEFAULT_OP_NUM_DIV(math, OP_DIVIDE, FLOAT, _float);
DEFAULT_OP_LOCALMEM_NUM(math, OP_DIVIDE, VECTOR2, /, Vector2);
DEFAULT_OP_LOCALMEM_NUM(math, OP_DIVIDE, VECTOR2I, /, Vector2i);
DEFAULT_OP_LOCALMEM_NUM(math, OP_DIVIDE, VECTOR3, /, Vector3);
@@ -1079,8 +1101,10 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
CASE_TYPE(math, OP_DIVIDE, DICTIONARY)
CASE_TYPE(math, OP_DIVIDE, ARRAY)
CASE_TYPE(math, OP_DIVIDE, PACKED_BYTE_ARRAY);
- CASE_TYPE(math, OP_DIVIDE, PACKED_INT_ARRAY);
- CASE_TYPE(math, OP_DIVIDE, PACKED_REAL_ARRAY);
+ CASE_TYPE(math, OP_DIVIDE, PACKED_INT32_ARRAY);
+ CASE_TYPE(math, OP_DIVIDE, PACKED_INT64_ARRAY);
+ CASE_TYPE(math, OP_DIVIDE, PACKED_FLOAT32_ARRAY);
+ CASE_TYPE(math, OP_DIVIDE, PACKED_FLOAT64_ARRAY);
CASE_TYPE(math, OP_DIVIDE, PACKED_STRING_ARRAY);
CASE_TYPE(math, OP_DIVIDE, PACKED_VECTOR2_ARRAY);
CASE_TYPE(math, OP_DIVIDE, PACKED_VECTOR3_ARRAY);
@@ -1090,7 +1114,7 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
SWITCH_OP(math, OP_POSITIVE, p_a.type) {
DEFAULT_OP_NUM_POS(math, OP_POSITIVE, INT, _int);
- DEFAULT_OP_NUM_POS(math, OP_POSITIVE, REAL, _real);
+ DEFAULT_OP_NUM_POS(math, OP_POSITIVE, FLOAT, _float);
DEFAULT_OP_LOCALMEM_POS(math, OP_POSITIVE, VECTOR3, Vector3);
DEFAULT_OP_LOCALMEM_POS(math, OP_POSITIVE, VECTOR3I, Vector3i);
DEFAULT_OP_LOCALMEM_POS(math, OP_POSITIVE, PLANE, Plane);
@@ -1118,8 +1142,10 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
CASE_TYPE(math, OP_POSITIVE, DICTIONARY)
CASE_TYPE(math, OP_POSITIVE, ARRAY)
CASE_TYPE(math, OP_POSITIVE, PACKED_BYTE_ARRAY)
- CASE_TYPE(math, OP_POSITIVE, PACKED_INT_ARRAY)
- CASE_TYPE(math, OP_POSITIVE, PACKED_REAL_ARRAY)
+ CASE_TYPE(math, OP_POSITIVE, PACKED_INT32_ARRAY)
+ CASE_TYPE(math, OP_POSITIVE, PACKED_INT64_ARRAY)
+ CASE_TYPE(math, OP_POSITIVE, PACKED_FLOAT32_ARRAY)
+ CASE_TYPE(math, OP_POSITIVE, PACKED_FLOAT64_ARRAY)
CASE_TYPE(math, OP_POSITIVE, PACKED_STRING_ARRAY)
CASE_TYPE(math, OP_POSITIVE, PACKED_VECTOR2_ARRAY)
CASE_TYPE(math, OP_POSITIVE, PACKED_VECTOR3_ARRAY)
@@ -1129,7 +1155,7 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
SWITCH_OP(math, OP_NEGATE, p_a.type) {
DEFAULT_OP_NUM_NEG(math, OP_NEGATE, INT, _int);
- DEFAULT_OP_NUM_NEG(math, OP_NEGATE, REAL, _real);
+ DEFAULT_OP_NUM_NEG(math, OP_NEGATE, FLOAT, _float);
DEFAULT_OP_LOCALMEM_NEG(math, OP_NEGATE, VECTOR2, Vector2);
DEFAULT_OP_LOCALMEM_NEG(math, OP_NEGATE, VECTOR2I, Vector2i);
@@ -1158,8 +1184,10 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
CASE_TYPE(math, OP_NEGATE, DICTIONARY)
CASE_TYPE(math, OP_NEGATE, ARRAY)
CASE_TYPE(math, OP_NEGATE, PACKED_BYTE_ARRAY)
- CASE_TYPE(math, OP_NEGATE, PACKED_INT_ARRAY)
- CASE_TYPE(math, OP_NEGATE, PACKED_REAL_ARRAY)
+ CASE_TYPE(math, OP_NEGATE, PACKED_INT32_ARRAY)
+ CASE_TYPE(math, OP_NEGATE, PACKED_INT64_ARRAY)
+ CASE_TYPE(math, OP_NEGATE, PACKED_FLOAT32_ARRAY)
+ CASE_TYPE(math, OP_NEGATE, PACKED_FLOAT64_ARRAY)
CASE_TYPE(math, OP_NEGATE, PACKED_STRING_ARRAY)
CASE_TYPE(math, OP_NEGATE, PACKED_VECTOR2_ARRAY)
CASE_TYPE(math, OP_NEGATE, PACKED_VECTOR3_ARRAY)
@@ -1201,7 +1229,7 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
CASE_TYPE(math, OP_MODULE, NIL)
CASE_TYPE(math, OP_MODULE, BOOL)
- CASE_TYPE(math, OP_MODULE, REAL)
+ CASE_TYPE(math, OP_MODULE, FLOAT)
CASE_TYPE(math, OP_MODULE, VECTOR2)
CASE_TYPE(math, OP_MODULE, VECTOR2I)
CASE_TYPE(math, OP_MODULE, RECT2)
@@ -1225,8 +1253,10 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a,
CASE_TYPE(math, OP_MODULE, DICTIONARY)
CASE_TYPE(math, OP_MODULE, ARRAY)
CASE_TYPE(math, OP_MODULE, PACKED_BYTE_ARRAY)
- CASE_TYPE(math, OP_MODULE, PACKED_INT_ARRAY)
- CASE_TYPE(math, OP_MODULE, PACKED_REAL_ARRAY)
+ CASE_TYPE(math, OP_MODULE, PACKED_INT32_ARRAY)
+ CASE_TYPE(math, OP_MODULE, PACKED_INT64_ARRAY)
+ CASE_TYPE(math, OP_MODULE, PACKED_FLOAT32_ARRAY)
+ CASE_TYPE(math, OP_MODULE, PACKED_FLOAT64_ARRAY)
CASE_TYPE(math, OP_MODULE, PACKED_STRING_ARRAY)
CASE_TYPE(math, OP_MODULE, PACKED_VECTOR2_ARRAY)
CASE_TYPE(math, OP_MODULE, PACKED_VECTOR3_ARRAY)
@@ -1363,13 +1393,13 @@ void Variant::set_named(const StringName &p_index, const Variant &p_value, bool
v->y = p_value._data._int;
valid = true;
}
- } else if (p_value.type == Variant::REAL) {
+ } else if (p_value.type == Variant::FLOAT) {
Vector2 *v = reinterpret_cast<Vector2 *>(_data._mem);
if (p_index == CoreStringNames::singleton->x) {
- v->x = p_value._data._real;
+ v->x = p_value._data._float;
valid = true;
} else if (p_index == CoreStringNames::singleton->y) {
- v->y = p_value._data._real;
+ v->y = p_value._data._float;
valid = true;
}
}
@@ -1385,13 +1415,13 @@ void Variant::set_named(const StringName &p_index, const Variant &p_value, bool
v->y = p_value._data._int;
valid = true;
}
- } else if (p_value.type == Variant::REAL) {
+ } else if (p_value.type == Variant::FLOAT) {
Vector2i *v = reinterpret_cast<Vector2i *>(_data._mem);
if (p_index == CoreStringNames::singleton->x) {
- v->x = p_value._data._real;
+ v->x = p_value._data._float;
valid = true;
} else if (p_index == CoreStringNames::singleton->y) {
- v->y = p_value._data._real;
+ v->y = p_value._data._float;
valid = true;
}
}
@@ -1462,16 +1492,16 @@ void Variant::set_named(const StringName &p_index, const Variant &p_value, bool
v->z = p_value._data._int;
valid = true;
}
- } else if (p_value.type == Variant::REAL) {
+ } else if (p_value.type == Variant::FLOAT) {
Vector3 *v = reinterpret_cast<Vector3 *>(_data._mem);
if (p_index == CoreStringNames::singleton->x) {
- v->x = p_value._data._real;
+ v->x = p_value._data._float;
valid = true;
} else if (p_index == CoreStringNames::singleton->y) {
- v->y = p_value._data._real;
+ v->y = p_value._data._float;
valid = true;
} else if (p_index == CoreStringNames::singleton->z) {
- v->z = p_value._data._real;
+ v->z = p_value._data._float;
valid = true;
}
}
@@ -1491,16 +1521,16 @@ void Variant::set_named(const StringName &p_index, const Variant &p_value, bool
v->z = p_value._data._int;
valid = true;
}
- } else if (p_value.type == Variant::REAL) {
+ } else if (p_value.type == Variant::FLOAT) {
Vector3i *v = reinterpret_cast<Vector3i *>(_data._mem);
if (p_index == CoreStringNames::singleton->x) {
- v->x = p_value._data._real;
+ v->x = p_value._data._float;
valid = true;
} else if (p_index == CoreStringNames::singleton->y) {
- v->y = p_value._data._real;
+ v->y = p_value._data._float;
valid = true;
} else if (p_index == CoreStringNames::singleton->z) {
- v->z = p_value._data._real;
+ v->z = p_value._data._float;
valid = true;
}
}
@@ -1523,19 +1553,19 @@ void Variant::set_named(const StringName &p_index, const Variant &p_value, bool
v->d = p_value._data._int;
valid = true;
}
- } else if (p_value.type == Variant::REAL) {
+ } else if (p_value.type == Variant::FLOAT) {
Plane *v = reinterpret_cast<Plane *>(_data._mem);
if (p_index == CoreStringNames::singleton->x) {
- v->normal.x = p_value._data._real;
+ v->normal.x = p_value._data._float;
valid = true;
} else if (p_index == CoreStringNames::singleton->y) {
- v->normal.y = p_value._data._real;
+ v->normal.y = p_value._data._float;
valid = true;
} else if (p_index == CoreStringNames::singleton->z) {
- v->normal.z = p_value._data._real;
+ v->normal.z = p_value._data._float;
valid = true;
} else if (p_index == CoreStringNames::singleton->d) {
- v->d = p_value._data._real;
+ v->d = p_value._data._float;
valid = true;
}
@@ -1565,24 +1595,24 @@ void Variant::set_named(const StringName &p_index, const Variant &p_value, bool
v->w = p_value._data._int;
valid = true;
}
- } else if (p_value.type == Variant::REAL) {
+ } else if (p_value.type == Variant::FLOAT) {
Quat *v = reinterpret_cast<Quat *>(_data._mem);
if (p_index == CoreStringNames::singleton->x) {
- v->x = p_value._data._real;
+ v->x = p_value._data._float;
valid = true;
} else if (p_index == CoreStringNames::singleton->y) {
- v->y = p_value._data._real;
+ v->y = p_value._data._float;
valid = true;
} else if (p_index == CoreStringNames::singleton->z) {
- v->z = p_value._data._real;
+ v->z = p_value._data._float;
valid = true;
} else if (p_index == CoreStringNames::singleton->w) {
- v->w = p_value._data._real;
+ v->w = p_value._data._float;
valid = true;
}
}
- } break; // 10
+ } break;
case AABB: {
if (p_value.type == Variant::VECTOR3) {
@@ -1666,40 +1696,40 @@ void Variant::set_named(const StringName &p_index, const Variant &p_value, bool
v->set_hsv(v->get_h(), v->get_v(), p_value._data._int, v->a);
valid = true;
}
- } else if (p_value.type == Variant::REAL) {
+ } else if (p_value.type == Variant::FLOAT) {
Color *v = reinterpret_cast<Color *>(_data._mem);
if (p_index == CoreStringNames::singleton->r) {
- v->r = p_value._data._real;
+ v->r = p_value._data._float;
valid = true;
} else if (p_index == CoreStringNames::singleton->g) {
- v->g = p_value._data._real;
+ v->g = p_value._data._float;
valid = true;
} else if (p_index == CoreStringNames::singleton->b) {
- v->b = p_value._data._real;
+ v->b = p_value._data._float;
valid = true;
} else if (p_index == CoreStringNames::singleton->a) {
- v->a = p_value._data._real;
+ v->a = p_value._data._float;
valid = true;
} else if (p_index == CoreStringNames::singleton->r8) {
- v->r = p_value._data._real / 255.0;
+ v->r = p_value._data._float / 255.0;
valid = true;
} else if (p_index == CoreStringNames::singleton->g8) {
- v->g = p_value._data._real / 255.0;
+ v->g = p_value._data._float / 255.0;
valid = true;
} else if (p_index == CoreStringNames::singleton->b8) {
- v->b = p_value._data._real / 255.0;
+ v->b = p_value._data._float / 255.0;
valid = true;
} else if (p_index == CoreStringNames::singleton->a8) {
- v->a = p_value._data._real / 255.0;
+ v->a = p_value._data._float / 255.0;
valid = true;
} else if (p_index == CoreStringNames::singleton->h) {
- v->set_hsv(p_value._data._real, v->get_s(), v->get_v(), v->a);
+ v->set_hsv(p_value._data._float, v->get_s(), v->get_v(), v->a);
valid = true;
} else if (p_index == CoreStringNames::singleton->s) {
- v->set_hsv(v->get_h(), p_value._data._real, v->get_v(), v->a);
+ v->set_hsv(v->get_h(), p_value._data._float, v->get_v(), v->a);
valid = true;
} else if (p_index == CoreStringNames::singleton->v) {
- v->set_hsv(v->get_h(), v->get_s(), p_value._data._real, v->a);
+ v->set_hsv(v->get_h(), v->get_s(), p_value._data._float, v->a);
valid = true;
}
}
@@ -1840,7 +1870,7 @@ Variant Variant::get_named(const StringName &p_index, bool *r_valid) const {
return v->w;
}
- } break; // 10
+ } break;
case AABB: {
const ::AABB *v = _data._aabb;
@@ -1934,28 +1964,55 @@ Variant Variant::get_named(const StringName &p_index, bool *r_valid) const {
return Variant();
}
-#define DEFAULT_OP_ARRAY_CMD(m_name, m_type, skip_test, cmd) \
- case m_name: { \
- skip_test; \
- \
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) { \
- int index = p_index; \
- m_type *arr = reinterpret_cast<m_type *>(_data._mem); \
- \
- if (index < 0) \
- index += arr->size(); \
- if (index >= 0 && index < arr->size()) { \
- valid = true; \
- cmd; \
- } \
- } \
+#define DEFAULT_OP_ARRAY_CMD(m_name, m_type, skip_test, cmd) \
+ case m_name: { \
+ skip_test; \
+ \
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) { \
+ int index = p_index; \
+ m_type *arr = reinterpret_cast<m_type *>(_data._mem); \
+ \
+ if (index < 0) \
+ index += arr->size(); \
+ if (index >= 0 && index < arr->size()) { \
+ valid = true; \
+ cmd; \
+ } \
+ } \
} break;
-#define DEFAULT_OP_DVECTOR_SET(m_name, dv_type, skip_cond) \
- DEFAULT_OP_ARRAY_CMD(m_name, Vector<dv_type>, if (skip_cond) return;, arr->set(index, p_value); return )
+#define DEFAULT_OP_DVECTOR_SET(m_name, m_type, skip_cond) \
+ case m_name: { \
+ if (skip_cond) return; \
+ \
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) { \
+ int index = p_index; \
+ Vector<m_type> *arr = PackedArrayRef<m_type>::get_array_ptr(_data.packed_array); \
+ \
+ if (index < 0) \
+ index += arr->size(); \
+ if (index >= 0 && index < arr->size()) { \
+ valid = true; \
+ arr->set(index, p_value); \
+ } \
+ } \
+ } break;
-#define DEFAULT_OP_DVECTOR_GET(m_name, dv_type) \
- DEFAULT_OP_ARRAY_CMD(m_name, const Vector<dv_type>, ;, return arr->get(index))
+#define DEFAULT_OP_DVECTOR_GET(m_name, m_type) \
+ case m_name: { \
+ \
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) { \
+ int index = p_index; \
+ const Vector<m_type> *arr = &PackedArrayRef<m_type>::get_array(_data.packed_array); \
+ \
+ if (index < 0) \
+ index += arr->size(); \
+ if (index >= 0 && index < arr->size()) { \
+ valid = true; \
+ return arr->get(index); \
+ } \
+ } \
+ } break;
void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid) {
@@ -1974,12 +2031,12 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
case INT: {
return;
} break;
- case REAL: {
+ case FLOAT: {
return;
} break;
case STRING: {
- if (p_index.type != Variant::INT && p_index.type != Variant::REAL)
+ if (p_index.type != Variant::INT && p_index.type != Variant::FLOAT)
return;
int idx = p_index;
@@ -1991,7 +2048,7 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
return;
String chr;
- if (p_value.type == Variant::INT || p_value.type == Variant::REAL) {
+ if (p_value.type == Variant::INT || p_value.type == Variant::FLOAT) {
chr = String::chr(p_value);
} else if (p_value.type == Variant::STRING) {
@@ -2008,10 +2065,10 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
} break;
case VECTOR2: {
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL)
+ if (p_value.type != Variant::INT && p_value.type != Variant::FLOAT)
return;
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
// scalar index
int idx = p_index;
@@ -2040,13 +2097,13 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
}
}
- } break; // 5
+ } break;
case VECTOR2I: {
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL)
+ if (p_value.type != Variant::INT && p_value.type != Variant::FLOAT)
return;
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
// scalar index
int idx = p_index;
@@ -2075,7 +2132,7 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
}
}
- } break; // 5
+ } break;
case RECT2: {
if (p_value.type != Variant::VECTOR2)
@@ -2131,7 +2188,7 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
if (p_value.type != Variant::VECTOR2)
return;
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
int index = p_index;
@@ -2167,10 +2224,10 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
} break;
case VECTOR3: {
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL)
+ if (p_value.type != Variant::INT && p_value.type != Variant::FLOAT)
return;
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
//scalar index
int idx = p_index;
if (idx < 0)
@@ -2205,10 +2262,10 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
} break;
case VECTOR3I: {
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL)
+ if (p_value.type != Variant::INT && p_value.type != Variant::FLOAT)
return;
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
//scalar index
int idx = p_index;
if (idx < 0)
@@ -2248,21 +2305,21 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
const String *str = reinterpret_cast<const String *>(p_index._data._mem);
Plane *v = reinterpret_cast<Plane *>(_data._mem);
if (*str == "x") {
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL)
+ if (p_value.type != Variant::INT && p_value.type != Variant::FLOAT)
return;
valid = true;
v->normal.x = p_value;
return;
} else if (*str == "y") {
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL)
+ if (p_value.type != Variant::INT && p_value.type != Variant::FLOAT)
return;
valid = true;
v->normal.y = p_value;
return;
} else if (*str == "z") {
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL)
+ if (p_value.type != Variant::INT && p_value.type != Variant::FLOAT)
return;
valid = true;
@@ -2285,7 +2342,7 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
} break;
case QUAT: {
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL)
+ if (p_value.type != Variant::INT && p_value.type != Variant::FLOAT)
return;
if (p_index.get_type() == Variant::STRING) {
@@ -2311,7 +2368,7 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
}
}
- } break; // 10
+ } break;
case AABB: {
if (p_value.type != Variant::VECTOR3)
@@ -2342,7 +2399,7 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
if (p_value.type != Variant::VECTOR3)
return;
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
int index = p_index;
@@ -2378,7 +2435,7 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
} break;
case TRANSFORM: {
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
if (p_value.type != Variant::VECTOR3)
return;
@@ -2421,7 +2478,7 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
} break;
case COLOR: {
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL)
+ if (p_value.type != Variant::INT && p_value.type != Variant::FLOAT)
return;
if (p_index.get_type() == Variant::STRING) {
@@ -2487,9 +2544,9 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
} break;
case STRING_NAME: {
- } break; // 15
+ } break;
case NODE_PATH: {
- } break; // 15
+ } break;
case _RID: {
} break;
case OBJECT: {
@@ -2523,12 +2580,14 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
valid = true; //always valid, i guess? should this really be ok?
return;
} break;
- DEFAULT_OP_ARRAY_CMD(ARRAY, Array, ;, (*arr)[index] = p_value; return ) // 20
- DEFAULT_OP_DVECTOR_SET(PACKED_BYTE_ARRAY, uint8_t, p_value.type != Variant::REAL && p_value.type != Variant::INT)
- DEFAULT_OP_DVECTOR_SET(PACKED_INT_ARRAY, int, p_value.type != Variant::REAL && p_value.type != Variant::INT)
- DEFAULT_OP_DVECTOR_SET(PACKED_REAL_ARRAY, real_t, p_value.type != Variant::REAL && p_value.type != Variant::INT)
+ DEFAULT_OP_ARRAY_CMD(ARRAY, Array, ;, (*arr)[index] = p_value; return )
+ DEFAULT_OP_DVECTOR_SET(PACKED_BYTE_ARRAY, uint8_t, p_value.type != Variant::FLOAT && p_value.type != Variant::INT)
+ DEFAULT_OP_DVECTOR_SET(PACKED_INT32_ARRAY, int32_t, p_value.type != Variant::FLOAT && p_value.type != Variant::INT)
+ DEFAULT_OP_DVECTOR_SET(PACKED_INT64_ARRAY, int64_t, p_value.type != Variant::FLOAT && p_value.type != Variant::INT)
+ DEFAULT_OP_DVECTOR_SET(PACKED_FLOAT32_ARRAY, float, p_value.type != Variant::FLOAT && p_value.type != Variant::INT)
+ DEFAULT_OP_DVECTOR_SET(PACKED_FLOAT64_ARRAY, double, p_value.type != Variant::FLOAT && p_value.type != Variant::INT)
DEFAULT_OP_DVECTOR_SET(PACKED_STRING_ARRAY, String, p_value.type != Variant::STRING)
- DEFAULT_OP_DVECTOR_SET(PACKED_VECTOR2_ARRAY, Vector2, p_value.type != Variant::VECTOR2) // 25
+ DEFAULT_OP_DVECTOR_SET(PACKED_VECTOR2_ARRAY, Vector2, p_value.type != Variant::VECTOR2)
DEFAULT_OP_DVECTOR_SET(PACKED_VECTOR3_ARRAY, Vector3, p_value.type != Variant::VECTOR3)
DEFAULT_OP_DVECTOR_SET(PACKED_COLOR_ARRAY, Color, p_value.type != Variant::COLOR)
default:
@@ -2554,12 +2613,12 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const {
case INT: {
return Variant();
} break;
- case REAL: {
+ case FLOAT: {
return Variant();
} break;
case STRING: {
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
//string index
int idx = p_index;
@@ -2576,7 +2635,7 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const {
} break;
case VECTOR2: {
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
// scalar index
int idx = p_index;
if (idx < 0)
@@ -2601,10 +2660,10 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const {
}
}
- } break; // 5
+ } break;
case VECTOR2I: {
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
// scalar index
int idx = p_index;
if (idx < 0)
@@ -2629,7 +2688,7 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const {
}
}
- } break; // 5
+ } break;
case RECT2: {
if (p_index.get_type() == Variant::STRING) {
@@ -2670,7 +2729,7 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const {
} break;
case VECTOR3: {
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
//scalar index
int idx = p_index;
if (idx < 0)
@@ -2701,7 +2760,7 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const {
} break;
case VECTOR3I: {
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
//scalar index
int idx = p_index;
if (idx < 0)
@@ -2732,7 +2791,7 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const {
} break;
case TRANSFORM2D: {
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
int index = p_index;
@@ -2808,7 +2867,7 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const {
}
}
- } break; // 10
+ } break;
case AABB: {
if (p_index.get_type() == Variant::STRING) {
@@ -2830,7 +2889,7 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const {
} break;
case BASIS: {
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
int index = p_index;
if (index < 0)
@@ -2861,7 +2920,7 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const {
} break;
case TRANSFORM: {
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
int index = p_index;
if (index < 0)
@@ -2941,9 +3000,9 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const {
} break;
case STRING_NAME: {
- } break; // 15
+ } break;
case NODE_PATH: {
- } break; // 15
+ } break;
case _RID: {
} break;
case OBJECT: {
@@ -2975,12 +3034,14 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const {
return *res;
}
} break;
- DEFAULT_OP_ARRAY_CMD(ARRAY, const Array, ;, return (*arr)[index]) // 20
+ DEFAULT_OP_ARRAY_CMD(ARRAY, const Array, ;, return (*arr)[index])
DEFAULT_OP_DVECTOR_GET(PACKED_BYTE_ARRAY, uint8_t)
- DEFAULT_OP_DVECTOR_GET(PACKED_INT_ARRAY, int)
- DEFAULT_OP_DVECTOR_GET(PACKED_REAL_ARRAY, real_t)
+ DEFAULT_OP_DVECTOR_GET(PACKED_INT32_ARRAY, int32_t)
+ DEFAULT_OP_DVECTOR_GET(PACKED_INT64_ARRAY, int64_t)
+ DEFAULT_OP_DVECTOR_GET(PACKED_FLOAT32_ARRAY, float)
+ DEFAULT_OP_DVECTOR_GET(PACKED_FLOAT64_ARRAY, double)
DEFAULT_OP_DVECTOR_GET(PACKED_STRING_ARRAY, String)
- DEFAULT_OP_DVECTOR_GET(PACKED_VECTOR2_ARRAY, Vector2) // 25
+ DEFAULT_OP_DVECTOR_GET(PACKED_VECTOR2_ARRAY, Vector2)
DEFAULT_OP_DVECTOR_GET(PACKED_VECTOR3_ARRAY, Vector3)
DEFAULT_OP_DVECTOR_GET(PACKED_COLOR_ARRAY, Color)
default:
@@ -3042,7 +3103,7 @@ bool Variant::in(const Variant &p_index, bool *r_valid) const {
const Dictionary *dic = reinterpret_cast<const Dictionary *>(_data._mem);
return dic->has(p_index);
- } break; // 20
+ } break;
case ARRAY: {
const Array *arr = reinterpret_cast<const Array *>(_data._mem);
@@ -3059,10 +3120,10 @@ bool Variant::in(const Variant &p_index, bool *r_valid) const {
} break;
case PACKED_BYTE_ARRAY: {
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
int index = p_index;
- const Vector<uint8_t> *arr = reinterpret_cast<const Vector<uint8_t> *>(_data._mem);
+ const Vector<uint8_t> *arr = &PackedArrayRef<uint8_t>::get_array(_data.packed_array);
int l = arr->size();
if (l) {
const uint8_t *r = arr->ptr();
@@ -3076,14 +3137,49 @@ bool Variant::in(const Variant &p_index, bool *r_valid) const {
}
} break;
- case PACKED_INT_ARRAY: {
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
+ case PACKED_INT32_ARRAY: {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
- int index = p_index;
- const Vector<int> *arr = reinterpret_cast<const Vector<int> *>(_data._mem);
+ int32_t index = p_index;
+ const Vector<int32_t> *arr = &PackedArrayRef<int32_t>::get_array(_data.packed_array);
+ int32_t l = arr->size();
+ if (l) {
+ const int32_t *r = arr->ptr();
+ for (int32_t i = 0; i < l; i++) {
+ if (r[i] == index)
+ return true;
+ }
+ }
+
+ return false;
+ }
+ } break;
+ case PACKED_INT64_ARRAY: {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
+
+ int64_t index = p_index;
+ const Vector<int64_t> *arr = &PackedArrayRef<int64_t>::get_array(_data.packed_array);
+ int64_t l = arr->size();
+ if (l) {
+ const int64_t *r = arr->ptr();
+ for (int64_t i = 0; i < l; i++) {
+ if (r[i] == index)
+ return true;
+ }
+ }
+
+ return false;
+ }
+ } break;
+ case PACKED_FLOAT32_ARRAY: {
+
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
+
+ real_t index = p_index;
+ const Vector<float> *arr = &PackedArrayRef<float>::get_array(_data.packed_array);
int l = arr->size();
if (l) {
- const int *r = arr->ptr();
+ const float *r = arr->ptr();
for (int i = 0; i < l; i++) {
if (r[i] == index)
return true;
@@ -3092,16 +3188,17 @@ bool Variant::in(const Variant &p_index, bool *r_valid) const {
return false;
}
+
} break;
- case PACKED_REAL_ARRAY: {
+ case PACKED_FLOAT64_ARRAY: {
- if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
+ if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::FLOAT) {
real_t index = p_index;
- const Vector<real_t> *arr = reinterpret_cast<const Vector<real_t> *>(_data._mem);
+ const Vector<double> *arr = &PackedArrayRef<double>::get_array(_data.packed_array);
int l = arr->size();
if (l) {
- const real_t *r = arr->ptr();
+ const double *r = arr->ptr();
for (int i = 0; i < l; i++) {
if (r[i] == index)
return true;
@@ -3116,7 +3213,7 @@ bool Variant::in(const Variant &p_index, bool *r_valid) const {
if (p_index.get_type() == Variant::STRING) {
String index = p_index;
- const Vector<String> *arr = reinterpret_cast<const Vector<String> *>(_data._mem);
+ const Vector<String> *arr = &PackedArrayRef<String>::get_array(_data.packed_array);
int l = arr->size();
if (l) {
@@ -3135,7 +3232,7 @@ bool Variant::in(const Variant &p_index, bool *r_valid) const {
if (p_index.get_type() == Variant::VECTOR2) {
Vector2 index = p_index;
- const Vector<Vector2> *arr = reinterpret_cast<const Vector<Vector2> *>(_data._mem);
+ const Vector<Vector2> *arr = &PackedArrayRef<Vector2>::get_array(_data.packed_array);
int l = arr->size();
if (l) {
@@ -3154,7 +3251,7 @@ bool Variant::in(const Variant &p_index, bool *r_valid) const {
if (p_index.get_type() == Variant::VECTOR3) {
Vector3 index = p_index;
- const Vector<Vector3> *arr = reinterpret_cast<const Vector<Vector3> *>(_data._mem);
+ const Vector<Vector3> *arr = &PackedArrayRef<Vector3>::get_array(_data.packed_array);
int l = arr->size();
if (l) {
@@ -3174,7 +3271,7 @@ bool Variant::in(const Variant &p_index, bool *r_valid) const {
if (p_index.get_type() == Variant::COLOR) {
Color index = p_index;
- const Vector<Color> *arr = reinterpret_cast<const Vector<Color> *>(_data._mem);
+ const Vector<Color> *arr = &PackedArrayRef<Color>::get_array(_data.packed_array);
int l = arr->size();
if (l) {
@@ -3202,16 +3299,16 @@ void Variant::get_property_list(List<PropertyInfo> *p_list) const {
switch (type) {
case VECTOR2: {
- p_list->push_back(PropertyInfo(Variant::REAL, "x"));
- p_list->push_back(PropertyInfo(Variant::REAL, "y"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "x"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "y"));
- } break; // 5
+ } break;
case VECTOR2I: {
p_list->push_back(PropertyInfo(Variant::INT, "x"));
p_list->push_back(PropertyInfo(Variant::INT, "y"));
- } break; // 5
+ } break;
case RECT2: {
p_list->push_back(PropertyInfo(Variant::VECTOR2, "position"));
@@ -3228,9 +3325,9 @@ void Variant::get_property_list(List<PropertyInfo> *p_list) const {
} break;
case VECTOR3: {
- p_list->push_back(PropertyInfo(Variant::REAL, "x"));
- p_list->push_back(PropertyInfo(Variant::REAL, "y"));
- p_list->push_back(PropertyInfo(Variant::REAL, "z"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "x"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "y"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "z"));
} break;
case VECTOR3I: {
@@ -3250,20 +3347,20 @@ void Variant::get_property_list(List<PropertyInfo> *p_list) const {
case PLANE: {
p_list->push_back(PropertyInfo(Variant::VECTOR3, "normal"));
- p_list->push_back(PropertyInfo(Variant::REAL, "x"));
- p_list->push_back(PropertyInfo(Variant::REAL, "y"));
- p_list->push_back(PropertyInfo(Variant::REAL, "z"));
- p_list->push_back(PropertyInfo(Variant::REAL, "d"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "x"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "y"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "z"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "d"));
} break;
case QUAT: {
- p_list->push_back(PropertyInfo(Variant::REAL, "x"));
- p_list->push_back(PropertyInfo(Variant::REAL, "y"));
- p_list->push_back(PropertyInfo(Variant::REAL, "z"));
- p_list->push_back(PropertyInfo(Variant::REAL, "w"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "x"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "y"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "z"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "w"));
- } break; // 10
+ } break;
case AABB: {
p_list->push_back(PropertyInfo(Variant::VECTOR3, "position"));
p_list->push_back(PropertyInfo(Variant::VECTOR3, "size"));
@@ -3283,13 +3380,13 @@ void Variant::get_property_list(List<PropertyInfo> *p_list) const {
} break;
case COLOR: {
- p_list->push_back(PropertyInfo(Variant::REAL, "r"));
- p_list->push_back(PropertyInfo(Variant::REAL, "g"));
- p_list->push_back(PropertyInfo(Variant::REAL, "b"));
- p_list->push_back(PropertyInfo(Variant::REAL, "a"));
- p_list->push_back(PropertyInfo(Variant::REAL, "h"));
- p_list->push_back(PropertyInfo(Variant::REAL, "s"));
- p_list->push_back(PropertyInfo(Variant::REAL, "v"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "r"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "g"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "b"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "a"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "h"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "s"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "v"));
p_list->push_back(PropertyInfo(Variant::INT, "r8"));
p_list->push_back(PropertyInfo(Variant::INT, "g8"));
p_list->push_back(PropertyInfo(Variant::INT, "b8"));
@@ -3297,9 +3394,9 @@ void Variant::get_property_list(List<PropertyInfo> *p_list) const {
} break;
case STRING_NAME: {
- } break; // 15
+ } break;
case NODE_PATH: {
- } break; // 15
+ } break;
case _RID: {
} break;
case OBJECT: {
@@ -3330,12 +3427,14 @@ void Variant::get_property_list(List<PropertyInfo> *p_list) const {
}
}
} break;
- case ARRAY: // 20
+ case ARRAY:
case PACKED_BYTE_ARRAY:
- case PACKED_INT_ARRAY:
- case PACKED_REAL_ARRAY:
+ case PACKED_INT32_ARRAY:
+ case PACKED_INT64_ARRAY:
+ case PACKED_FLOAT32_ARRAY:
+ case PACKED_FLOAT64_ARRAY:
case PACKED_STRING_ARRAY:
- case PACKED_VECTOR2_ARRAY: // 25
+ case PACKED_VECTOR2_ARRAY:
case PACKED_VECTOR3_ARRAY:
case PACKED_COLOR_ARRAY: {
@@ -3354,9 +3453,9 @@ bool Variant::iter_init(Variant &r_iter, bool &valid) const {
r_iter = 0;
return _data._int > 0;
} break;
- case REAL: {
+ case FLOAT: {
r_iter = 0;
- return _data._real > 0.0;
+ return _data._float > 0.0;
} break;
case VECTOR2: {
int64_t from = reinterpret_cast<const Vector2 *>(_data._mem)->x;
@@ -3442,23 +3541,39 @@ bool Variant::iter_init(Variant &r_iter, bool &valid) const {
return true;
} break;
case PACKED_BYTE_ARRAY: {
- const Vector<uint8_t> *arr = reinterpret_cast<const Vector<uint8_t> *>(_data._mem);
+ const Vector<uint8_t> *arr = &PackedArrayRef<uint8_t>::get_array(_data.packed_array);
if (arr->size() == 0)
return false;
r_iter = 0;
return true;
} break;
- case PACKED_INT_ARRAY: {
- const Vector<int> *arr = reinterpret_cast<const Vector<int> *>(_data._mem);
+ case PACKED_INT32_ARRAY: {
+ const Vector<int32_t> *arr = &PackedArrayRef<int32_t>::get_array(_data.packed_array);
if (arr->size() == 0)
return false;
r_iter = 0;
return true;
} break;
- case PACKED_REAL_ARRAY: {
- const Vector<real_t> *arr = reinterpret_cast<const Vector<real_t> *>(_data._mem);
+ case PACKED_INT64_ARRAY: {
+ const Vector<int64_t> *arr = &PackedArrayRef<int64_t>::get_array(_data.packed_array);
+ if (arr->size() == 0)
+ return false;
+ r_iter = 0;
+ return true;
+
+ } break;
+ case PACKED_FLOAT32_ARRAY: {
+ const Vector<float> *arr = &PackedArrayRef<float>::get_array(_data.packed_array);
+ if (arr->size() == 0)
+ return false;
+ r_iter = 0;
+ return true;
+
+ } break;
+ case PACKED_FLOAT64_ARRAY: {
+ const Vector<double> *arr = &PackedArrayRef<double>::get_array(_data.packed_array);
if (arr->size() == 0)
return false;
r_iter = 0;
@@ -3466,7 +3581,7 @@ bool Variant::iter_init(Variant &r_iter, bool &valid) const {
} break;
case PACKED_STRING_ARRAY: {
- const Vector<String> *arr = reinterpret_cast<const Vector<String> *>(_data._mem);
+ const Vector<String> *arr = &PackedArrayRef<String>::get_array(_data.packed_array);
if (arr->size() == 0)
return false;
r_iter = 0;
@@ -3474,7 +3589,7 @@ bool Variant::iter_init(Variant &r_iter, bool &valid) const {
} break;
case PACKED_VECTOR2_ARRAY: {
- const Vector<Vector2> *arr = reinterpret_cast<const Vector<Vector2> *>(_data._mem);
+ const Vector<Vector2> *arr = &PackedArrayRef<Vector2>::get_array(_data.packed_array);
if (arr->size() == 0)
return false;
r_iter = 0;
@@ -3482,7 +3597,7 @@ bool Variant::iter_init(Variant &r_iter, bool &valid) const {
} break;
case PACKED_VECTOR3_ARRAY: {
- const Vector<Vector3> *arr = reinterpret_cast<const Vector<Vector3> *>(_data._mem);
+ const Vector<Vector3> *arr = &PackedArrayRef<Vector3>::get_array(_data.packed_array);
if (arr->size() == 0)
return false;
r_iter = 0;
@@ -3490,7 +3605,7 @@ bool Variant::iter_init(Variant &r_iter, bool &valid) const {
} break;
case PACKED_COLOR_ARRAY: {
- const Vector<Color> *arr = reinterpret_cast<const Vector<Color> *>(_data._mem);
+ const Vector<Color> *arr = &PackedArrayRef<Color>::get_array(_data.packed_array);
if (arr->size() == 0)
return false;
r_iter = 0;
@@ -3516,10 +3631,10 @@ bool Variant::iter_next(Variant &r_iter, bool &valid) const {
r_iter = idx;
return true;
} break;
- case REAL: {
+ case FLOAT: {
int64_t idx = r_iter;
idx++;
- if (idx >= _data._real)
+ if (idx >= _data._float)
return false;
r_iter = idx;
return true;
@@ -3617,7 +3732,7 @@ bool Variant::iter_next(Variant &r_iter, bool &valid) const {
return true;
} break;
case PACKED_BYTE_ARRAY: {
- const Vector<uint8_t> *arr = reinterpret_cast<const Vector<uint8_t> *>(_data._mem);
+ const Vector<uint8_t> *arr = &PackedArrayRef<uint8_t>::get_array(_data.packed_array);
int idx = r_iter;
idx++;
if (idx >= arr->size())
@@ -3626,8 +3741,28 @@ bool Variant::iter_next(Variant &r_iter, bool &valid) const {
return true;
} break;
- case PACKED_INT_ARRAY: {
- const Vector<int> *arr = reinterpret_cast<const Vector<int> *>(_data._mem);
+ case PACKED_INT32_ARRAY: {
+ const Vector<int32_t> *arr = &PackedArrayRef<int32_t>::get_array(_data.packed_array);
+ int32_t idx = r_iter;
+ idx++;
+ if (idx >= arr->size())
+ return false;
+ r_iter = idx;
+ return true;
+
+ } break;
+ case PACKED_INT64_ARRAY: {
+ const Vector<int64_t> *arr = &PackedArrayRef<int64_t>::get_array(_data.packed_array);
+ int64_t idx = r_iter;
+ idx++;
+ if (idx >= arr->size())
+ return false;
+ r_iter = idx;
+ return true;
+
+ } break;
+ case PACKED_FLOAT32_ARRAY: {
+ const Vector<float> *arr = &PackedArrayRef<float>::get_array(_data.packed_array);
int idx = r_iter;
idx++;
if (idx >= arr->size())
@@ -3636,8 +3771,8 @@ bool Variant::iter_next(Variant &r_iter, bool &valid) const {
return true;
} break;
- case PACKED_REAL_ARRAY: {
- const Vector<real_t> *arr = reinterpret_cast<const Vector<real_t> *>(_data._mem);
+ case PACKED_FLOAT64_ARRAY: {
+ const Vector<double> *arr = &PackedArrayRef<double>::get_array(_data.packed_array);
int idx = r_iter;
idx++;
if (idx >= arr->size())
@@ -3647,7 +3782,7 @@ bool Variant::iter_next(Variant &r_iter, bool &valid) const {
} break;
case PACKED_STRING_ARRAY: {
- const Vector<String> *arr = reinterpret_cast<const Vector<String> *>(_data._mem);
+ const Vector<String> *arr = &PackedArrayRef<String>::get_array(_data.packed_array);
int idx = r_iter;
idx++;
if (idx >= arr->size())
@@ -3657,7 +3792,7 @@ bool Variant::iter_next(Variant &r_iter, bool &valid) const {
} break;
case PACKED_VECTOR2_ARRAY: {
- const Vector<Vector2> *arr = reinterpret_cast<const Vector<Vector2> *>(_data._mem);
+ const Vector<Vector2> *arr = &PackedArrayRef<Vector2>::get_array(_data.packed_array);
int idx = r_iter;
idx++;
if (idx >= arr->size())
@@ -3667,7 +3802,7 @@ bool Variant::iter_next(Variant &r_iter, bool &valid) const {
} break;
case PACKED_VECTOR3_ARRAY: {
- const Vector<Vector3> *arr = reinterpret_cast<const Vector<Vector3> *>(_data._mem);
+ const Vector<Vector3> *arr = &PackedArrayRef<Vector3>::get_array(_data.packed_array);
int idx = r_iter;
idx++;
if (idx >= arr->size())
@@ -3677,7 +3812,7 @@ bool Variant::iter_next(Variant &r_iter, bool &valid) const {
} break;
case PACKED_COLOR_ARRAY: {
- const Vector<Color> *arr = reinterpret_cast<const Vector<Color> *>(_data._mem);
+ const Vector<Color> *arr = &PackedArrayRef<Color>::get_array(_data.packed_array);
int idx = r_iter;
idx++;
if (idx >= arr->size())
@@ -3701,7 +3836,7 @@ Variant Variant::iter_get(const Variant &r_iter, bool &r_valid) const {
return r_iter;
} break;
- case REAL: {
+ case FLOAT: {
return r_iter;
} break;
@@ -3764,7 +3899,7 @@ Variant Variant::iter_get(const Variant &r_iter, bool &r_valid) const {
return arr->get(idx);
} break;
case PACKED_BYTE_ARRAY: {
- const Vector<uint8_t> *arr = reinterpret_cast<const Vector<uint8_t> *>(_data._mem);
+ const Vector<uint8_t> *arr = &PackedArrayRef<uint8_t>::get_array(_data.packed_array);
int idx = r_iter;
#ifdef DEBUG_ENABLED
if (idx < 0 || idx >= arr->size()) {
@@ -3774,8 +3909,30 @@ Variant Variant::iter_get(const Variant &r_iter, bool &r_valid) const {
#endif
return arr->get(idx);
} break;
- case PACKED_INT_ARRAY: {
- const Vector<int> *arr = reinterpret_cast<const Vector<int> *>(_data._mem);
+ case PACKED_INT32_ARRAY: {
+ const Vector<int32_t> *arr = &PackedArrayRef<int32_t>::get_array(_data.packed_array);
+ int32_t idx = r_iter;
+#ifdef DEBUG_ENABLED
+ if (idx < 0 || idx >= arr->size()) {
+ r_valid = false;
+ return Variant();
+ }
+#endif
+ return arr->get(idx);
+ } break;
+ case PACKED_INT64_ARRAY: {
+ const Vector<int64_t> *arr = &PackedArrayRef<int64_t>::get_array(_data.packed_array);
+ int64_t idx = r_iter;
+#ifdef DEBUG_ENABLED
+ if (idx < 0 || idx >= arr->size()) {
+ r_valid = false;
+ return Variant();
+ }
+#endif
+ return arr->get(idx);
+ } break;
+ case PACKED_FLOAT32_ARRAY: {
+ const Vector<float> *arr = &PackedArrayRef<float>::get_array(_data.packed_array);
int idx = r_iter;
#ifdef DEBUG_ENABLED
if (idx < 0 || idx >= arr->size()) {
@@ -3785,8 +3942,8 @@ Variant Variant::iter_get(const Variant &r_iter, bool &r_valid) const {
#endif
return arr->get(idx);
} break;
- case PACKED_REAL_ARRAY: {
- const Vector<real_t> *arr = reinterpret_cast<const Vector<real_t> *>(_data._mem);
+ case PACKED_FLOAT64_ARRAY: {
+ const Vector<double> *arr = &PackedArrayRef<double>::get_array(_data.packed_array);
int idx = r_iter;
#ifdef DEBUG_ENABLED
if (idx < 0 || idx >= arr->size()) {
@@ -3797,7 +3954,7 @@ Variant Variant::iter_get(const Variant &r_iter, bool &r_valid) const {
return arr->get(idx);
} break;
case PACKED_STRING_ARRAY: {
- const Vector<String> *arr = reinterpret_cast<const Vector<String> *>(_data._mem);
+ const Vector<String> *arr = &PackedArrayRef<String>::get_array(_data.packed_array);
int idx = r_iter;
#ifdef DEBUG_ENABLED
if (idx < 0 || idx >= arr->size()) {
@@ -3809,7 +3966,7 @@ Variant Variant::iter_get(const Variant &r_iter, bool &r_valid) const {
} break;
case PACKED_VECTOR2_ARRAY: {
- const Vector<Vector2> *arr = reinterpret_cast<const Vector<Vector2> *>(_data._mem);
+ const Vector<Vector2> *arr = &PackedArrayRef<Vector2>::get_array(_data.packed_array);
int idx = r_iter;
#ifdef DEBUG_ENABLED
if (idx < 0 || idx >= arr->size()) {
@@ -3821,7 +3978,7 @@ Variant Variant::iter_get(const Variant &r_iter, bool &r_valid) const {
} break;
case PACKED_VECTOR3_ARRAY: {
- const Vector<Vector3> *arr = reinterpret_cast<const Vector<Vector3> *>(_data._mem);
+ const Vector<Vector3> *arr = &PackedArrayRef<Vector3>::get_array(_data.packed_array);
int idx = r_iter;
#ifdef DEBUG_ENABLED
if (idx < 0 || idx >= arr->size()) {
@@ -3833,7 +3990,7 @@ Variant Variant::iter_get(const Variant &r_iter, bool &r_valid) const {
} break;
case PACKED_COLOR_ARRAY: {
- const Vector<Color> *arr = reinterpret_cast<const Vector<Color> *>(_data._mem);
+ const Vector<Color> *arr = &PackedArrayRef<Color>::get_array(_data.packed_array);
int idx = r_iter;
#ifdef DEBUG_ENABLED
if (idx < 0 || idx >= arr->size()) {
@@ -3896,9 +4053,9 @@ void Variant::blend(const Variant &a, const Variant &b, float c, Variant &r_dst)
r_dst = int(va + vb * c + 0.5);
}
return;
- case REAL: {
- double ra = a._data._real;
- double rb = b._data._real;
+ case FLOAT: {
+ double ra = a._data._float;
+ double rb = b._data._float;
r_dst = ra + rb * c;
}
return;
@@ -4015,9 +4172,9 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant &
r_dst = int(va + (vb - va) * c);
}
return;
- case REAL: {
- real_t va = a._data._real;
- real_t vb = b._data._real;
+ case FLOAT: {
+ real_t va = a._data._float;
+ real_t vb = b._data._float;
r_dst = va + (vb - va) * c;
}
return;
@@ -4166,21 +4323,73 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant &
r_dst = a;
}
return;
- case PACKED_INT_ARRAY: {
- const Vector<int> *arr_a = reinterpret_cast<const Vector<int> *>(a._data._mem);
- const Vector<int> *arr_b = reinterpret_cast<const Vector<int> *>(b._data._mem);
+ case PACKED_INT32_ARRAY: {
+ const Vector<int32_t> *arr_a = &PackedArrayRef<int32_t>::get_array(a._data.packed_array);
+ const Vector<int32_t> *arr_b = &PackedArrayRef<int32_t>::get_array(b._data.packed_array);
+ int32_t sz = arr_a->size();
+ if (sz == 0 || arr_b->size() != sz) {
+
+ r_dst = a;
+ } else {
+
+ Vector<int32_t> v;
+ v.resize(sz);
+ {
+ int32_t *vw = v.ptrw();
+ const int32_t *ar = arr_a->ptr();
+ const int32_t *br = arr_b->ptr();
+
+ Variant va;
+ for (int32_t i = 0; i < sz; i++) {
+ Variant::interpolate(ar[i], br[i], c, va);
+ vw[i] = va;
+ }
+ }
+ r_dst = v;
+ }
+ }
+ return;
+ case PACKED_INT64_ARRAY: {
+ const Vector<int64_t> *arr_a = &PackedArrayRef<int64_t>::get_array(a._data.packed_array);
+ const Vector<int64_t> *arr_b = &PackedArrayRef<int64_t>::get_array(b._data.packed_array);
+ int64_t sz = arr_a->size();
+ if (sz == 0 || arr_b->size() != sz) {
+
+ r_dst = a;
+ } else {
+
+ Vector<int64_t> v;
+ v.resize(sz);
+ {
+ int64_t *vw = v.ptrw();
+ const int64_t *ar = arr_a->ptr();
+ const int64_t *br = arr_b->ptr();
+
+ Variant va;
+ for (int64_t i = 0; i < sz; i++) {
+ Variant::interpolate(ar[i], br[i], c, va);
+ vw[i] = va;
+ }
+ }
+ r_dst = v;
+ }
+ }
+ return;
+ case PACKED_FLOAT32_ARRAY: {
+ const Vector<float> *arr_a = &PackedArrayRef<float>::get_array(a._data.packed_array);
+ const Vector<float> *arr_b = &PackedArrayRef<float>::get_array(b._data.packed_array);
int sz = arr_a->size();
if (sz == 0 || arr_b->size() != sz) {
r_dst = a;
} else {
- Vector<int> v;
+ Vector<float> v;
v.resize(sz);
{
- int *vw = v.ptrw();
- const int *ar = arr_a->ptr();
- const int *br = arr_b->ptr();
+ float *vw = v.ptrw();
+ const float *ar = arr_a->ptr();
+ const float *br = arr_b->ptr();
Variant va;
for (int i = 0; i < sz; i++) {
@@ -4192,21 +4401,21 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant &
}
}
return;
- case PACKED_REAL_ARRAY: {
- const Vector<real_t> *arr_a = reinterpret_cast<const Vector<real_t> *>(a._data._mem);
- const Vector<real_t> *arr_b = reinterpret_cast<const Vector<real_t> *>(b._data._mem);
+ case PACKED_FLOAT64_ARRAY: {
+ const Vector<double> *arr_a = &PackedArrayRef<double>::get_array(a._data.packed_array);
+ const Vector<double> *arr_b = &PackedArrayRef<double>::get_array(b._data.packed_array);
int sz = arr_a->size();
if (sz == 0 || arr_b->size() != sz) {
r_dst = a;
} else {
- Vector<real_t> v;
+ Vector<double> v;
v.resize(sz);
{
- real_t *vw = v.ptrw();
- const real_t *ar = arr_a->ptr();
- const real_t *br = arr_b->ptr();
+ double *vw = v.ptrw();
+ const double *ar = arr_a->ptr();
+ const double *br = arr_b->ptr();
Variant va;
for (int i = 0; i < sz; i++) {
@@ -4223,8 +4432,8 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant &
}
return;
case PACKED_VECTOR2_ARRAY: {
- const Vector<Vector2> *arr_a = reinterpret_cast<const Vector<Vector2> *>(a._data._mem);
- const Vector<Vector2> *arr_b = reinterpret_cast<const Vector<Vector2> *>(b._data._mem);
+ const Vector<Vector2> *arr_a = &PackedArrayRef<Vector2>::get_array(a._data.packed_array);
+ const Vector<Vector2> *arr_b = &PackedArrayRef<Vector2>::get_array(b._data.packed_array);
int sz = arr_a->size();
if (sz == 0 || arr_b->size() != sz) {
@@ -4248,8 +4457,8 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant &
return;
case PACKED_VECTOR3_ARRAY: {
- const Vector<Vector3> *arr_a = reinterpret_cast<const Vector<Vector3> *>(a._data._mem);
- const Vector<Vector3> *arr_b = reinterpret_cast<const Vector<Vector3> *>(b._data._mem);
+ const Vector<Vector3> *arr_a = &PackedArrayRef<Vector3>::get_array(a._data.packed_array);
+ const Vector<Vector3> *arr_b = &PackedArrayRef<Vector3>::get_array(b._data.packed_array);
int sz = arr_a->size();
if (sz == 0 || arr_b->size() != sz) {
@@ -4272,8 +4481,8 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant &
}
return;
case PACKED_COLOR_ARRAY: {
- const Vector<Color> *arr_a = reinterpret_cast<const Vector<Color> *>(a._data._mem);
- const Vector<Color> *arr_b = reinterpret_cast<const Vector<Color> *>(b._data._mem);
+ const Vector<Color> *arr_a = &PackedArrayRef<Color>::get_array(a._data.packed_array);
+ const Vector<Color> *arr_b = &PackedArrayRef<Color>::get_array(b._data.packed_array);
int sz = arr_a->size();
if (sz == 0 || arr_b->size() != sz) {
diff --git a/core/variant_parser.cpp b/core/variant_parser.cpp
index 0875a9a2a5..12fd9976bd 100644
--- a/core/variant_parser.cpp
+++ b/core/variant_parser.cpp
@@ -216,7 +216,7 @@ Error VariantParser::get_token(Stream *p_stream, Token &r_token, int &line, Stri
}
string_name = true;
- FALLTHROUGH;
+ [[fallthrough]];
}
case '"': {
@@ -941,20 +941,20 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
return OK;
- } else if (id == "PackedIntArray" || id == "PoolIntArray" || id == "IntArray") {
+ } else if (id == "PackedInt32Array" || id == "PackedIntArray" || id == "PoolIntArray" || id == "IntArray") {
- Vector<int> args;
- Error err = _parse_construct<int>(p_stream, args, line, r_err_str);
+ Vector<int32_t> args;
+ Error err = _parse_construct<int32_t>(p_stream, args, line, r_err_str);
if (err)
return err;
- Vector<int> arr;
+ Vector<int32_t> arr;
{
- int len = args.size();
+ int32_t len = args.size();
arr.resize(len);
- int *w = arr.ptrw();
- for (int i = 0; i < len; i++) {
- w[i] = int(args[i]);
+ int32_t *w = arr.ptrw();
+ for (int32_t i = 0; i < len; i++) {
+ w[i] = int32_t(args[i]);
}
}
@@ -962,7 +962,28 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
return OK;
- } else if (id == "PackedRealArray" || id == "PoolRealArray" || id == "FloatArray") {
+ } else if (id == "PackedInt64Array") {
+
+ Vector<int64_t> args;
+ Error err = _parse_construct<int64_t>(p_stream, args, line, r_err_str);
+ if (err)
+ return err;
+
+ Vector<int64_t> arr;
+ {
+ int64_t len = args.size();
+ arr.resize(len);
+ int64_t *w = arr.ptrw();
+ for (int64_t i = 0; i < len; i++) {
+ w[i] = int64_t(args[i]);
+ }
+ }
+
+ value = arr;
+
+ return OK;
+
+ } else if (id == "PackedFloat32Array" || id == "PackedRealArray" || id == "PoolRealArray" || id == "FloatArray") {
Vector<float> args;
Error err = _parse_construct<float>(p_stream, args, line, r_err_str);
@@ -982,6 +1003,26 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
value = arr;
return OK;
+ } else if (id == "PackedFloat64Array") {
+
+ Vector<double> args;
+ Error err = _parse_construct<double>(p_stream, args, line, r_err_str);
+ if (err)
+ return err;
+
+ Vector<double> arr;
+ {
+ int len = args.size();
+ arr.resize(len);
+ double *w = arr.ptrw();
+ for (int i = 0; i < len; i++) {
+ w[i] = args[i];
+ }
+ }
+
+ value = arr;
+
+ return OK;
} else if (id == "PackedStringArray" || id == "PoolStringArray" || id == "StringArray") {
get_token(p_stream, token, line, r_err_str);
@@ -1110,6 +1151,10 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
value = token.value;
return OK;
+ } else if (token.type == TK_STRING_NAME) {
+
+ value = token.value;
+ return OK;
} else if (token.type == TK_COLOR) {
value = token.value;
@@ -1451,7 +1496,7 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
p_store_string_func(p_store_string_ud, itos(p_variant.operator int64_t()));
} break;
- case Variant::REAL: {
+ case Variant::FLOAT: {
String s = rtosfix(p_variant.operator real_t());
if (s.find(".") == -1 && s.find("e") == -1)
@@ -1711,14 +1756,14 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
p_store_string_func(p_store_string_ud, " )");
} break;
- case Variant::PACKED_INT_ARRAY: {
+ case Variant::PACKED_INT32_ARRAY: {
- p_store_string_func(p_store_string_ud, "PackedIntArray( ");
- Vector<int> data = p_variant;
- int len = data.size();
- const int *ptr = data.ptr();
+ p_store_string_func(p_store_string_ud, "PackedInt32Array( ");
+ Vector<int32_t> data = p_variant;
+ int32_t len = data.size();
+ const int32_t *ptr = data.ptr();
- for (int i = 0; i < len; i++) {
+ for (int32_t i = 0; i < len; i++) {
if (i > 0)
p_store_string_func(p_store_string_ud, ", ");
@@ -1729,12 +1774,47 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
p_store_string_func(p_store_string_ud, " )");
} break;
- case Variant::PACKED_REAL_ARRAY: {
+ case Variant::PACKED_INT64_ARRAY: {
+
+ p_store_string_func(p_store_string_ud, "PackedInt64Array( ");
+ Vector<int64_t> data = p_variant;
+ int64_t len = data.size();
+ const int64_t *ptr = data.ptr();
+
+ for (int64_t i = 0; i < len; i++) {
+
+ if (i > 0)
+ p_store_string_func(p_store_string_ud, ", ");
+
+ p_store_string_func(p_store_string_ud, itos(ptr[i]));
+ }
+
+ p_store_string_func(p_store_string_ud, " )");
+
+ } break;
+ case Variant::PACKED_FLOAT32_ARRAY: {
+
+ p_store_string_func(p_store_string_ud, "PackedFloat32Array( ");
+ Vector<float> data = p_variant;
+ int len = data.size();
+ const float *ptr = data.ptr();
+
+ for (int i = 0; i < len; i++) {
+
+ if (i > 0)
+ p_store_string_func(p_store_string_ud, ", ");
+ p_store_string_func(p_store_string_ud, rtosfix(ptr[i]));
+ }
+
+ p_store_string_func(p_store_string_ud, " )");
+
+ } break;
+ case Variant::PACKED_FLOAT64_ARRAY: {
- p_store_string_func(p_store_string_ud, "PackedRealArray( ");
- Vector<real_t> data = p_variant;
+ p_store_string_func(p_store_string_ud, "PackedFloat64Array( ");
+ Vector<double> data = p_variant;
int len = data.size();
- const real_t *ptr = data.ptr();
+ const double *ptr = data.ptr();
for (int i = 0; i < len; i++) {
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index cee3f31d29..3d22c5c6ed 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -53,7 +53,7 @@
The [JavaScript] singleton.
[b]Note:[/b] Only implemented on HTML5.
</member>
- <member name="Marshalls" type="Reference" setter="" getter="">
+ <member name="Marshalls" type="Marshalls" setter="" getter="">
The [Marshalls] singleton.
</member>
<member name="Navigation2DServer" type="Navigation2DServer" setter="" getter="">
@@ -1480,76 +1480,94 @@
<constant name="TYPE_VECTOR2" value="5" enum="Variant.Type">
Variable is of type [Vector2].
</constant>
- <constant name="TYPE_RECT2" value="6" enum="Variant.Type">
+ <constant name="TYPE_VECTOR2I" value="6" enum="Variant.Type">
+ Variable is of type [Vector2i].
+ </constant>
+ <constant name="TYPE_RECT2" value="7" enum="Variant.Type">
Variable is of type [Rect2].
</constant>
- <constant name="TYPE_VECTOR3" value="7" enum="Variant.Type">
+ <constant name="TYPE_RECT2I" value="8" enum="Variant.Type">
+ Variable is of type [Rect2i].
+ </constant>
+ <constant name="TYPE_VECTOR3" value="9" enum="Variant.Type">
Variable is of type [Vector3].
</constant>
- <constant name="TYPE_TRANSFORM2D" value="8" enum="Variant.Type">
+ <constant name="TYPE_VECTOR3I" value="10" enum="Variant.Type">
+ Variable is of type [Vector3i].
+ </constant>
+ <constant name="TYPE_TRANSFORM2D" value="11" enum="Variant.Type">
Variable is of type [Transform2D].
</constant>
- <constant name="TYPE_PLANE" value="9" enum="Variant.Type">
+ <constant name="TYPE_PLANE" value="12" enum="Variant.Type">
Variable is of type [Plane].
</constant>
- <constant name="TYPE_QUAT" value="10" enum="Variant.Type">
+ <constant name="TYPE_QUAT" value="13" enum="Variant.Type">
Variable is of type [Quat].
</constant>
- <constant name="TYPE_AABB" value="11" enum="Variant.Type">
+ <constant name="TYPE_AABB" value="14" enum="Variant.Type">
Variable is of type [AABB].
</constant>
- <constant name="TYPE_BASIS" value="12" enum="Variant.Type">
+ <constant name="TYPE_BASIS" value="15" enum="Variant.Type">
Variable is of type [Basis].
</constant>
- <constant name="TYPE_TRANSFORM" value="13" enum="Variant.Type">
+ <constant name="TYPE_TRANSFORM" value="16" enum="Variant.Type">
Variable is of type [Transform].
</constant>
- <constant name="TYPE_COLOR" value="14" enum="Variant.Type">
+ <constant name="TYPE_COLOR" value="17" enum="Variant.Type">
Variable is of type [Color].
</constant>
- <constant name="TYPE_STRING_NAME" value="15" enum="Variant.Type">
+ <constant name="TYPE_STRING_NAME" value="18" enum="Variant.Type">
+ Variable is of type [StringName].
</constant>
- <constant name="TYPE_NODE_PATH" value="16" enum="Variant.Type">
+ <constant name="TYPE_NODE_PATH" value="19" enum="Variant.Type">
Variable is of type [NodePath].
</constant>
- <constant name="TYPE_RID" value="17" enum="Variant.Type">
+ <constant name="TYPE_RID" value="20" enum="Variant.Type">
Variable is of type [RID].
</constant>
- <constant name="TYPE_OBJECT" value="18" enum="Variant.Type">
+ <constant name="TYPE_OBJECT" value="21" enum="Variant.Type">
Variable is of type [Object].
</constant>
- <constant name="TYPE_CALLABLE" value="19" enum="Variant.Type">
+ <constant name="TYPE_CALLABLE" value="22" enum="Variant.Type">
+ Variable is of type [Callable].
</constant>
- <constant name="TYPE_SIGNAL" value="20" enum="Variant.Type">
+ <constant name="TYPE_SIGNAL" value="23" enum="Variant.Type">
+ Variable is of type [Signal].
</constant>
- <constant name="TYPE_DICTIONARY" value="21" enum="Variant.Type">
+ <constant name="TYPE_DICTIONARY" value="24" enum="Variant.Type">
Variable is of type [Dictionary].
</constant>
- <constant name="TYPE_ARRAY" value="22" enum="Variant.Type">
+ <constant name="TYPE_ARRAY" value="25" enum="Variant.Type">
Variable is of type [Array].
</constant>
- <constant name="TYPE_RAW_ARRAY" value="23" enum="Variant.Type">
+ <constant name="TYPE_RAW_ARRAY" value="26" enum="Variant.Type">
Variable is of type [PackedByteArray].
</constant>
- <constant name="TYPE_INT_ARRAY" value="24" enum="Variant.Type">
- Variable is of type [PackedIntArray].
+ <constant name="TYPE_INT32_ARRAY" value="27" enum="Variant.Type">
+ Variable is of type [PackedInt32Array].
+ </constant>
+ <constant name="TYPE_INT64_ARRAY" value="28" enum="Variant.Type">
+ Variable is of type [PackedInt64Array].
+ </constant>
+ <constant name="TYPE_FLOAT32_ARRAY" value="29" enum="Variant.Type">
+ Variable is of type [PackedFloat32Array].
</constant>
- <constant name="TYPE_REAL_ARRAY" value="25" enum="Variant.Type">
- Variable is of type [PackedRealArray].
+ <constant name="TYPE_FLOAT64_ARRAY" value="30" enum="Variant.Type">
+ Variable is of type [PackedFloat64Array].
</constant>
- <constant name="TYPE_STRING_ARRAY" value="26" enum="Variant.Type">
+ <constant name="TYPE_STRING_ARRAY" value="31" enum="Variant.Type">
Variable is of type [PackedStringArray].
</constant>
- <constant name="TYPE_VECTOR2_ARRAY" value="27" enum="Variant.Type">
+ <constant name="TYPE_VECTOR2_ARRAY" value="32" enum="Variant.Type">
Variable is of type [PackedVector2Array].
</constant>
- <constant name="TYPE_VECTOR3_ARRAY" value="28" enum="Variant.Type">
+ <constant name="TYPE_VECTOR3_ARRAY" value="33" enum="Variant.Type">
Variable is of type [PackedVector3Array].
</constant>
- <constant name="TYPE_COLOR_ARRAY" value="29" enum="Variant.Type">
+ <constant name="TYPE_COLOR_ARRAY" value="34" enum="Variant.Type">
Variable is of type [PackedColorArray].
</constant>
- <constant name="TYPE_MAX" value="30" enum="Variant.Type">
+ <constant name="TYPE_MAX" value="35" enum="Variant.Type">
Represents the size of the [enum Variant.Type] enum.
</constant>
<constant name="OP_EQUAL" value="0" enum="Variant.Operator">
diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml
index d175aa6f45..e930abba87 100644
--- a/doc/classes/AStar.xml
+++ b/doc/classes/AStar.xml
@@ -152,7 +152,7 @@
</description>
</method>
<method name="get_id_path">
- <return type="PackedIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="from_id" type="int">
</argument>
@@ -185,7 +185,7 @@
</description>
</method>
<method name="get_point_connections">
- <return type="PackedIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="id" type="int">
</argument>
diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml
index af1fb3e273..2639f62552 100644
--- a/doc/classes/AStar2D.xml
+++ b/doc/classes/AStar2D.xml
@@ -111,7 +111,7 @@
</description>
</method>
<method name="get_id_path">
- <return type="PackedIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="from_id" type="int">
</argument>
@@ -144,7 +144,7 @@
</description>
</method>
<method name="get_point_connections">
- <return type="PackedIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="id" type="int">
</argument>
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
index 51de591f49..0926ef9855 100644
--- a/doc/classes/Animation.xml
+++ b/doc/classes/Animation.xml
@@ -274,7 +274,7 @@
</description>
</method>
<method name="method_track_get_key_indices" qualifiers="const">
- <return type="PackedIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
@@ -627,7 +627,7 @@
</description>
</method>
<method name="value_track_get_key_indices" qualifiers="const">
- <return type="PackedIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index f99af5b091..a294967fc9 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -58,19 +58,37 @@
<method name="Array">
<return type="Array">
</return>
- <argument index="0" name="from" type="PackedRealArray">
+ <argument index="0" name="from" type="PackedFloat64Array">
</argument>
<description>
- Constructs an array from a [PackedRealArray].
+ Constructs an array from a [PackedFloat64Array].
</description>
</method>
<method name="Array">
<return type="Array">
</return>
- <argument index="0" name="from" type="PackedIntArray">
+ <argument index="0" name="from" type="PackedFloat32Array">
</argument>
<description>
- Constructs an array from a [PackedIntArray].
+ Constructs an array from a [PackedFloat32Array].
+ </description>
+ </method>
+ <method name="Array">
+ <return type="Array">
+ </return>
+ <argument index="0" name="from" type="PackedInt64Array">
+ </argument>
+ <description>
+ Constructs an array from a [PackedInt64Array].
+ </description>
+ </method>
+ <method name="Array">
+ <return type="Array">
+ </return>
+ <argument index="0" name="from" type="PackedInt32Array">
+ </argument>
+ <description>
+ Constructs an array from a [PackedInt32Array].
</description>
</method>
<method name="Array">
diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml
index 3c599792ad..33b62054df 100644
--- a/doc/classes/ArrayMesh.xml
+++ b/doc/classes/ArrayMesh.xml
@@ -208,7 +208,7 @@
[PackedVector3Array] of vertex normals.
</constant>
<constant name="ARRAY_TANGENT" value="2" enum="ArrayType">
- [PackedRealArray] of vertex tangents. Each element in groups of 4 floats, first 3 floats determine the tangent, and the last the binormal direction as -1 or 1.
+ [PackedFloat32Array] of vertex tangents. Each element in groups of 4 floats, first 3 floats determine the tangent, and the last the binormal direction as -1 or 1.
</constant>
<constant name="ARRAY_COLOR" value="3" enum="ArrayType">
[PackedColorArray] of vertex colors.
@@ -220,13 +220,13 @@
[PackedVector2Array] for second UV coordinates.
</constant>
<constant name="ARRAY_BONES" value="6" enum="ArrayType">
- [PackedRealArray] or [PackedIntArray] of bone indices. Each element in groups of 4 floats.
+ [PackedFloat32Array] or [PackedInt32Array] of bone indices. Each element in groups of 4 floats.
</constant>
<constant name="ARRAY_WEIGHTS" value="7" enum="ArrayType">
- [PackedRealArray] of bone weights. Each element in groups of 4 floats.
+ [PackedFloat32Array] of bone weights. Each element in groups of 4 floats.
</constant>
<constant name="ARRAY_INDEX" value="8" enum="ArrayType">
- [PackedIntArray] of integers used as indices referencing vertices, colors, normals, tangents, and textures. All of those arrays must have the same number of elements as the vertex array. No index can be beyond the vertex array size. When this index array is present, it puts the function into "index mode," where the index selects the *i*'th vertex, normal, tangent, color, UV, etc. This means if you want to have different normals or colors along an edge, you have to duplicate the vertices.
+ [PackedInt32Array] of integers used as indices referencing vertices, colors, normals, tangents, and textures. All of those arrays must have the same number of elements as the vertex array. No index can be beyond the vertex array size. When this index array is present, it puts the function into "index mode," where the index selects the *i*'th vertex, normal, tangent, color, UV, etc. This means if you want to have different normals or colors along an edge, you have to duplicate the vertices.
For triangles, the index array is interpreted as triples, referring to the vertices of each triangle. For lines, the index array is in pairs indicating the start and end of each line.
</constant>
<constant name="ARRAY_MAX" value="9" enum="ArrayType">
diff --git a/doc/classes/BoxContainer.xml b/doc/classes/BoxContainer.xml
index 4b5d4c853a..0d8233e6ff 100644
--- a/doc/classes/BoxContainer.xml
+++ b/doc/classes/BoxContainer.xml
@@ -4,7 +4,7 @@
Base class for box containers.
</brief_description>
<description>
- Arranges child controls vertically or horizontally, and rearranges the controls automatically when their minimum size changes.
+ Arranges child [Control] nodes vertically or horizontally, and rearranges them automatically when their minimum size changes.
</description>
<tutorials>
</tutorials>
@@ -15,13 +15,13 @@
<argument index="0" name="begin" type="bool">
</argument>
<description>
- Adds a control to the box as a spacer. If [code]true[/code], [code]begin[/code] will insert the spacer control in front of other children.
+ Adds a [Control] node to the box as a spacer. If [code]begin[/code] is [code]true[/code], it will insert the [Control] node in front of all other children.
</description>
</method>
</methods>
<members>
<member name="alignment" type="int" setter="set_alignment" getter="get_alignment" enum="BoxContainer.AlignMode" default="0">
- The alignment of the container's children (must be one of [constant ALIGN_BEGIN], [constant ALIGN_CENTER] or [constant ALIGN_END]).
+ The alignment of the container's children (must be one of [constant ALIGN_BEGIN], [constant ALIGN_CENTER], or [constant ALIGN_END]).
</member>
</members>
<constants>
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index e6251a1d66..dec7c907a4 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -260,7 +260,7 @@
<argument index="9" name="texture_repeat" type="int" enum="CanvasItem.TextureRepeat" default="0">
</argument>
<description>
- Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for a triangle and 4 points for a quad.
+ Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for a triangle, and 4 points for a quad.
</description>
</method>
<method name="draw_rect">
diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml
index 0805a87d18..5ab929d911 100644
--- a/doc/classes/ColorPicker.xml
+++ b/doc/classes/ColorPicker.xml
@@ -4,7 +4,7 @@
Color picker control.
</brief_description>
<description>
- [Control] node displaying a color picker widget. It's useful for selecting a color from an RGB/RGBA colorspace.
+ Displays a color picker widget. Useful for selecting a color from an RGB/RGBA colorspace.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml
index c5345c8025..5024cdefbd 100644
--- a/doc/classes/Curve3D.xml
+++ b/doc/classes/Curve3D.xml
@@ -48,10 +48,10 @@
</description>
</method>
<method name="get_baked_tilts" qualifiers="const">
- <return type="PackedRealArray">
+ <return type="PackedFloat32Array">
</return>
<description>
- Returns the cache of tilts as a [PackedRealArray].
+ Returns the cache of tilts as a [PackedFloat32Array].
</description>
</method>
<method name="get_baked_up_vectors" qualifiers="const">
diff --git a/doc/classes/GIProbeData.xml b/doc/classes/GIProbeData.xml
index 3504d127b8..228e1afb4c 100644
--- a/doc/classes/GIProbeData.xml
+++ b/doc/classes/GIProbeData.xml
@@ -22,7 +22,7 @@
</argument>
<argument index="5" name="distance_field" type="PackedByteArray">
</argument>
- <argument index="6" name="level_counts" type="PackedIntArray">
+ <argument index="6" name="level_counts" type="PackedInt32Array">
</argument>
<description>
</description>
@@ -40,7 +40,7 @@
</description>
</method>
<method name="get_level_counts" qualifiers="const">
- <return type="PackedIntArray">
+ <return type="PackedInt32Array">
</return>
<description>
</description>
diff --git a/doc/classes/Geometry.xml b/doc/classes/Geometry.xml
index 9d4e0d0388..b2d77f6f92 100644
--- a/doc/classes/Geometry.xml
+++ b/doc/classes/Geometry.xml
@@ -445,21 +445,21 @@
</description>
</method>
<method name="triangulate_delaunay_2d">
- <return type="PackedIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="points" type="PackedVector2Array">
</argument>
<description>
- Triangulates the area specified by discrete set of [code]points[/code] such that no point is inside the circumcircle of any resulting triangle. Returns a [PackedIntArray] where each triangle consists of three consecutive point indices into [code]points[/code] (i.e. the returned array will have [code]n * 3[/code] elements, with [code]n[/code] being the number of found triangles). If the triangulation did not succeed, an empty [PackedIntArray] is returned.
+ Triangulates the area specified by discrete set of [code]points[/code] such that no point is inside the circumcircle of any resulting triangle. Returns a [PackedInt32Array] where each triangle consists of three consecutive point indices into [code]points[/code] (i.e. the returned array will have [code]n * 3[/code] elements, with [code]n[/code] being the number of found triangles). If the triangulation did not succeed, an empty [PackedInt32Array] is returned.
</description>
</method>
<method name="triangulate_polygon">
- <return type="PackedIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="polygon" type="PackedVector2Array">
</argument>
<description>
- Triangulates the polygon specified by the points in [code]polygon[/code]. Returns a [PackedIntArray] where each triangle consists of three consecutive point indices into [code]polygon[/code] (i.e. the returned array will have [code]n * 3[/code] elements, with [code]n[/code] being the number of found triangles). If the triangulation did not succeed, an empty [PackedIntArray] is returned.
+ Triangulates the polygon specified by the points in [code]polygon[/code]. Returns a [PackedInt32Array] where each triangle consists of three consecutive point indices into [code]polygon[/code] (i.e. the returned array will have [code]n * 3[/code] elements, with [code]n[/code] being the number of found triangles). If the triangulation did not succeed, an empty [PackedInt32Array] is returned.
</description>
</method>
</methods>
diff --git a/doc/classes/Gradient.xml b/doc/classes/Gradient.xml
index 12c87f9cff..05aebef9de 100644
--- a/doc/classes/Gradient.xml
+++ b/doc/classes/Gradient.xml
@@ -90,8 +90,8 @@
<member name="colors" type="PackedColorArray" setter="set_colors" getter="get_colors" default="PackedColorArray( 0, 0, 0, 1, 1, 1, 1, 1 )">
Gradient's colors returned as a [PackedColorArray].
</member>
- <member name="offsets" type="PackedRealArray" setter="set_offsets" getter="get_offsets" default="PackedRealArray( 0, 1 )">
- Gradient's offsets returned as a [PackedRealArray].
+ <member name="offsets" type="PackedFloat32Array" setter="set_offsets" getter="get_offsets" default="PackedFloat32Array( 0, 1 )">
+ Gradient's offsets returned as a [PackedFloat32Array].
</member>
</members>
<constants>
diff --git a/doc/classes/HeightMapShape.xml b/doc/classes/HeightMapShape.xml
index 505961cd0c..029f3642d2 100644
--- a/doc/classes/HeightMapShape.xml
+++ b/doc/classes/HeightMapShape.xml
@@ -11,7 +11,7 @@
<methods>
</methods>
<members>
- <member name="map_data" type="PackedRealArray" setter="set_map_data" getter="get_map_data" default="PackedRealArray( 0, 0, 0, 0 )">
+ <member name="map_data" type="PackedFloat32Array" setter="set_map_data" getter="get_map_data" default="PackedFloat32Array( 0, 0, 0, 0 )">
Height map data, pool array must be of [member map_width] * [member map_depth] size.
</member>
<member name="map_depth" type="int" setter="set_map_depth" getter="get_map_depth" default="2">
diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml
index d53fabaacb..c6ed1e22ed 100644
--- a/doc/classes/ItemList.xml
+++ b/doc/classes/ItemList.xml
@@ -142,7 +142,7 @@
</description>
</method>
<method name="get_selected_items">
- <return type="PackedIntArray">
+ <return type="PackedInt32Array">
</return>
<description>
Returns an array with the indexes of the selected items.
diff --git a/doc/classes/Marshalls.xml b/doc/classes/Marshalls.xml
index 6707068c5a..4250ffd700 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" version="4.0">
+<class name="Marshalls" inherits="Object" version="4.0">
<brief_description>
Data transformation (marshalling) and encoding helpers.
</brief_description>
diff --git a/doc/classes/MeshDataTool.xml b/doc/classes/MeshDataTool.xml
index bdc9d20305..81ff5969e3 100644
--- a/doc/classes/MeshDataTool.xml
+++ b/doc/classes/MeshDataTool.xml
@@ -57,7 +57,7 @@
</description>
</method>
<method name="get_edge_faces" qualifiers="const">
- <return type="PackedIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -160,7 +160,7 @@
</description>
</method>
<method name="get_vertex_bones" qualifiers="const">
- <return type="PackedIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -185,7 +185,7 @@
</description>
</method>
<method name="get_vertex_edges" qualifiers="const">
- <return type="PackedIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -194,7 +194,7 @@
</description>
</method>
<method name="get_vertex_faces" qualifiers="const">
- <return type="PackedIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -248,7 +248,7 @@
</description>
</method>
<method name="get_vertex_weights" qualifiers="const">
- <return type="PackedRealArray">
+ <return type="PackedFloat32Array">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -303,7 +303,7 @@
</return>
<argument index="0" name="idx" type="int">
</argument>
- <argument index="1" name="bones" type="PackedIntArray">
+ <argument index="1" name="bones" type="PackedInt32Array">
</argument>
<description>
Sets the bones of the given vertex.
@@ -380,7 +380,7 @@
</return>
<argument index="0" name="idx" type="int">
</argument>
- <argument index="1" name="weights" type="PackedRealArray">
+ <argument index="1" name="weights" type="PackedFloat32Array">
</argument>
<description>
Sets the bone weights of the given vertex.
diff --git a/doc/classes/MeshLibrary.xml b/doc/classes/MeshLibrary.xml
index ec12a0ff42..e8431e64f4 100644
--- a/doc/classes/MeshLibrary.xml
+++ b/doc/classes/MeshLibrary.xml
@@ -36,7 +36,7 @@
</description>
</method>
<method name="get_item_list" qualifiers="const">
- <return type="PackedIntArray">
+ <return type="PackedInt32Array">
</return>
<description>
Returns the list of item IDs in use.
diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml
index 6831fc88df..24b87f8e28 100644
--- a/doc/classes/MultiMesh.xml
+++ b/doc/classes/MultiMesh.xml
@@ -105,7 +105,7 @@
</method>
</methods>
<members>
- <member name="buffer" type="PackedRealArray" setter="set_buffer" getter="get_buffer" default="PackedRealArray( )">
+ <member name="buffer" type="PackedFloat32Array" setter="set_buffer" getter="get_buffer" default="PackedFloat32Array( )">
</member>
<member name="color_array" type="PackedColorArray" setter="_set_color_array" getter="_get_color_array">
</member>
diff --git a/doc/classes/MultiplayerAPI.xml b/doc/classes/MultiplayerAPI.xml
index 968357ea07..9c753818d9 100644
--- a/doc/classes/MultiplayerAPI.xml
+++ b/doc/classes/MultiplayerAPI.xml
@@ -19,7 +19,7 @@
</description>
</method>
<method name="get_network_connected_peers" qualifiers="const">
- <return type="PackedIntArray">
+ <return type="PackedInt32Array">
</return>
<description>
Returns the peer IDs of all connected peers of this MultiplayerAPI's [member network_peer].
diff --git a/doc/classes/NavigationMesh.xml b/doc/classes/NavigationMesh.xml
index 04ebb1336c..6deca4394f 100644
--- a/doc/classes/NavigationMesh.xml
+++ b/doc/classes/NavigationMesh.xml
@@ -10,7 +10,7 @@
<method name="add_polygon">
<return type="void">
</return>
- <argument index="0" name="polygon" type="PackedIntArray">
+ <argument index="0" name="polygon" type="PackedInt32Array">
</argument>
<description>
</description>
@@ -38,7 +38,7 @@
</description>
</method>
<method name="get_polygon">
- <return type="PackedIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="idx" type="int">
</argument>
diff --git a/doc/classes/NavigationPolygon.xml b/doc/classes/NavigationPolygon.xml
index 908617fb91..da291b7337 100644
--- a/doc/classes/NavigationPolygon.xml
+++ b/doc/classes/NavigationPolygon.xml
@@ -18,7 +18,7 @@
var polygon = NavigationPolygon.new()
var vertices = PackedVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)])
polygon.set_vertices(vertices)
- var indices = PackedIntArray(0, 3, 1)
+ var indices = PackedInt32Array(0, 3, 1)
polygon.add_polygon(indices)
$NavigationPolygonInstance.navpoly = polygon
[/codeblock]
@@ -49,7 +49,7 @@
<method name="add_polygon">
<return type="void">
</return>
- <argument index="0" name="polygon" type="PackedIntArray">
+ <argument index="0" name="polygon" type="PackedInt32Array">
</argument>
<description>
Adds a polygon using the indices of the vertices you get when calling [method get_vertices].
@@ -86,12 +86,12 @@
</description>
</method>
<method name="get_polygon">
- <return type="PackedIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns a [PackedIntArray] containing the indices of the vertices of a created polygon.
+ Returns a [PackedInt32Array] containing the indices of the vertices of a created polygon.
</description>
</method>
<method name="get_polygon_count" qualifiers="const">
diff --git a/doc/classes/NavigationServer.xml b/doc/classes/NavigationServer.xml
index 5eb9f34ead..1f65a6004e 100644
--- a/doc/classes/NavigationServer.xml
+++ b/doc/classes/NavigationServer.xml
@@ -358,13 +358,15 @@
Control activation of this server.
</description>
</method>
- <method name="step">
+ <method name="process">
<return type="void">
</return>
<argument index="0" name="delta_time" type="float">
</argument>
<description>
- Steps the server. This is not threadsafe and must be called in single thread.
+ Process the collision avoidance agents.
+ The result of this process is needed by the physics server, so this must be called in the main thread.
+ Note: This function is not thread safe.
</description>
</method>
</methods>
diff --git a/doc/classes/PackedRealArray.xml b/doc/classes/PackedFloat32Array.xml
index 0d40c2517f..ee82586cdb 100644
--- a/doc/classes/PackedRealArray.xml
+++ b/doc/classes/PackedFloat32Array.xml
@@ -1,22 +1,23 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PackedRealArray" version="4.0">
+<class name="PackedFloat32Array" version="4.0">
<brief_description>
- A packed [Array] of reals ([float]).
+ A packed [Array] of 32-bit floating-point values.
</brief_description>
<description>
- An [Array] specifically designed to hold floating-point values ([float]). Packs data tightly, so it saves memory for large array sizes.
+ An [Array] specifically designed to hold 32-bit floating-point values. Packs data tightly, so it saves memory for large array sizes.
[b]Note:[/b] This type is passed by value and not by reference.
+ If you need to pack 64-bit floats tightly, see [PackedFloat64Array].
</description>
<tutorials>
</tutorials>
<methods>
- <method name="PackedRealArray">
- <return type="PackedRealArray">
+ <method name="PackedFloat32Array">
+ <return type="PackedFloat32Array">
</return>
<argument index="0" name="from" type="Array">
</argument>
<description>
- Constructs a new [PackedRealArray]. Optionally, you can pass in a generic [Array] that will be converted.
+ Constructs a new [PackedFloat32Array]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
</method>
<method name="append">
@@ -31,10 +32,10 @@
<method name="append_array">
<return type="void">
</return>
- <argument index="0" name="array" type="PackedRealArray">
+ <argument index="0" name="array" type="PackedFloat32Array">
</argument>
<description>
- Appends a [PackedRealArray] at the end of this array.
+ Appends a [PackedFloat32Array] at the end of this array.
</description>
</method>
<method name="empty">
diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml
new file mode 100644
index 0000000000..ce2300c65a
--- /dev/null
+++ b/doc/classes/PackedFloat64Array.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PackedFloat64Array" version="4.0">
+ <brief_description>
+ A packed [Array] of 64-bit floating-point values.
+ </brief_description>
+ <description>
+ An [Array] specifically designed to hold 64-bit floating-point values. Packs data tightly, so it saves memory for large array sizes.
+ [b]Note:[/b] This type is passed by value and not by reference.
+ If you only need to pack 32-bit floats tightly, see [PackedFloat32Array] for a more memory-friendly alternative.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="PackedFloat64Array">
+ <return type="PackedFloat64Array">
+ </return>
+ <argument index="0" name="from" type="Array">
+ </argument>
+ <description>
+ Constructs a new [PackedFloat64Array]. Optionally, you can pass in a generic [Array] that will be converted.
+ </description>
+ </method>
+ <method name="append">
+ <return type="void">
+ </return>
+ <argument index="0" name="value" type="float">
+ </argument>
+ <description>
+ Appends an element at the end of the array (alias of [method push_back]).
+ </description>
+ </method>
+ <method name="append_array">
+ <return type="void">
+ </return>
+ <argument index="0" name="array" type="PackedFloat64Array">
+ </argument>
+ <description>
+ Appends a [PackedFloat64Array] at the end of this array.
+ </description>
+ </method>
+ <method name="empty">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
+ <method name="insert">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="value" type="float">
+ </argument>
+ <description>
+ Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]).
+ </description>
+ </method>
+ <method name="invert">
+ <return type="void">
+ </return>
+ <description>
+ Reverses the order of the elements in the array.
+ </description>
+ </method>
+ <method name="push_back">
+ <return type="void">
+ </return>
+ <argument index="0" name="value" type="float">
+ </argument>
+ <description>
+ Appends an element at the end of the array.
+ </description>
+ </method>
+ <method name="remove">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Removes an element from the array by index.
+ </description>
+ </method>
+ <method name="resize">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size.
+ </description>
+ </method>
+ <method name="set">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="value" type="float">
+ </argument>
+ <description>
+ Changes the float at the given index.
+ </description>
+ </method>
+ <method name="size">
+ <return type="int">
+ </return>
+ <description>
+ Returns the size of the array.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml
new file mode 100644
index 0000000000..176c624956
--- /dev/null
+++ b/doc/classes/PackedInt32Array.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PackedInt32Array" version="4.0">
+ <brief_description>
+ A packed [Array] of 32-bit integers.
+ </brief_description>
+ <description>
+ An [Array] specifically designed to hold 32-bit integer values. Packs data tightly, so it saves memory for large array sizes.
+ [b]Note:[/b] This type is passed by value and not by reference.
+ [b]Note:[/b] This type stores signed 32-bit integers, which means it can take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. [code][-2147483648, 2147483647][/code]. Exceeding those bounds will wrap around. In comparison, [int] uses signed 64-bit integers which can hold much larger values. If you need to pack 64-bit integers tightly, see [PackedInt64Array].
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="PackedInt32Array">
+ <return type="PackedInt32Array">
+ </return>
+ <argument index="0" name="from" type="Array">
+ </argument>
+ <description>
+ Constructs a new [PackedInt32Array]. Optionally, you can pass in a generic [Array] that will be converted.
+ </description>
+ </method>
+ <method name="append">
+ <return type="void">
+ </return>
+ <argument index="0" name="integer" type="int">
+ </argument>
+ <description>
+ Appends an element at the end of the array (alias of [method push_back]).
+ </description>
+ </method>
+ <method name="append_array">
+ <return type="void">
+ </return>
+ <argument index="0" name="array" type="PackedInt32Array">
+ </argument>
+ <description>
+ Appends a [PackedInt32Array] at the end of this array.
+ </description>
+ </method>
+ <method name="empty">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
+ <method name="insert">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="integer" type="int">
+ </argument>
+ <description>
+ Inserts a new integer at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]).
+ </description>
+ </method>
+ <method name="invert">
+ <return type="void">
+ </return>
+ <description>
+ Reverses the order of the elements in the array.
+ </description>
+ </method>
+ <method name="push_back">
+ <return type="void">
+ </return>
+ <argument index="0" name="integer" type="int">
+ </argument>
+ <description>
+ Appends a value to the array.
+ </description>
+ </method>
+ <method name="remove">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Removes an element from the array by index.
+ </description>
+ </method>
+ <method name="resize">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size.
+ </description>
+ </method>
+ <method name="set">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="integer" type="int">
+ </argument>
+ <description>
+ Changes the integer at the given index.
+ </description>
+ </method>
+ <method name="size">
+ <return type="int">
+ </return>
+ <description>
+ Returns the array size.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PackedIntArray.xml b/doc/classes/PackedInt64Array.xml
index ca98157be5..d8a8071590 100644
--- a/doc/classes/PackedIntArray.xml
+++ b/doc/classes/PackedInt64Array.xml
@@ -1,23 +1,23 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PackedIntArray" version="4.0">
+<class name="PackedInt64Array" version="4.0">
<brief_description>
- A packed [Array] of integers ([int]).
+ A packed [Array] of 64-bit integers.
</brief_description>
<description>
- An [Array] specifically designed to hold integer values ([int]). Packs data tightly, so it saves memory for large array sizes.
+ An [Array] specifically designed to hold 64-bit integer values. Packs data tightly, so it saves memory for large array sizes.
[b]Note:[/b] This type is passed by value and not by reference.
- [b]Note:[/b] This type is limited to signed 32-bit integers, which means it can only take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. [code][-2147483648, 2147483647][/code]. Exceeding those bounds will wrap around. In comparison, [int] uses signed 64-bit integers which can hold much larger values.
+ [b]Note:[/b] This type stores signed 64-bit integers, which means it can take values in the interval [code][-2^63, 2^63 - 1][/code], i.e. [code][-9223372036854775808, 9223372036854775807][/code]. Exceeding those bounds will wrap around. If you only need to pack 32-bit integers tightly, see [PackedInt32Array] for a more memory-friendly alternative.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="PackedIntArray">
- <return type="PackedIntArray">
+ <method name="PackedInt64Array">
+ <return type="PackedInt64Array">
</return>
<argument index="0" name="from" type="Array">
</argument>
<description>
- Constructs a new [PackedIntArray]. Optionally, you can pass in a generic [Array] that will be converted.
+ Constructs a new [PackedInt64Array]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
</method>
<method name="append">
@@ -32,10 +32,10 @@
<method name="append_array">
<return type="void">
</return>
- <argument index="0" name="array" type="PackedIntArray">
+ <argument index="0" name="array" type="PackedInt64Array">
</argument>
<description>
- Appends a [PackedIntArray] at the end of this array.
+ Appends a [PackedInt64Array] at the end of this array.
</description>
</method>
<method name="empty">
diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml
index 8efe1e2b4b..e422545b7b 100644
--- a/doc/classes/PackedScene.xml
+++ b/doc/classes/PackedScene.xml
@@ -65,7 +65,7 @@
</method>
</methods>
<members>
- <member name="_bundled" type="Dictionary" setter="_set_bundled_scene" getter="_get_bundled_scene" default="{&quot;conn_count&quot;: 0,&quot;conns&quot;: PackedIntArray( ),&quot;editable_instances&quot;: [ ],&quot;names&quot;: PackedStringArray( ),&quot;node_count&quot;: 0,&quot;node_paths&quot;: [ ],&quot;nodes&quot;: PackedIntArray( ),&quot;variants&quot;: [ ],&quot;version&quot;: 2}">
+ <member name="_bundled" type="Dictionary" setter="_set_bundled_scene" getter="_get_bundled_scene" default="{&quot;conn_count&quot;: 0,&quot;conns&quot;: PackedInt32Array( ),&quot;editable_instances&quot;: [ ],&quot;names&quot;: PackedStringArray( ),&quot;node_count&quot;: 0,&quot;node_paths&quot;: [ ],&quot;nodes&quot;: PackedInt32Array( ),&quot;variants&quot;: [ ],&quot;version&quot;: 2}">
A dictionary representation of the scene contents.
Available keys include "rnames" and "variants" for resources, "node_count", "nodes", "node_paths" for nodes, "editable_instances" for base scene children overrides, "conn_count" and "conns" for signal connections, and "version" for the format style of the PackedScene.
</member>
diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml
index 2a408e277a..f777545733 100644
--- a/doc/classes/Polygon2D.xml
+++ b/doc/classes/Polygon2D.xml
@@ -14,7 +14,7 @@
</return>
<argument index="0" name="path" type="NodePath">
</argument>
- <argument index="1" name="weights" type="PackedRealArray">
+ <argument index="1" name="weights" type="PackedFloat32Array">
</argument>
<description>
</description>
@@ -48,7 +48,7 @@
</description>
</method>
<method name="get_bone_weights" qualifiers="const">
- <return type="PackedRealArray">
+ <return type="PackedFloat32Array">
</return>
<argument index="0" name="index" type="int">
</argument>
@@ -70,7 +70,7 @@
</return>
<argument index="0" name="index" type="int">
</argument>
- <argument index="1" name="weights" type="PackedRealArray">
+ <argument index="1" name="weights" type="PackedFloat32Array">
</argument>
<description>
</description>
diff --git a/doc/classes/PolygonPathFinder.xml b/doc/classes/PolygonPathFinder.xml
index 0b535159a7..49453d32ac 100644
--- a/doc/classes/PolygonPathFinder.xml
+++ b/doc/classes/PolygonPathFinder.xml
@@ -72,7 +72,7 @@
</return>
<argument index="0" name="points" type="PackedVector2Array">
</argument>
- <argument index="1" name="connections" type="PackedIntArray">
+ <argument index="1" name="connections" type="PackedInt32Array">
</argument>
<description>
</description>
diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml
index e32b19ff00..26abfb538b 100644
--- a/doc/classes/Rect2.xml
+++ b/doc/classes/Rect2.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Rect2" version="4.0">
<brief_description>
- 2D axis-aligned bounding box.
+ 2D axis-aligned bounding box using floating point coordinates.
</brief_description>
<description>
- Rect2 consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
+ [Rect2] consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
+ It uses floating point coordinates.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
@@ -36,6 +37,15 @@
Constructs a [Rect2] by x, y, width, and height.
</description>
</method>
+ <method name="Rect2">
+ <return type="Rect2">
+ </return>
+ <argument index="0" name="from" type="Rect2i">
+ </argument>
+ <description>
+ Constructs a [Rect2] from a [Rect2i].
+ </description>
+ </method>
<method name="abs">
<return type="Rect2">
</return>
diff --git a/doc/classes/Rect2i.xml b/doc/classes/Rect2i.xml
new file mode 100644
index 0000000000..2e8be384c1
--- /dev/null
+++ b/doc/classes/Rect2i.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Rect2i" version="4.0">
+ <brief_description>
+ 2D axis-aligned bounding box using integer coordinates.
+ </brief_description>
+ <description>
+ [Rect2i] consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
+ It uses integer coordinates.
+ </description>
+ <tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
+ </tutorials>
+ <methods>
+ <method name="Rect2i">
+ <return type="Rect2i">
+ </return>
+ <argument index="0" name="position" type="Vector2">
+ </argument>
+ <argument index="1" name="size" type="Vector2">
+ </argument>
+ <description>
+ Constructs a [Rect2i] by position and size.
+ </description>
+ </method>
+ <method name="Rect2i">
+ <return type="Rect2i">
+ </return>
+ <argument index="0" name="x" type="int">
+ </argument>
+ <argument index="1" name="y" type="int">
+ </argument>
+ <argument index="2" name="width" type="int">
+ </argument>
+ <argument index="3" name="height" type="int">
+ </argument>
+ <description>
+ Constructs a [Rect2i] by x, y, width, and height.
+ </description>
+ </method>
+ <method name="Rect2i">
+ <return type="Rect2i">
+ </return>
+ <argument index="0" name="from" type="Rect2">
+ </argument>
+ <description>
+ Constructs a new [Rect2i] from [Rect2]. The floating point coordinates will be truncated.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml
index 37f0944ca1..e6778013cf 100644
--- a/doc/classes/SceneTree.xml
+++ b/doc/classes/SceneTree.xml
@@ -83,7 +83,7 @@
</description>
</method>
<method name="get_network_connected_peers" qualifiers="const">
- <return type="PackedIntArray">
+ <return type="PackedInt32Array">
</return>
<description>
Returns the peer IDs of all connected peers of this [SceneTree]'s [member network_peer].
diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml
index 0b113bebe5..9c5634f43a 100644
--- a/doc/classes/ScrollContainer.xml
+++ b/doc/classes/ScrollContainer.xml
@@ -4,7 +4,9 @@
A helper node for displaying scrollable elements such as lists.
</brief_description>
<description>
- A ScrollContainer node meant to contain a [Control] child. ScrollContainers will automatically create a scrollbar child ([HScrollBar], [VScrollBar], or both) when needed and will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the [member Control.rect_min_size] of the Control relative to the ScrollContainer. Works great with a [Panel] control. You can set [code]EXPAND[/code] on the children's size flags, so they will upscale to the ScrollContainer's size if it's larger (scroll is invisible for the chosen dimension).
+ A ScrollContainer node meant to contain a [Control] child.
+ ScrollContainers will automatically create a scrollbar child ([HScrollBar], [VScrollBar], or both) when needed and will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the [member Control.rect_min_size] of the Control relative to the ScrollContainer.
+ Works great with a [Panel] control. You can set [code]EXPAND[/code] on the children's size flags, so they will upscale to the ScrollContainer's size if it's larger (scroll is invisible for the chosen dimension).
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index 7127ebdbff..1a5182b76e 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -49,6 +49,15 @@
<method name="String">
<return type="String">
</return>
+ <argument index="0" name="from" type="Vector2i">
+ </argument>
+ <description>
+ Constructs a new String from the given [Vector2i].
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
<argument index="0" name="from" type="Rect2">
</argument>
<description>
@@ -58,6 +67,15 @@
<method name="String">
<return type="String">
</return>
+ <argument index="0" name="from" type="Rect2i">
+ </argument>
+ <description>
+ Constructs a new String from the given [Rect2i].
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
<argument index="0" name="from" type="Vector3">
</argument>
<description>
@@ -67,6 +85,15 @@
<method name="String">
<return type="String">
</return>
+ <argument index="0" name="from" type="Vector3i">
+ </argument>
+ <description>
+ Constructs a new String from the given [Vector3i].
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
<argument index="0" name="from" type="Transform2D">
</argument>
<description>
@@ -133,6 +160,7 @@
<argument index="0" name="from" type="StringName">
</argument>
<description>
+ Constructs a new String from the given [StringName].
</description>
</method>
<method name="String">
@@ -159,6 +187,7 @@
<argument index="0" name="from" type="Callable">
</argument>
<description>
+ Constructs a new String from the given [Callable].
</description>
</method>
<method name="String">
@@ -167,6 +196,7 @@
<argument index="0" name="from" type="Signal">
</argument>
<description>
+ Constructs a new String from the given [Signal].
</description>
</method>
<method name="String">
@@ -199,19 +229,37 @@
<method name="String">
<return type="String">
</return>
- <argument index="0" name="from" type="PackedIntArray">
+ <argument index="0" name="from" type="PackedInt32Array">
+ </argument>
+ <description>
+ Constructs a new String from the given [PackedInt32Array].
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="PackedInt64Array">
+ </argument>
+ <description>
+ Constructs a new String from the given [PackedInt64Array].
+ </description>
+ </method>
+ <method name="String">
+ <return type="String">
+ </return>
+ <argument index="0" name="from" type="PackedFloat32Array">
</argument>
<description>
- Constructs a new String from the given [PackedIntArray].
+ Constructs a new String from the given [PackedFloat32Array].
</description>
</method>
<method name="String">
<return type="String">
</return>
- <argument index="0" name="from" type="PackedRealArray">
+ <argument index="0" name="from" type="PackedFloat64Array">
</argument>
<description>
- Constructs a new String from the given [PackedRealArray].
+ Constructs a new String from the given [PackedFloat64Array].
</description>
</method>
<method name="String">
@@ -849,7 +897,7 @@
</description>
</method>
<method name="split_floats">
- <return type="PackedRealArray">
+ <return type="PackedFloat32Array">
</return>
<argument index="0" name="delimiter" type="String">
</argument>
diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml
index a265d16cd9..4304a8df5e 100644
--- a/doc/classes/SurfaceTool.xml
+++ b/doc/classes/SurfaceTool.xml
@@ -22,7 +22,7 @@
<method name="add_bones">
<return type="void">
</return>
- <argument index="0" name="bones" type="PackedIntArray">
+ <argument index="0" name="bones" type="PackedInt32Array">
</argument>
<description>
Adds an array of bones for the next vertex to use. [code]bones[/code] must contain 4 integers.
@@ -123,7 +123,7 @@
<method name="add_weights">
<return type="void">
</return>
- <argument index="0" name="weights" type="PackedRealArray">
+ <argument index="0" name="weights" type="PackedFloat32Array">
</argument>
<description>
Specifies weight values for next vertex to use. [code]weights[/code] must contain 4 values.
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index 2ab8b939c7..d4eeb574eb 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -299,7 +299,7 @@
</description>
</method>
<method name="search" qualifiers="const">
- <return type="PackedIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="key" type="String">
</argument>
@@ -311,7 +311,7 @@
</argument>
<description>
Perform a search inside the text. Search flags can be specified in the [enum SearchFlags] enum.
- Returns an empty [code]PackedIntArray[/code] if no result was found. Otherwise, the result line and column can be accessed at indices specified in the [enum SearchResult] enum, e.g:
+ Returns an empty [code]PackedInt32Array[/code] if no result was found. Otherwise, the result line and column can be accessed at indices specified in the [enum SearchResult] enum, e.g:
[codeblock]
var result = search(key, flags, line, column)
if result.size() &gt; 0:
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index 4eef103d1f..7b02a1a4c9 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Vector2" version="4.0">
<brief_description>
- Vector used for 2D math.
+ Vector used for 2D math using floating point coordinates.
</brief_description>
<description>
2-element structure that can be used to represent positions in 2D space or any other pair of numeric values.
+ It uses floating point coordinates.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
@@ -13,12 +14,21 @@
<method name="Vector2">
<return type="Vector2">
</return>
+ <argument index="0" name="from" type="Vector2i">
+ </argument>
+ <description>
+ Constructs a new [Vector2] from [Vector2i].
+ </description>
+ </method>
+ <method name="Vector2">
+ <return type="Vector2">
+ </return>
<argument index="0" name="x" type="float">
</argument>
<argument index="1" name="y" type="float">
</argument>
<description>
- Constructs a new Vector2 from the given [code]x[/code] and [code]y[/code].
+ Constructs a new [Vector2] from the given [code]x[/code] and [code]y[/code].
</description>
</method>
<method name="abs">
diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml
new file mode 100644
index 0000000000..a516eb01dd
--- /dev/null
+++ b/doc/classes/Vector2i.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Vector2i" version="4.0">
+ <brief_description>
+ Vector used for 2D math using integer coordinates.
+ </brief_description>
+ <description>
+ 2-element structure that can be used to represent positions in 2D space or any other pair of numeric values.
+ It uses integer coordinates.
+ </description>
+ <tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
+ </tutorials>
+ <methods>
+ <method name="Vector2i">
+ <return type="Vector2i">
+ </return>
+ <argument index="0" name="x" type="int">
+ </argument>
+ <argument index="1" name="y" type="int">
+ </argument>
+ <description>
+ Constructs a new [Vector2i] from the given [code]x[/code] and [code]y[/code].
+ </description>
+ </method>
+ <method name="Vector2i">
+ <return type="Vector2i">
+ </return>
+ <argument index="0" name="from" type="Vector2">
+ </argument>
+ <description>
+ Constructs a new [Vector2i] from [Vector2]. The floating point coordinates will be truncated.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="AXIS_X" value="0">
+ Enumerated value for the X axis.
+ </constant>
+ <constant name="AXIS_Y" value="1">
+ Enumerated value for the Y axis.
+ </constant>
+ <constant name="ZERO" value="Vector2i( 0, 0 )">
+ Zero vector.
+ </constant>
+ <constant name="ONE" value="Vector2i( 1, 1 )">
+ One vector.
+ </constant>
+ <constant name="LEFT" value="Vector2i( -1, 0 )">
+ Left unit vector.
+ </constant>
+ <constant name="RIGHT" value="Vector2i( 1, 0 )">
+ Right unit vector.
+ </constant>
+ <constant name="UP" value="Vector2i( 0, -1 )">
+ Up unit vector.
+ </constant>
+ <constant name="DOWN" value="Vector2i( 0, 1 )">
+ Down unit vector.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index 7ae89cc450..600c03ba7d 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Vector3" version="4.0">
<brief_description>
- Vector used for 3D math.
+ Vector used for 3D math using floating point coordinates.
</brief_description>
<description>
3-element structure that can be used to represent positions in 3D space or any other pair of numeric values.
+ It uses floating point coordinates.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
@@ -13,6 +14,15 @@
<method name="Vector3">
<return type="Vector3">
</return>
+ <argument index="0" name="from" type="Vector3i">
+ </argument>
+ <description>
+ Constructs a new [Vector3] from [Vector3i].
+ </description>
+ </method>
+ <method name="Vector3">
+ <return type="Vector3">
+ </return>
<argument index="0" name="x" type="float">
</argument>
<argument index="1" name="y" type="float">
@@ -20,7 +30,7 @@
<argument index="2" name="z" type="float">
</argument>
<description>
- Returns a Vector3 with the given components.
+ Returns a [Vector3] with the given components.
</description>
</method>
<method name="abs">
diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml
new file mode 100644
index 0000000000..4f5a658b89
--- /dev/null
+++ b/doc/classes/Vector3i.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Vector3i" version="4.0">
+ <brief_description>
+ Vector used for 3D math using integer coordinates.
+ </brief_description>
+ <description>
+ 3-element structure that can be used to represent positions in 3D space or any other pair of numeric values.
+ It uses integer coordinates.
+ </description>
+ <tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
+ </tutorials>
+ <methods>
+ <method name="Vector3i">
+ <return type="Vector3i">
+ </return>
+ <argument index="0" name="x" type="int">
+ </argument>
+ <argument index="1" name="y" type="int">
+ </argument>
+ <argument index="2" name="z" type="int">
+ </argument>
+ <description>
+ Returns a [Vector3i] with the given components.
+ </description>
+ </method>
+ <method name="Vector3i">
+ <return type="Vector3i">
+ </return>
+ <argument index="0" name="from" type="Vector3">
+ </argument>
+ <description>
+ Constructs a new [Vector3i] from [Vector3]. The floating point coordinates will be truncated.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="AXIS_X" value="0">
+ Enumerated value for the X axis.
+ </constant>
+ <constant name="AXIS_Y" value="1">
+ Enumerated value for the Y axis.
+ </constant>
+ <constant name="AXIS_Z" value="2">
+ Enumerated value for the Z axis.
+ </constant>
+ <constant name="ZERO" value="Vector3i( 0, 0, 0 )">
+ Zero vector.
+ </constant>
+ <constant name="ONE" value="Vector3i( 1, 1, 1 )">
+ One vector.
+ </constant>
+ <constant name="LEFT" value="Vector3i( -1, 0, 0 )">
+ Left unit vector.
+ </constant>
+ <constant name="RIGHT" value="Vector3i( 1, 0, 0 )">
+ Right unit vector.
+ </constant>
+ <constant name="UP" value="Vector3i( 0, 1, 0 )">
+ Up unit vector.
+ </constant>
+ <constant name="DOWN" value="Vector3i( 0, -1, 0 )">
+ Down unit vector.
+ </constant>
+ <constant name="FORWARD" value="Vector3i( 0, 0, -1 )">
+ Forward unit vector.
+ </constant>
+ <constant name="BACK" value="Vector3i( 0, 0, 1 )">
+ Back unit vector.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml
index 187fd2300a..ca2058ddbb 100644
--- a/doc/classes/VisualServer.xml
+++ b/doc/classes/VisualServer.xml
@@ -1943,7 +1943,7 @@
</description>
</method>
<method name="multimesh_get_buffer" qualifiers="const">
- <return type="PackedRealArray">
+ <return type="PackedFloat32Array">
</return>
<argument index="0" name="multimesh" type="RID">
</argument>
@@ -2078,7 +2078,7 @@
</return>
<argument index="0" name="multimesh" type="RID">
</argument>
- <argument index="1" name="buffer" type="PackedRealArray">
+ <argument index="1" name="buffer" type="PackedFloat32Array">
</argument>
<description>
</description>
diff --git a/doc/classes/VisualShader.xml b/doc/classes/VisualShader.xml
index 99ba665979..27ba54cb68 100644
--- a/doc/classes/VisualShader.xml
+++ b/doc/classes/VisualShader.xml
@@ -107,7 +107,7 @@
</description>
</method>
<method name="get_node_list" qualifiers="const">
- <return type="PackedIntArray">
+ <return type="PackedInt32Array">
</return>
<argument index="0" name="type" type="int" enum="VisualShader.Type">
</argument>
diff --git a/doc/classes/VisualShaderNode.xml b/doc/classes/VisualShaderNode.xml
index d3227f421e..72ce743656 100644
--- a/doc/classes/VisualShaderNode.xml
+++ b/doc/classes/VisualShaderNode.xml
@@ -61,19 +61,22 @@
<constant name="PORT_TYPE_SCALAR" value="0" enum="PortType">
Floating-point scalar. Translated to [code]float[/code] type in shader code.
</constant>
- <constant name="PORT_TYPE_VECTOR" value="1" enum="PortType">
+ <constant name="PORT_TYPE_SCALAR_INT" value="1" enum="PortType">
+ Integer scalar. Translated to [code]int[/code] type in shader code.
+ </constant>
+ <constant name="PORT_TYPE_VECTOR" value="2" enum="PortType">
3D vector of floating-point values. Translated to [code]vec3[/code] type in shader code.
</constant>
- <constant name="PORT_TYPE_BOOLEAN" value="2" enum="PortType">
+ <constant name="PORT_TYPE_BOOLEAN" value="3" enum="PortType">
Boolean type. Translated to [code]bool[/code] type in shader code.
</constant>
- <constant name="PORT_TYPE_TRANSFORM" value="3" enum="PortType">
+ <constant name="PORT_TYPE_TRANSFORM" value="4" enum="PortType">
Transform type. Translated to [code]mat4[/code] type in shader code.
</constant>
- <constant name="PORT_TYPE_SAMPLER" value="4" enum="PortType">
+ <constant name="PORT_TYPE_SAMPLER" value="5" enum="PortType">
Sampler type. Translated to reference of sampler uniform in shader code. Can only be used for input ports in non-uniform nodes.
</constant>
- <constant name="PORT_TYPE_MAX" value="5" enum="PortType">
+ <constant name="PORT_TYPE_MAX" value="6" enum="PortType">
Represents the size of the [enum PortType] enum.
</constant>
</constants>
diff --git a/doc/classes/VisualShaderNodeCompare.xml b/doc/classes/VisualShaderNodeCompare.xml
index f207cba0a5..32f7be3ec3 100644
--- a/doc/classes/VisualShaderNodeCompare.xml
+++ b/doc/classes/VisualShaderNodeCompare.xml
@@ -50,7 +50,7 @@
Comparison for less than ([code]a &lt; b[/code]). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM].
</constant>
<constant name="FUNC_LESS_THAN_EQUAL" value="5" enum="Function">
- Comparison for less than or equal ([code]a &lt; b[/code]). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM].
+ Comparison for less than or equal ([code]a &lt;= b[/code]). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM].
</constant>
<constant name="COND_ALL" value="0" enum="Condition">
The result will be true if all of component in vector satisfy the comparison condition.
diff --git a/doc/classes/VisualShaderNodeScalarConstant.xml b/doc/classes/VisualShaderNodeFloatConstant.xml
index f7b94d9e39..3ba9ff07d3 100644
--- a/doc/classes/VisualShaderNodeScalarConstant.xml
+++ b/doc/classes/VisualShaderNodeFloatConstant.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeScalarConstant" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeFloatConstant" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ A scalar floating-point constant to be used within the visual shader graph.
</brief_description>
<description>
+ Translated to [code]float[/code] in the shader language.
</description>
<tutorials>
</tutorials>
@@ -10,6 +12,7 @@
</methods>
<members>
<member name="constant" type="float" setter="set_constant" getter="get_constant" default="0.0">
+ A floating-point constant which represents a state of this node.
</member>
</members>
<constants>
diff --git a/doc/classes/VisualShaderNodeFloatFunc.xml b/doc/classes/VisualShaderNodeFloatFunc.xml
new file mode 100644
index 0000000000..bb7486e8cf
--- /dev/null
+++ b/doc/classes/VisualShaderNodeFloatFunc.xml
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeFloatFunc" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ A scalar floating-point function to be used within the visual shader graph.
+ </brief_description>
+ <description>
+ Accept a floating-point scalar ([code]x[/code]) to the input port and transform it according to [member function].
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeFloatFunc.Function" default="13">
+ A function to be applied to the scalar. See [enum Function] for options.
+ </member>
+ </members>
+ <constants>
+ <constant name="FUNC_SIN" value="0" enum="Function">
+ Returns the sine of the parameter. Translates to [code]sin(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_COS" value="1" enum="Function">
+ Returns the cosine of the parameter. Translates to [code]cos(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_TAN" value="2" enum="Function">
+ Returns the tangent of the parameter. Translates to [code]tan(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_ASIN" value="3" enum="Function">
+ Returns the arc-sine of the parameter. Translates to [code]asin(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_ACOS" value="4" enum="Function">
+ Returns the arc-cosine of the parameter. Translates to [code]acos(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_ATAN" value="5" enum="Function">
+ Returns the arc-tangent of the parameter. Translates to [code]atan(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_SINH" value="6" enum="Function">
+ Returns the hyperbolic sine of the parameter. Translates to [code]sinh(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_COSH" value="7" enum="Function">
+ Returns the hyperbolic cosine of the parameter. Translates to [code]cosh(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_TANH" value="8" enum="Function">
+ Returns the hyperbolic tangent of the parameter. Translates to [code]tanh(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_LOG" value="9" enum="Function">
+ Returns the natural logarithm of the parameter. Translates to [code]log(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_EXP" value="10" enum="Function">
+ Returns the natural exponentiation of the parameter. Translates to [code]exp(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_SQRT" value="11" enum="Function">
+ Returns the square root of the parameter. Translates to [code]sqrt(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_ABS" value="12" enum="Function">
+ Returns the absolute value of the parameter. Translates to [code]abs(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_SIGN" value="13" enum="Function">
+ Extracts the sign of the parameter. Translates to [code]sign(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_FLOOR" value="14" enum="Function">
+ Finds the nearest integer less than or equal to the parameter. Translates to [code]floor(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_ROUND" value="15" enum="Function">
+ Finds the nearest integer to the parameter. Translates to [code]round(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_CEIL" value="16" enum="Function">
+ Finds the nearest integer that is greater than or equal to the parameter. Translates to [code]ceil(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_FRAC" value="17" enum="Function">
+ Computes the fractional part of the argument. Translates to [code]fract(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_SATURATE" value="18" enum="Function">
+ Clamps the value between [code]0.0[/code] and [code]1.0[/code] using [code]min(max(x, 0.0), 1.0)[/code].
+ </constant>
+ <constant name="FUNC_NEGATE" value="19" enum="Function">
+ Negates the [code]x[/code] using [code]-(x)[/code].
+ </constant>
+ <constant name="FUNC_ACOSH" value="20" enum="Function">
+ Returns the arc-hyperbolic-cosine of the parameter. Translates to [code]acosh(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_ASINH" value="21" enum="Function">
+ Returns the arc-hyperbolic-sine of the parameter. Translates to [code]asinh(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_ATANH" value="22" enum="Function">
+ Returns the arc-hyperbolic-tangent of the parameter. Translates to [code]atanh(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_DEGREES" value="23" enum="Function">
+ Convert a quantity in radians to degrees. Translates to [code]degrees(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_EXP2" value="24" enum="Function">
+ Returns 2 raised by the power of the parameter. Translates to [code]exp2(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_INVERSE_SQRT" value="25" enum="Function">
+ Returns the inverse of the square root of the parameter. Translates to [code]inversesqrt(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_LOG2" value="26" enum="Function">
+ Returns the base 2 logarithm of the parameter. Translates to [code]log2(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_RADIANS" value="27" enum="Function">
+ Convert a quantity in degrees to radians. Translates to [code]radians(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_RECIPROCAL" value="28" enum="Function">
+ Finds reciprocal value of dividing 1 by [code]x[/code] (i.e. [code]1 / x[/code]).
+ </constant>
+ <constant name="FUNC_ROUNDEVEN" value="29" enum="Function">
+ Finds the nearest even integer to the parameter. Translates to [code]roundEven(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_TRUNC" value="30" enum="Function">
+ Returns a value equal to the nearest integer to [code]x[/code] whose absolute value is not larger than the absolute value of [code]x[/code]. Translates to [code]trunc(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_ONEMINUS" value="31" enum="Function">
+ Subtracts scalar [code]x[/code] from 1 (i.e. [code]1 - x[/code]).
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeFloatOp.xml b/doc/classes/VisualShaderNodeFloatOp.xml
new file mode 100644
index 0000000000..2c9ebabb89
--- /dev/null
+++ b/doc/classes/VisualShaderNodeFloatOp.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeFloatOp" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ A floating-point scalar operator to be used within the visual shader graph.
+ </brief_description>
+ <description>
+ Applies [member operator] to two floating-point inputs: [code]a[/code] and [code]b[/code].
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeFloatOp.Operator" default="0">
+ An operator to be applied to the inputs. See [enum Operator] for options.
+ </member>
+ </members>
+ <constants>
+ <constant name="OP_ADD" value="0" enum="Operator">
+ Sums two numbers using [code]a + b[/code].
+ </constant>
+ <constant name="OP_SUB" value="1" enum="Operator">
+ Subtracts two numbers using [code]a - b[/code].
+ </constant>
+ <constant name="OP_MUL" value="2" enum="Operator">
+ Multiplies two numbers using [code]a * b[/code].
+ </constant>
+ <constant name="OP_DIV" value="3" enum="Operator">
+ Divides two numbers using [code]a / b[/code].
+ </constant>
+ <constant name="OP_MOD" value="4" enum="Operator">
+ Calculates the remainder of two numbers. Translates to [code]mod(a, b)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="OP_POW" value="5" enum="Operator">
+ Raises the [code]a[/code] to the power of [code]b[/code]. Translates to [code]pow(a, b)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="OP_MAX" value="6" enum="Operator">
+ Returns the greater of two numbers. Translates to [code]max(a, b)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="OP_MIN" value="7" enum="Operator">
+ Returns the lesser of two numbers. Translates to [code]min(a, b)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="OP_ATAN2" value="8" enum="Operator">
+ Returns the arc-tangent of the parameters. Translates to [code]atan(a, b)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="OP_STEP" value="9" enum="Operator">
+ Generates a step function by comparing [code]b[/code](x) to [code]a[/code](edge). Returns 0.0 if [code]x[/code] is smaller than [code]edge[/code] and otherwise 1.0. Translates to [code]step(a, b)[/code] in the Godot Shader Language.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeScalarUniform.xml b/doc/classes/VisualShaderNodeFloatUniform.xml
index fab766d3f9..33ece8ac1b 100644
--- a/doc/classes/VisualShaderNodeScalarUniform.xml
+++ b/doc/classes/VisualShaderNodeFloatUniform.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeScalarUniform" inherits="VisualShaderNodeUniform" version="4.0">
+<class name="VisualShaderNodeFloatUniform" inherits="VisualShaderNodeUniform" version="4.0">
<brief_description>
- A scalar uniform to be used within the visual shader graph.
+ A scalar float uniform to be used within the visual shader graph.
</brief_description>
<description>
Translated to [code]uniform float[/code] in the shader language.
@@ -11,7 +11,7 @@
<methods>
</methods>
<members>
- <member name="hint" type="int" setter="set_hint" getter="get_hint" enum="VisualShaderNodeScalarUniform.Hint" default="0">
+ <member name="hint" type="int" setter="set_hint" getter="get_hint" enum="VisualShaderNodeFloatUniform.Hint" default="0">
A hint applied to the uniform, which controls the values it can take when set through the inspector.
</member>
<member name="max" type="float" setter="set_max" getter="get_max" default="1.0">
diff --git a/doc/classes/VisualShaderNodeIf.xml b/doc/classes/VisualShaderNodeIf.xml
index 0a8fdcfd4d..1ebd945d42 100644
--- a/doc/classes/VisualShaderNodeIf.xml
+++ b/doc/classes/VisualShaderNodeIf.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShaderNodeIf" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Compares two floating-point numbers in order to return a required vector within the visual shader graph.
</brief_description>
<description>
+ First two ports are scalar floatin-point numbers to compare, third is tolerance comparsion amount and last three ports represents a vectors returned if [code]a == b[/code], [code]a &gt; b[/code] and [code]a &lt; b[/code] respectivly.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/VisualShaderNodeInput.xml b/doc/classes/VisualShaderNodeInput.xml
index 1c8d8d84c4..ed629508d0 100644
--- a/doc/classes/VisualShaderNodeInput.xml
+++ b/doc/classes/VisualShaderNodeInput.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShaderNodeInput" inherits="VisualShaderNode" version="4.0">
<brief_description>
+ Represents the input shader parameter within the visual shader graph.
</brief_description>
<description>
</description>
@@ -11,16 +12,19 @@
<return type="String">
</return>
<description>
+ Returns a translated name of the current constant in the Godot Shader Language. eg. [code]"ALBEDO"[/code] if the [member input_name] equal to [code]"albedo"[/code].
</description>
</method>
</methods>
<members>
<member name="input_name" type="String" setter="set_input_name" getter="get_input_name" default="&quot;[None]&quot;">
+ One of the several input constants in lower-case style like: "vertex"([/code]VERTEX[code]) or "point_size"([code]POINT_SIZE[/code]).
</member>
</members>
<signals>
<signal name="input_type_changed">
<description>
+ Emitted when input is changed via [member input_name].
</description>
</signal>
</signals>
diff --git a/doc/classes/VisualShaderNodeIntConstant.xml b/doc/classes/VisualShaderNodeIntConstant.xml
new file mode 100644
index 0000000000..1c407b21ca
--- /dev/null
+++ b/doc/classes/VisualShaderNodeIntConstant.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeIntConstant" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ A scalar integer constant to be used within the visual shader graph.
+ </brief_description>
+ <description>
+ Translated to [code]int[/code] in the shader language.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="constant" type="int" setter="set_constant" getter="get_constant" default="0">
+ An integer constant which represents a state of this node.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeIntFunc.xml b/doc/classes/VisualShaderNodeIntFunc.xml
new file mode 100644
index 0000000000..4b5d4ca8d2
--- /dev/null
+++ b/doc/classes/VisualShaderNodeIntFunc.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeIntFunc" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ A scalar integer function to be used within the visual shader graph.
+ </brief_description>
+ <description>
+ Accept an integer scalar ([code]x[/code]) to the input port and transform it according to [member function].
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeIntFunc.Function" default="0">
+ A function to be applied to the scalar. See [enum Function] for options.
+ </member>
+ </members>
+ <constants>
+ <constant name="FUNC_ABS" value="0" enum="Function">
+ Returns the absolute value of the parameter. Translates to [code]abs(x)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_CLAMP" value="1" enum="Function">
+ Constrains a parameter between [code]min[/code] and [code]max[/code]. Translates to [code]clamp(x, min, max)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_NEGATE" value="2" enum="Function">
+ Negates the [code]x[/code] using [code]-(x)[/code].
+ </constant>
+ <constant name="FUNC_SIGN" value="3" enum="Function">
+ Extracts the sign of the parameter. Translates to [code]sign(x)[/code] in the Godot Shader Language.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeIntOp.xml b/doc/classes/VisualShaderNodeIntOp.xml
new file mode 100644
index 0000000000..fc9a0a9a0a
--- /dev/null
+++ b/doc/classes/VisualShaderNodeIntOp.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeIntOp" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ An integer scalar operator to be used within the visual shader graph.
+ </brief_description>
+ <description>
+ Applies [member operator] to two integer inputs: [code]a[/code] and [code]b[/code].
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeIntOp.Operator" default="0">
+ An operator to be applied to the inputs. See [enum Operator] for options.
+ </member>
+ </members>
+ <constants>
+ <constant name="OP_ADD" value="0" enum="Operator">
+ Sums two numbers using [code]a + b[/code].
+ </constant>
+ <constant name="OP_SUB" value="1" enum="Operator">
+ Subtracts two numbers using [code]a - b[/code].
+ </constant>
+ <constant name="OP_MUL" value="2" enum="Operator">
+ Multiplies two numbers using [code]a * b[/code].
+ </constant>
+ <constant name="OP_DIV" value="3" enum="Operator">
+ Divides two numbers using [code]a / b[/code].
+ </constant>
+ <constant name="OP_MOD" value="4" enum="Operator">
+ Calculates the remainder of two numbers using [code]a % b[/code].
+ </constant>
+ <constant name="OP_MAX" value="5" enum="Operator">
+ Returns the greater of two numbers. Translates to [code]max(a, b)[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="OP_MIN" value="6" enum="Operator">
+ Returns the lesser of two numbers. Translates to [code]max(a, b)[/code] in the Godot Shader Language.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeIntUniform.xml b/doc/classes/VisualShaderNodeIntUniform.xml
new file mode 100644
index 0000000000..8c7c288177
--- /dev/null
+++ b/doc/classes/VisualShaderNodeIntUniform.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeIntUniform" inherits="VisualShaderNodeUniform" version="4.0">
+ <brief_description>
+ A scalar integer uniform to be used within the visual shader graph.
+ </brief_description>
+ <description>
+ Translated to [code]uniform int[/code] in the shader language.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="hint" type="int" setter="set_hint" getter="get_hint" enum="VisualShaderNodeIntUniform.Hint" default="0">
+ A hint applied to the uniform, which controls the values it can take when set through the inspector.
+ </member>
+ <member name="max" type="int" setter="set_max" getter="get_max" default="100">
+ Minimum value for range hints. Used if [member hint] is set to [constant HINT_RANGE] or [constant HINT_RANGE_STEP].
+ </member>
+ <member name="min" type="int" setter="set_min" getter="get_min" default="0">
+ Maximum value for range hints. Used if [member hint] is set to [constant HINT_RANGE] or [constant HINT_RANGE_STEP].
+ </member>
+ <member name="step" type="int" setter="set_step" getter="get_step" default="1">
+ Step (increment) value for the range hint with step. Used if [member hint] is set to [constant HINT_RANGE_STEP].
+ </member>
+ </members>
+ <constants>
+ <constant name="HINT_NONE" value="0" enum="Hint">
+ No hint used.
+ </constant>
+ <constant name="HINT_RANGE" value="1" enum="Hint">
+ A range hint for scalar value, which limits possible input values between [member min] and [member max]. Translated to [code]hint_range(min, max)[/code] in shader code.
+ </constant>
+ <constant name="HINT_RANGE_STEP" value="2" enum="Hint">
+ A range hint for scalar value with step, which limits possible input values between [member min] and [member max], with a step (increment) of [member step]). Translated to [code]hint_range(min, max, step)[/code] in shader code.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeScalarFunc.xml b/doc/classes/VisualShaderNodeScalarFunc.xml
deleted file mode 100644
index b306d198f6..0000000000
--- a/doc/classes/VisualShaderNodeScalarFunc.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeScalarFunc" inherits="VisualShaderNode" version="4.0">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <members>
- <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeScalarFunc.Function" default="13">
- </member>
- </members>
- <constants>
- <constant name="FUNC_SIN" value="0" enum="Function">
- </constant>
- <constant name="FUNC_COS" value="1" enum="Function">
- </constant>
- <constant name="FUNC_TAN" value="2" enum="Function">
- </constant>
- <constant name="FUNC_ASIN" value="3" enum="Function">
- </constant>
- <constant name="FUNC_ACOS" value="4" enum="Function">
- </constant>
- <constant name="FUNC_ATAN" value="5" enum="Function">
- </constant>
- <constant name="FUNC_SINH" value="6" enum="Function">
- </constant>
- <constant name="FUNC_COSH" value="7" enum="Function">
- </constant>
- <constant name="FUNC_TANH" value="8" enum="Function">
- </constant>
- <constant name="FUNC_LOG" value="9" enum="Function">
- </constant>
- <constant name="FUNC_EXP" value="10" enum="Function">
- </constant>
- <constant name="FUNC_SQRT" value="11" enum="Function">
- </constant>
- <constant name="FUNC_ABS" value="12" enum="Function">
- </constant>
- <constant name="FUNC_SIGN" value="13" enum="Function">
- </constant>
- <constant name="FUNC_FLOOR" value="14" enum="Function">
- </constant>
- <constant name="FUNC_ROUND" value="15" enum="Function">
- </constant>
- <constant name="FUNC_CEIL" value="16" enum="Function">
- </constant>
- <constant name="FUNC_FRAC" value="17" enum="Function">
- </constant>
- <constant name="FUNC_SATURATE" value="18" enum="Function">
- </constant>
- <constant name="FUNC_NEGATE" value="19" enum="Function">
- </constant>
- <constant name="FUNC_ACOSH" value="20" enum="Function">
- </constant>
- <constant name="FUNC_ASINH" value="21" enum="Function">
- </constant>
- <constant name="FUNC_ATANH" value="22" enum="Function">
- </constant>
- <constant name="FUNC_DEGREES" value="23" enum="Function">
- </constant>
- <constant name="FUNC_EXP2" value="24" enum="Function">
- </constant>
- <constant name="FUNC_INVERSE_SQRT" value="25" enum="Function">
- </constant>
- <constant name="FUNC_LOG2" value="26" enum="Function">
- </constant>
- <constant name="FUNC_RADIANS" value="27" enum="Function">
- </constant>
- <constant name="FUNC_RECIPROCAL" value="28" enum="Function">
- </constant>
- <constant name="FUNC_ROUNDEVEN" value="29" enum="Function">
- </constant>
- <constant name="FUNC_TRUNC" value="30" enum="Function">
- </constant>
- <constant name="FUNC_ONEMINUS" value="31" enum="Function">
- </constant>
- </constants>
-</class>
diff --git a/doc/classes/VisualShaderNodeScalarOp.xml b/doc/classes/VisualShaderNodeScalarOp.xml
deleted file mode 100644
index f13f16cdd2..0000000000
--- a/doc/classes/VisualShaderNodeScalarOp.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeScalarOp" inherits="VisualShaderNode" version="4.0">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <members>
- <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeScalarOp.Operator" default="0">
- </member>
- </members>
- <constants>
- <constant name="OP_ADD" value="0" enum="Operator">
- </constant>
- <constant name="OP_SUB" value="1" enum="Operator">
- </constant>
- <constant name="OP_MUL" value="2" enum="Operator">
- </constant>
- <constant name="OP_DIV" value="3" enum="Operator">
- </constant>
- <constant name="OP_MOD" value="4" enum="Operator">
- </constant>
- <constant name="OP_POW" value="5" enum="Operator">
- </constant>
- <constant name="OP_MAX" value="6" enum="Operator">
- </constant>
- <constant name="OP_MIN" value="7" enum="Operator">
- </constant>
- <constant name="OP_ATAN2" value="8" enum="Operator">
- </constant>
- <constant name="OP_STEP" value="9" enum="Operator">
- </constant>
- </constants>
-</class>
diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp
index fa45aeeda8..55b1c7e560 100644
--- a/drivers/gles2/rasterizer_storage_gles2.cpp
+++ b/drivers/gles2/rasterizer_storage_gles2.cpp
@@ -1681,11 +1681,11 @@ void RasterizerStorageGLES2::shader_get_param_list(RID p_shader, List<PropertyIn
case ShaderLanguage::TYPE_UVEC3:
case ShaderLanguage::TYPE_IVEC4:
case ShaderLanguage::TYPE_UVEC4: {
- pi.type = Variant::PACKED_INT_ARRAY;
+ pi.type = Variant::PACKED_INT32_ARRAY;
} break;
case ShaderLanguage::TYPE_FLOAT: {
- pi.type = Variant::REAL;
+ pi.type = Variant::FLOAT;
if (u.hint == ShaderLanguage::ShaderNode::Uniform::HINT_RANGE) {
pi.hint = PROPERTY_HINT_RANGE;
pi.hint_string = rtos(u.hint_range[0]) + "," + rtos(u.hint_range[1]) + "," + rtos(u.hint_range[2]);
diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp
index 3bacb8205b..69e3c3b19d 100644
--- a/editor/animation_bezier_editor.cpp
+++ b/editor/animation_bezier_editor.cpp
@@ -1150,16 +1150,16 @@ void AnimationBezierTrackEdit::_bind_methods() {
ClassDB::bind_method("_clear_selection_for_anim", &AnimationBezierTrackEdit::_clear_selection_for_anim);
ClassDB::bind_method("_select_at_anim", &AnimationBezierTrackEdit::_select_at_anim);
- ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::REAL, "position"), PropertyInfo(Variant::BOOL, "drag")));
+ ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::FLOAT, "position"), PropertyInfo(Variant::BOOL, "drag")));
ADD_SIGNAL(MethodInfo("remove_request", PropertyInfo(Variant::INT, "track")));
- ADD_SIGNAL(MethodInfo("insert_key", PropertyInfo(Variant::REAL, "ofs")));
+ ADD_SIGNAL(MethodInfo("insert_key", PropertyInfo(Variant::FLOAT, "ofs")));
ADD_SIGNAL(MethodInfo("select_key", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::BOOL, "single")));
ADD_SIGNAL(MethodInfo("deselect_key", PropertyInfo(Variant::INT, "index")));
ADD_SIGNAL(MethodInfo("clear_selection"));
ADD_SIGNAL(MethodInfo("close_request"));
ADD_SIGNAL(MethodInfo("move_selection_begin"));
- ADD_SIGNAL(MethodInfo("move_selection", PropertyInfo(Variant::REAL, "ofs")));
+ ADD_SIGNAL(MethodInfo("move_selection", PropertyInfo(Variant::FLOAT, "ofs")));
ADD_SIGNAL(MethodInfo("move_selection_commit"));
ADD_SIGNAL(MethodInfo("move_selection_cancel"));
}
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp
index f5c7b91a99..8758fbcfc9 100644
--- a/editor/animation_track_editor.cpp
+++ b/editor/animation_track_editor.cpp
@@ -548,9 +548,9 @@ public:
if (use_fps && animation->get_step() > 0) {
float max_frame = animation->get_length() / animation->get_step();
- p_list->push_back(PropertyInfo(Variant::REAL, "frame", PROPERTY_HINT_RANGE, "0," + rtos(max_frame) + ",1"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "frame", PROPERTY_HINT_RANGE, "0," + rtos(max_frame) + ",1"));
} else {
- p_list->push_back(PropertyInfo(Variant::REAL, "time", PROPERTY_HINT_RANGE, "0," + rtos(animation->get_length()) + ",0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "time", PROPERTY_HINT_RANGE, "0," + rtos(animation->get_length()) + ",0.01"));
}
switch (animation->track_get_type(track)) {
@@ -617,7 +617,7 @@ public:
} break;
case Animation::TYPE_BEZIER: {
- p_list->push_back(PropertyInfo(Variant::REAL, "value"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "value"));
p_list->push_back(PropertyInfo(Variant::VECTOR2, "in_handle"));
p_list->push_back(PropertyInfo(Variant::VECTOR2, "out_handle"));
@@ -625,8 +625,8 @@ public:
case Animation::TYPE_AUDIO: {
p_list->push_back(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream"));
- p_list->push_back(PropertyInfo(Variant::REAL, "start_offset", PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater"));
- p_list->push_back(PropertyInfo(Variant::REAL, "end_offset", PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "start_offset", PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "end_offset", PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater"));
} break;
case Animation::TYPE_ANIMATION: {
@@ -660,7 +660,7 @@ public:
}
if (animation->track_get_type(track) == Animation::TYPE_VALUE) {
- p_list->push_back(PropertyInfo(Variant::REAL, "easing", PROPERTY_HINT_EXP_EASING));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "easing", PROPERTY_HINT_EXP_EASING));
}
}
@@ -1243,9 +1243,9 @@ public:
if (use_fps && animation->get_step() > 0) {
float max_frame = animation->get_length() / animation->get_step();
- p_list->push_back(PropertyInfo(Variant::REAL, "frame", PROPERTY_HINT_RANGE, "0," + rtos(max_frame) + ",1"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "frame", PROPERTY_HINT_RANGE, "0," + rtos(max_frame) + ",1"));
} else {
- p_list->push_back(PropertyInfo(Variant::REAL, "time", PROPERTY_HINT_RANGE, "0," + rtos(animation->get_length()) + ",0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "time", PROPERTY_HINT_RANGE, "0," + rtos(animation->get_length()) + ",0.01"));
}
}
@@ -1289,7 +1289,7 @@ public:
p_list->push_back(PropertyInfo(v.get_type(), "value", hint, hint_string));
}
- p_list->push_back(PropertyInfo(Variant::REAL, "easing", PROPERTY_HINT_EXP_EASING));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "easing", PROPERTY_HINT_EXP_EASING));
} break;
case Animation::TYPE_METHOD: {
@@ -1316,15 +1316,15 @@ public:
} break;
case Animation::TYPE_BEZIER: {
- p_list->push_back(PropertyInfo(Variant::REAL, "value"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "value"));
p_list->push_back(PropertyInfo(Variant::VECTOR2, "in_handle"));
p_list->push_back(PropertyInfo(Variant::VECTOR2, "out_handle"));
} break;
case Animation::TYPE_AUDIO: {
p_list->push_back(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream"));
- p_list->push_back(PropertyInfo(Variant::REAL, "start_offset", PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater"));
- p_list->push_back(PropertyInfo(Variant::REAL, "end_offset", PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "start_offset", PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "end_offset", PROPERTY_HINT_RANGE, "0,3600,0.01,or_greater"));
} break;
case Animation::TYPE_ANIMATION: {
@@ -1854,9 +1854,9 @@ void AnimationTimelineEdit::_bind_methods() {
ADD_SIGNAL(MethodInfo("zoom_changed"));
ADD_SIGNAL(MethodInfo("name_limit_changed"));
- ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::REAL, "position"), PropertyInfo(Variant::BOOL, "drag")));
+ ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::FLOAT, "position"), PropertyInfo(Variant::BOOL, "drag")));
ADD_SIGNAL(MethodInfo("track_added", PropertyInfo(Variant::INT, "track")));
- ADD_SIGNAL(MethodInfo("length_changed", PropertyInfo(Variant::REAL, "size")));
+ ADD_SIGNAL(MethodInfo("length_changed", PropertyInfo(Variant::FLOAT, "size")));
}
AnimationTimelineEdit::AnimationTimelineEdit() {
@@ -2480,6 +2480,9 @@ void AnimationTrackEdit::_path_entered(const String &p_text) {
bool AnimationTrackEdit::_is_value_key_valid(const Variant &p_key_value, Variant::Type &r_valid_type) const {
+ if (root == nullptr)
+ return false;
+
RES res;
Vector<StringName> leftover_path;
Node *node = root->get_node_and_resource(animation->track_get_path(track), res, leftover_path);
@@ -3073,16 +3076,16 @@ void AnimationTrackEdit::_bind_methods() {
ClassDB::bind_method("_path_entered", &AnimationTrackEdit::_path_entered);
ClassDB::bind_method("_play_position_draw", &AnimationTrackEdit::_play_position_draw);
- ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::REAL, "position"), PropertyInfo(Variant::BOOL, "drag")));
+ ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::FLOAT, "position"), PropertyInfo(Variant::BOOL, "drag")));
ADD_SIGNAL(MethodInfo("remove_request", PropertyInfo(Variant::INT, "track")));
ADD_SIGNAL(MethodInfo("dropped", PropertyInfo(Variant::INT, "from_track"), PropertyInfo(Variant::INT, "to_track")));
- ADD_SIGNAL(MethodInfo("insert_key", PropertyInfo(Variant::REAL, "ofs")));
+ ADD_SIGNAL(MethodInfo("insert_key", PropertyInfo(Variant::FLOAT, "ofs")));
ADD_SIGNAL(MethodInfo("select_key", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::BOOL, "single")));
ADD_SIGNAL(MethodInfo("deselect_key", PropertyInfo(Variant::INT, "index")));
ADD_SIGNAL(MethodInfo("bezier_edit"));
ADD_SIGNAL(MethodInfo("move_selection_begin"));
- ADD_SIGNAL(MethodInfo("move_selection", PropertyInfo(Variant::REAL, "ofs")));
+ ADD_SIGNAL(MethodInfo("move_selection", PropertyInfo(Variant::FLOAT, "ofs")));
ADD_SIGNAL(MethodInfo("move_selection_commit"));
ADD_SIGNAL(MethodInfo("move_selection_cancel"));
@@ -3482,7 +3485,7 @@ void AnimationTrackEditor::_query_insert(const InsertData &p_id) {
switch (insert_data[i].value.get_type()) {
case Variant::INT:
- case Variant::REAL:
+ case Variant::FLOAT:
case Variant::VECTOR2:
case Variant::VECTOR3:
case Variant::QUAT:
@@ -3913,7 +3916,7 @@ static Vector<String> _get_bezier_subindices_for_type(Variant::Type p_type, bool
case Variant::INT: {
subindices.push_back("");
} break;
- case Variant::REAL: {
+ case Variant::FLOAT: {
subindices.push_back("");
} break;
case Variant::VECTOR2: {
@@ -3991,7 +3994,7 @@ int AnimationTrackEditor::_confirm_insert(InsertData p_id, int p_last_track, boo
PropertyInfo h = _find_hint_for_track(animation->get_track_count() - 1, np);
animation->remove_track(animation->get_track_count() - 1); //hack
- if (h.type == Variant::REAL ||
+ if (h.type == Variant::FLOAT ||
h.type == Variant::VECTOR2 ||
h.type == Variant::RECT2 ||
h.type == Variant::VECTOR3 ||
@@ -4473,7 +4476,7 @@ void AnimationTrackEditor::_new_track_node_selected(NodePath p_path) {
Vector<Variant::Type> filter;
filter.push_back(Variant::INT);
- filter.push_back(Variant::REAL);
+ filter.push_back(Variant::FLOAT);
filter.push_back(Variant::VECTOR2);
filter.push_back(Variant::VECTOR3);
filter.push_back(Variant::QUAT);
@@ -4543,7 +4546,7 @@ void AnimationTrackEditor::_new_track_property_selected(String p_name) {
animation->track_set_path(animation->get_track_count() - 1, full_path);
PropertyInfo h = _find_hint_for_track(animation->get_track_count() - 1, np);
animation->remove_track(animation->get_track_count() - 1); //hack
- if (h.type == Variant::REAL ||
+ if (h.type == Variant::FLOAT ||
h.type == Variant::VECTOR2 ||
h.type == Variant::RECT2 ||
h.type == Variant::VECTOR3 ||
@@ -5707,7 +5710,7 @@ float AnimationTrackEditor::snap_time(float p_value, bool p_relative) {
return p_value;
}
-void AnimationTrackEditor::_show_imported_anim_warning() const {
+void AnimationTrackEditor::_show_imported_anim_warning() {
// It looks terrible on a single line but the TTR extractor doesn't support line breaks yet.
EditorNode::get_singleton()->show_warning(TTR("This animation belongs to an imported scene, so changes to imported tracks will not be saved.\n\nTo enable the ability to add custom tracks, navigate to the scene's import settings and set\n\"Animation > Storage\" to \"Files\", enable \"Animation > Keep Custom Tracks\", then re-import.\nAlternatively, use an import preset that imports animations to separate files."),
@@ -5777,10 +5780,10 @@ void AnimationTrackEditor::_bind_methods() {
ClassDB::bind_method("_show_imported_anim_warning", &AnimationTrackEditor::_show_imported_anim_warning);
ClassDB::bind_method("_select_all_tracks_for_copy", &AnimationTrackEditor::_select_all_tracks_for_copy);
- ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::REAL, "position"), PropertyInfo(Variant::BOOL, "drag")));
+ ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::FLOAT, "position"), PropertyInfo(Variant::BOOL, "drag")));
ADD_SIGNAL(MethodInfo("keying_changed"));
- ADD_SIGNAL(MethodInfo("animation_len_changed", PropertyInfo(Variant::REAL, "len")));
- ADD_SIGNAL(MethodInfo("animation_step_changed", PropertyInfo(Variant::REAL, "step")));
+ ADD_SIGNAL(MethodInfo("animation_len_changed", PropertyInfo(Variant::FLOAT, "len")));
+ ADD_SIGNAL(MethodInfo("animation_step_changed", PropertyInfo(Variant::FLOAT, "step")));
}
AnimationTrackEditor::AnimationTrackEditor() {
diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h
index c2660652d6..26f9c15f6c 100644
--- a/editor/animation_track_editor.h
+++ b/editor/animation_track_editor.h
@@ -314,7 +314,7 @@ class AnimationTrackEditor : public VBoxContainer {
OptionButton *snap_mode;
Button *imported_anim_warning;
- void _show_imported_anim_warning() const;
+ void _show_imported_anim_warning();
void _snap_mode_changed(int p_mode);
Vector<AnimationTrackEdit *> track_edits;
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp
index b309a16858..2adc6f5398 100644
--- a/editor/connections_dialog.cpp
+++ b/editor/connections_dialog.cpp
@@ -166,7 +166,7 @@ void ConnectDialog::_add_bind() {
switch (vt) {
case Variant::BOOL: value = false; break;
case Variant::INT: value = 0; break;
- case Variant::REAL: value = 0.0; break;
+ case Variant::FLOAT: value = 0.0; break;
case Variant::STRING: value = ""; break;
case Variant::STRING_NAME: value = ""; break;
case Variant::VECTOR2: value = Vector2(); break;
@@ -414,7 +414,7 @@ ConnectDialog::ConnectDialog() {
add_bind_hb->add_child(type_list);
type_list->add_item("bool", Variant::BOOL);
type_list->add_item("int", Variant::INT);
- type_list->add_item("real", Variant::REAL);
+ type_list->add_item("real", Variant::FLOAT);
type_list->add_item("String", Variant::STRING);
type_list->add_item("StringName", Variant::STRING_NAME);
type_list->add_item("Vector2", Variant::VECTOR2);
diff --git a/editor/debugger/editor_debugger_node.h b/editor/debugger/editor_debugger_node.h
index 3c232d4d74..13a1d6dcb3 100644
--- a/editor/debugger/editor_debugger_node.h
+++ b/editor/debugger/editor_debugger_node.h
@@ -59,7 +59,7 @@ private:
bool operator<(const Breakpoint &p_b) const {
if (line == p_b.line)
- return line < p_b.line;
+ return source < p_b.source;
return line < p_b.line;
}
diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp
index 8feb1ee03a..45af70f191 100644
--- a/editor/debugger/script_editor_debugger.cpp
+++ b/editor/debugger/script_editor_debugger.cpp
@@ -1698,7 +1698,6 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
visual_profiler->set_name(TTR("Visual Profiler"));
tabs->add_child(visual_profiler);
visual_profiler->connect_compat("enable_profiling", this, "_visual_profiler_activate");
- visual_profiler->connect_compat("break_request", this, "_profiler_seeked");
}
{ //network profiler
diff --git a/editor/doc/doc_dump.cpp b/editor/doc/doc_dump.cpp
index 4bcf0c5bf5..b0a89ff4b8 100644
--- a/editor/doc/doc_dump.cpp
+++ b/editor/doc/doc_dump.cpp
@@ -161,7 +161,7 @@ void DocDump::dump(const String &p_file) {
default_arg_text = "false";
break;
case Variant::INT:
- case Variant::REAL:
+ case Variant::FLOAT:
//keep it
break;
case Variant::STRING:
@@ -188,15 +188,17 @@ void DocDump::dump(const String &p_file) {
case Variant::BASIS:
case Variant::COLOR:
case Variant::PACKED_BYTE_ARRAY:
- case Variant::PACKED_INT_ARRAY:
- case Variant::PACKED_REAL_ARRAY:
+ case Variant::PACKED_INT32_ARRAY:
+ case Variant::PACKED_FLOAT32_ARRAY:
+ case Variant::PACKED_INT64_ARRAY:
+ case Variant::PACKED_FLOAT64_ARRAY:
case Variant::PACKED_STRING_ARRAY:
case Variant::PACKED_VECTOR3_ARRAY:
case Variant::PACKED_COLOR_ARRAY:
default_arg_text = Variant::get_type_name(default_arg.get_type()) + "(" + default_arg_text + ")";
break;
case Variant::OBJECT:
- case Variant::DICTIONARY: // 20
+ case Variant::DICTIONARY:
case Variant::ARRAY:
case Variant::_RID:
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index c3daf39b48..d10cc7f91e 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -430,7 +430,7 @@ bool EditorPropertyRevert::is_node_property_different(Node *p_node, const Varian
return false; //pointless to check if we are not comparing against anything.
}
- if (p_current.get_type() == Variant::REAL && p_orig.get_type() == Variant::REAL) {
+ if (p_current.get_type() == Variant::FLOAT && p_orig.get_type() == Variant::FLOAT) {
float a = p_current;
float b = p_orig;
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 413959bb99..b632e7594c 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -2178,7 +2178,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case SCENE_TAB_CLOSE:
case FILE_SAVE_SCENE: {
@@ -2199,7 +2199,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case FILE_SAVE_AS_SCENE: {
int scene_idx = (p_option == FILE_SAVE_SCENE || p_option == FILE_SAVE_AS_SCENE) ? -1 : tab_closing;
@@ -5841,7 +5841,7 @@ EditorNode::EditorNode() {
EDITOR_DEF_RST("interface/scene_tabs/show_thumbnail_on_hover", true);
EDITOR_DEF_RST("interface/inspector/capitalize_properties", true);
EDITOR_DEF_RST("interface/inspector/default_float_step", 0.001);
- EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::REAL, "interface/inspector/default_float_step", PROPERTY_HINT_RANGE, "0,1,0"));
+ EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::FLOAT, "interface/inspector/default_float_step", PROPERTY_HINT_RANGE, "0,1,0"));
EDITOR_DEF_RST("interface/inspector/disable_folding", false);
EDITOR_DEF_RST("interface/inspector/auto_unfold_foreign_scenes", true);
EDITOR_DEF("interface/inspector/horizontal_vector2_editing", false);
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index b18c6fc59f..e154b13eac 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -3039,7 +3039,7 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
add_property_editor(p_path, editor);
}
} break;
- case Variant::REAL: {
+ case Variant::FLOAT: {
if (p_hint == PROPERTY_HINT_EXP_EASING) {
EditorPropertyEasing *editor = memnew(EditorPropertyEasing);
@@ -3173,7 +3173,7 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
editor->setup(min, max, step, hide_slider);
add_property_editor(p_path, editor);
- } break; // 5
+ } break;
case Variant::RECT2: {
EditorPropertyRect2 *editor = memnew(EditorPropertyRect2);
double min = -65535, max = 65535, step = default_float_step;
@@ -3260,7 +3260,7 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
editor->setup(min, max, step, hide_slider);
add_property_editor(p_path, editor);
- } break; // 10
+ } break;
case Variant::AABB: {
EditorPropertyAABB *editor = memnew(EditorPropertyAABB);
double min = -65535, max = 65535, step = default_float_step;
@@ -3349,7 +3349,7 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
}
add_property_editor(p_path, editor);
- } break; // 15
+ } break;
case Variant::_RID: {
EditorPropertyRID *editor = memnew(EditorPropertyRID);
add_property_editor(p_path, editor);
@@ -3388,15 +3388,25 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
EditorPropertyArray *editor = memnew(EditorPropertyArray);
editor->setup(Variant::PACKED_BYTE_ARRAY);
add_property_editor(p_path, editor);
- } break; // 20
- case Variant::PACKED_INT_ARRAY: {
+ } break;
+ case Variant::PACKED_INT32_ARRAY: {
EditorPropertyArray *editor = memnew(EditorPropertyArray);
- editor->setup(Variant::PACKED_INT_ARRAY);
+ editor->setup(Variant::PACKED_INT32_ARRAY);
add_property_editor(p_path, editor);
} break;
- case Variant::PACKED_REAL_ARRAY: {
+ case Variant::PACKED_INT64_ARRAY: {
EditorPropertyArray *editor = memnew(EditorPropertyArray);
- editor->setup(Variant::PACKED_REAL_ARRAY);
+ editor->setup(Variant::PACKED_INT64_ARRAY);
+ add_property_editor(p_path, editor);
+ } break;
+ case Variant::PACKED_FLOAT32_ARRAY: {
+ EditorPropertyArray *editor = memnew(EditorPropertyArray);
+ editor->setup(Variant::PACKED_FLOAT32_ARRAY);
+ add_property_editor(p_path, editor);
+ } break;
+ case Variant::PACKED_FLOAT64_ARRAY: {
+ EditorPropertyArray *editor = memnew(EditorPropertyArray);
+ editor->setup(Variant::PACKED_FLOAT64_ARRAY);
add_property_editor(p_path, editor);
} break;
case Variant::PACKED_STRING_ARRAY: {
@@ -3413,7 +3423,7 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
EditorPropertyArray *editor = memnew(EditorPropertyArray);
editor->setup(Variant::PACKED_VECTOR3_ARRAY);
add_property_editor(p_path, editor);
- } break; // 25
+ } break;
case Variant::PACKED_COLOR_ARRAY: {
EditorPropertyArray *editor = memnew(EditorPropertyArray);
editor->setup(Variant::PACKED_COLOR_ARRAY);
diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp
index 53ee86c71e..541069338c 100644
--- a/editor/editor_properties_array_dict.cpp
+++ b/editor/editor_properties_array_dict.cpp
@@ -231,11 +231,17 @@ void EditorPropertyArray::update_property() {
case Variant::PACKED_BYTE_ARRAY: {
arrtype = "PackedByteArray";
} break;
- case Variant::PACKED_INT_ARRAY: {
- arrtype = "PackedIntArray";
+ case Variant::PACKED_INT32_ARRAY: {
+ arrtype = "PackedInt32Array";
} break;
- case Variant::PACKED_REAL_ARRAY: {
- arrtype = "PackedRealArray";
+ case Variant::PACKED_FLOAT32_ARRAY: {
+ arrtype = "PackedFloat32Array";
+ } break;
+ case Variant::PACKED_INT64_ARRAY: {
+ arrtype = "PackedInt64Array";
+ } break;
+ case Variant::PACKED_FLOAT64_ARRAY: {
+ arrtype = "PackedFloat64Array";
} break;
case Variant::PACKED_STRING_ARRAY: {
arrtype = "PackedStringArray";
@@ -724,7 +730,7 @@ void EditorPropertyDictionary::update_property() {
prop = editor;
} break;
- case Variant::REAL: {
+ case Variant::FLOAT: {
EditorPropertyFloat *editor = memnew(EditorPropertyFloat);
editor->setup(-100000, 100000, 0.001, true, false, true, true);
@@ -851,16 +857,28 @@ void EditorPropertyDictionary::update_property() {
editor->setup(Variant::PACKED_BYTE_ARRAY);
prop = editor;
} break;
- case Variant::PACKED_INT_ARRAY: {
+ case Variant::PACKED_INT32_ARRAY: {
+
+ EditorPropertyArray *editor = memnew(EditorPropertyArray);
+ editor->setup(Variant::PACKED_INT32_ARRAY);
+ prop = editor;
+ } break;
+ case Variant::PACKED_FLOAT32_ARRAY: {
+
+ EditorPropertyArray *editor = memnew(EditorPropertyArray);
+ editor->setup(Variant::PACKED_FLOAT32_ARRAY);
+ prop = editor;
+ } break;
+ case Variant::PACKED_INT64_ARRAY: {
EditorPropertyArray *editor = memnew(EditorPropertyArray);
- editor->setup(Variant::PACKED_INT_ARRAY);
+ editor->setup(Variant::PACKED_INT64_ARRAY);
prop = editor;
} break;
- case Variant::PACKED_REAL_ARRAY: {
+ case Variant::PACKED_FLOAT64_ARRAY: {
EditorPropertyArray *editor = memnew(EditorPropertyArray);
- editor->setup(Variant::PACKED_REAL_ARRAY);
+ editor->setup(Variant::PACKED_FLOAT64_ARRAY);
prop = editor;
} break;
case Variant::PACKED_STRING_ARRAY: {
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index d81b9bbb82..bd2505f146 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -319,7 +319,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("interface/editor/display_scale", 0);
hints["interface/editor/display_scale"] = PropertyInfo(Variant::INT, "interface/editor/display_scale", PROPERTY_HINT_ENUM, "Auto,75%,100%,125%,150%,175%,200%,Custom", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
_initial_set("interface/editor/custom_display_scale", 1.0f);
- hints["interface/editor/custom_display_scale"] = PropertyInfo(Variant::REAL, "interface/editor/custom_display_scale", PROPERTY_HINT_RANGE, "0.5,3,0.01", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
+ hints["interface/editor/custom_display_scale"] = PropertyInfo(Variant::FLOAT, "interface/editor/custom_display_scale", PROPERTY_HINT_RANGE, "0.5,3,0.01", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
_initial_set("interface/editor/main_font_size", 14);
hints["interface/editor/main_font_size"] = PropertyInfo(Variant::INT, "interface/editor/main_font_size", PROPERTY_HINT_RANGE, "8,48,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
_initial_set("interface/editor/code_font_size", 14);
@@ -335,9 +335,9 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
hints["interface/editor/code_font"] = PropertyInfo(Variant::STRING, "interface/editor/code_font", PROPERTY_HINT_GLOBAL_FILE, "*.ttf,*.otf", PROPERTY_USAGE_DEFAULT);
_initial_set("interface/editor/dim_editor_on_dialog_popup", true);
_initial_set("interface/editor/low_processor_mode_sleep_usec", 6900); // ~144 FPS
- hints["interface/editor/low_processor_mode_sleep_usec"] = PropertyInfo(Variant::REAL, "interface/editor/low_processor_mode_sleep_usec", PROPERTY_HINT_RANGE, "1,100000,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
+ hints["interface/editor/low_processor_mode_sleep_usec"] = PropertyInfo(Variant::FLOAT, "interface/editor/low_processor_mode_sleep_usec", PROPERTY_HINT_RANGE, "1,100000,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
_initial_set("interface/editor/unfocused_low_processor_mode_sleep_usec", 50000); // 20 FPS
- hints["interface/editor/unfocused_low_processor_mode_sleep_usec"] = PropertyInfo(Variant::REAL, "interface/editor/unfocused_low_processor_mode_sleep_usec", PROPERTY_HINT_RANGE, "1,100000,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
+ hints["interface/editor/unfocused_low_processor_mode_sleep_usec"] = PropertyInfo(Variant::FLOAT, "interface/editor/unfocused_low_processor_mode_sleep_usec", PROPERTY_HINT_RANGE, "1,100000,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
_initial_set("interface/editor/separate_distraction_mode", false);
_initial_set("interface/editor/automatically_open_screenshots", true);
_initial_set("interface/editor/hide_console_window", false);
@@ -354,15 +354,15 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("interface/theme/accent_color", Color(0.41, 0.61, 0.91));
hints["interface/theme/accent_color"] = PropertyInfo(Variant::COLOR, "interface/theme/accent_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT);
_initial_set("interface/theme/contrast", 0.25);
- hints["interface/theme/contrast"] = PropertyInfo(Variant::REAL, "interface/theme/contrast", PROPERTY_HINT_RANGE, "0.01, 1, 0.01");
+ hints["interface/theme/contrast"] = PropertyInfo(Variant::FLOAT, "interface/theme/contrast", PROPERTY_HINT_RANGE, "0.01, 1, 0.01");
_initial_set("interface/theme/relationship_line_opacity", 0.1);
- hints["interface/theme/relationship_line_opacity"] = PropertyInfo(Variant::REAL, "interface/theme/relationship_line_opacity", PROPERTY_HINT_RANGE, "0.00, 1, 0.01");
+ hints["interface/theme/relationship_line_opacity"] = PropertyInfo(Variant::FLOAT, "interface/theme/relationship_line_opacity", PROPERTY_HINT_RANGE, "0.00, 1, 0.01");
_initial_set("interface/theme/highlight_tabs", false);
_initial_set("interface/theme/border_size", 1);
_initial_set("interface/theme/use_graph_node_headers", false);
hints["interface/theme/border_size"] = PropertyInfo(Variant::INT, "interface/theme/border_size", PROPERTY_HINT_RANGE, "0,2,1", PROPERTY_USAGE_DEFAULT);
_initial_set("interface/theme/additional_spacing", 0);
- hints["interface/theme/additional_spacing"] = PropertyInfo(Variant::REAL, "interface/theme/additional_spacing", PROPERTY_HINT_RANGE, "0,5,0.1", PROPERTY_USAGE_DEFAULT);
+ hints["interface/theme/additional_spacing"] = PropertyInfo(Variant::FLOAT, "interface/theme/additional_spacing", PROPERTY_HINT_RANGE, "0,5,0.1", PROPERTY_USAGE_DEFAULT);
_initial_set("interface/theme/custom_theme", "");
hints["interface/theme/custom_theme"] = PropertyInfo(Variant::STRING, "interface/theme/custom_theme", PROPERTY_HINT_GLOBAL_FILE, "*.res,*.tres,*.theme", PROPERTY_USAGE_DEFAULT);
@@ -477,15 +477,15 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("text_editor/cursor/block_caret", false);
_initial_set("text_editor/cursor/caret_blink", true);
_initial_set("text_editor/cursor/caret_blink_speed", 0.5);
- hints["text_editor/cursor/caret_blink_speed"] = PropertyInfo(Variant::REAL, "text_editor/cursor/caret_blink_speed", PROPERTY_HINT_RANGE, "0.1, 10, 0.01");
+ hints["text_editor/cursor/caret_blink_speed"] = PropertyInfo(Variant::FLOAT, "text_editor/cursor/caret_blink_speed", PROPERTY_HINT_RANGE, "0.1, 10, 0.01");
_initial_set("text_editor/cursor/right_click_moves_caret", true);
// Completion
_initial_set("text_editor/completion/idle_parse_delay", 2.0);
- hints["text_editor/completion/idle_parse_delay"] = PropertyInfo(Variant::REAL, "text_editor/completion/idle_parse_delay", PROPERTY_HINT_RANGE, "0.1, 10, 0.01");
+ hints["text_editor/completion/idle_parse_delay"] = PropertyInfo(Variant::FLOAT, "text_editor/completion/idle_parse_delay", PROPERTY_HINT_RANGE, "0.1, 10, 0.01");
_initial_set("text_editor/completion/auto_brace_complete", true);
_initial_set("text_editor/completion/code_complete_delay", 0.3);
- hints["text_editor/completion/code_complete_delay"] = PropertyInfo(Variant::REAL, "text_editor/completion/code_complete_delay", PROPERTY_HINT_RANGE, "0.01, 5, 0.01");
+ hints["text_editor/completion/code_complete_delay"] = PropertyInfo(Variant::FLOAT, "text_editor/completion/code_complete_delay", PROPERTY_HINT_RANGE, "0.01, 5, 0.01");
_initial_set("text_editor/completion/put_callhint_tooltip_below_current_line", true);
_initial_set("text_editor/completion/callhint_tooltip_offset", Vector2());
_initial_set("text_editor/completion/complete_file_paths", true);
@@ -541,23 +541,23 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
// 3D: Navigation feel
_initial_set("editors/3d/navigation_feel/orbit_sensitivity", 0.4);
- hints["editors/3d/navigation_feel/orbit_sensitivity"] = PropertyInfo(Variant::REAL, "editors/3d/navigation_feel/orbit_sensitivity", PROPERTY_HINT_RANGE, "0.0, 2, 0.01");
+ hints["editors/3d/navigation_feel/orbit_sensitivity"] = PropertyInfo(Variant::FLOAT, "editors/3d/navigation_feel/orbit_sensitivity", PROPERTY_HINT_RANGE, "0.0, 2, 0.01");
_initial_set("editors/3d/navigation_feel/orbit_inertia", 0.05);
- hints["editors/3d/navigation_feel/orbit_inertia"] = PropertyInfo(Variant::REAL, "editors/3d/navigation_feel/orbit_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
+ hints["editors/3d/navigation_feel/orbit_inertia"] = PropertyInfo(Variant::FLOAT, "editors/3d/navigation_feel/orbit_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
_initial_set("editors/3d/navigation_feel/translation_inertia", 0.15);
- hints["editors/3d/navigation_feel/translation_inertia"] = PropertyInfo(Variant::REAL, "editors/3d/navigation_feel/translation_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
+ hints["editors/3d/navigation_feel/translation_inertia"] = PropertyInfo(Variant::FLOAT, "editors/3d/navigation_feel/translation_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
_initial_set("editors/3d/navigation_feel/zoom_inertia", 0.075);
- hints["editors/3d/navigation_feel/zoom_inertia"] = PropertyInfo(Variant::REAL, "editors/3d/navigation_feel/zoom_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
+ hints["editors/3d/navigation_feel/zoom_inertia"] = PropertyInfo(Variant::FLOAT, "editors/3d/navigation_feel/zoom_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
_initial_set("editors/3d/navigation_feel/manipulation_orbit_inertia", 0.075);
- hints["editors/3d/navigation_feel/manipulation_orbit_inertia"] = PropertyInfo(Variant::REAL, "editors/3d/navigation_feel/manipulation_orbit_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
+ hints["editors/3d/navigation_feel/manipulation_orbit_inertia"] = PropertyInfo(Variant::FLOAT, "editors/3d/navigation_feel/manipulation_orbit_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
_initial_set("editors/3d/navigation_feel/manipulation_translation_inertia", 0.075);
- hints["editors/3d/navigation_feel/manipulation_translation_inertia"] = PropertyInfo(Variant::REAL, "editors/3d/navigation_feel/manipulation_translation_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
+ hints["editors/3d/navigation_feel/manipulation_translation_inertia"] = PropertyInfo(Variant::FLOAT, "editors/3d/navigation_feel/manipulation_translation_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
// 3D: Freelook
_initial_set("editors/3d/freelook/freelook_inertia", 0.1);
- hints["editors/3d/freelook/freelook_inertia"] = PropertyInfo(Variant::REAL, "editors/3d/freelook/freelook_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
+ hints["editors/3d/freelook/freelook_inertia"] = PropertyInfo(Variant::FLOAT, "editors/3d/freelook/freelook_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
_initial_set("editors/3d/freelook/freelook_base_speed", 5.0);
- hints["editors/3d/freelook/freelook_base_speed"] = PropertyInfo(Variant::REAL, "editors/3d/freelook/freelook_base_speed", PROPERTY_HINT_RANGE, "0.0, 10, 0.01");
+ hints["editors/3d/freelook/freelook_base_speed"] = PropertyInfo(Variant::FLOAT, "editors/3d/freelook/freelook_base_speed", PROPERTY_HINT_RANGE, "0.0, 10, 0.01");
_initial_set("editors/3d/freelook/freelook_activation_modifier", 0);
hints["editors/3d/freelook/freelook_activation_modifier"] = PropertyInfo(Variant::INT, "editors/3d/freelook/freelook_activation_modifier", PROPERTY_HINT_ENUM, "None,Shift,Alt,Meta,Ctrl");
_initial_set("editors/3d/freelook/freelook_speed_zoom_link", false);
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index 4172570089..5363d6a1e2 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -1775,7 +1775,7 @@ void FileSystemDock::_file_option(int p_option, const Vector<String> &p_selected
}
}
-void FileSystemDock::_resource_created() const {
+void FileSystemDock::_resource_created() {
Object *c = new_resource_dialog->instance_selected();
ERR_FAIL_COND(!c);
diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h
index d20d4add4e..1969f85e72 100644
--- a/editor/filesystem_dock.h
+++ b/editor/filesystem_dock.h
@@ -215,7 +215,7 @@ private:
void _files_moved(String p_old_file, String p_new_file);
void _folder_moved(String p_old_folder, String p_new_folder);
- void _resource_created() const;
+ void _resource_created();
void _make_dir_confirm();
void _make_scene_confirm();
void _rename_operation_confirm();
diff --git a/editor/groups_editor.cpp b/editor/groups_editor.cpp
index 739e9f68c5..444958b0ac 100644
--- a/editor/groups_editor.cpp
+++ b/editor/groups_editor.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "groups_editor.h"
+
#include "editor/scene_tree_editor.h"
#include "editor_node.h"
#include "editor_scale.h"
@@ -468,7 +469,6 @@ GroupDialog::GroupDialog() {
nodes_to_add->set_select_mode(Tree::SELECT_MULTI);
nodes_to_add->set_v_size_flags(SIZE_EXPAND_FILL);
nodes_to_add->add_constant_override("draw_guides", 1);
- nodes_to_add->connect_compat("item_selected", this, "_nodes_to_add_selected");
HBoxContainer *add_filter_hbc = memnew(HBoxContainer);
add_filter_hbc->add_constant_override("separate", 0);
@@ -515,7 +515,6 @@ GroupDialog::GroupDialog() {
nodes_to_remove->set_hide_folding(true);
nodes_to_remove->set_select_mode(Tree::SELECT_MULTI);
nodes_to_remove->add_constant_override("draw_guides", 1);
- nodes_to_remove->connect_compat("item_selected", this, "_node_to_remove_selected");
HBoxContainer *remove_filter_hbc = memnew(HBoxContainer);
remove_filter_hbc->add_constant_override("separate", 0);
diff --git a/editor/icons/icon_2_d.svg b/editor/icons/2D.svg
index e1a96aeab6..e1a96aeab6 100644
--- a/editor/icons/icon_2_d.svg
+++ b/editor/icons/2D.svg
diff --git a/editor/icons/icon_3_d.svg b/editor/icons/3D.svg
index 2a1d5ff36d..2a1d5ff36d 100644
--- a/editor/icons/icon_3_d.svg
+++ b/editor/icons/3D.svg
diff --git a/editor/icons/icon_a_a_b_b.svg b/editor/icons/AABB.svg
index d6fbc52541..d6fbc52541 100644
--- a/editor/icons/icon_a_a_b_b.svg
+++ b/editor/icons/AABB.svg
diff --git a/editor/icons/icon_a_r_v_r_anchor.svg b/editor/icons/ARVRAnchor.svg
index f1571b3fcc..f1571b3fcc 100644
--- a/editor/icons/icon_a_r_v_r_anchor.svg
+++ b/editor/icons/ARVRAnchor.svg
diff --git a/editor/icons/icon_a_r_v_r_camera.svg b/editor/icons/ARVRCamera.svg
index f59a8c8b4a..f59a8c8b4a 100644
--- a/editor/icons/icon_a_r_v_r_camera.svg
+++ b/editor/icons/ARVRCamera.svg
diff --git a/editor/icons/icon_a_r_v_r_controller.svg b/editor/icons/ARVRController.svg
index 40e5b8dce1..40e5b8dce1 100644
--- a/editor/icons/icon_a_r_v_r_controller.svg
+++ b/editor/icons/ARVRController.svg
diff --git a/editor/icons/icon_a_r_v_r_origin.svg b/editor/icons/ARVROrigin.svg
index dbb93ba7a5..dbb93ba7a5 100644
--- a/editor/icons/icon_a_r_v_r_origin.svg
+++ b/editor/icons/ARVROrigin.svg
diff --git a/editor/icons/icon_accept_dialog.svg b/editor/icons/AcceptDialog.svg
index e0bf7b8336..e0bf7b8336 100644
--- a/editor/icons/icon_accept_dialog.svg
+++ b/editor/icons/AcceptDialog.svg
diff --git a/editor/icons/icon_action_copy.svg b/editor/icons/ActionCopy.svg
index d7a1e1097a..d7a1e1097a 100644
--- a/editor/icons/icon_action_copy.svg
+++ b/editor/icons/ActionCopy.svg
diff --git a/editor/icons/icon_action_cut.svg b/editor/icons/ActionCut.svg
index 97df9b2d5a..97df9b2d5a 100644
--- a/editor/icons/icon_action_cut.svg
+++ b/editor/icons/ActionCut.svg
diff --git a/editor/icons/icon_action_paste.svg b/editor/icons/ActionPaste.svg
index 6d46f899f8..6d46f899f8 100644
--- a/editor/icons/icon_action_paste.svg
+++ b/editor/icons/ActionPaste.svg
diff --git a/editor/icons/icon_add.svg b/editor/icons/Add.svg
index a241829603..a241829603 100644
--- a/editor/icons/icon_add.svg
+++ b/editor/icons/Add.svg
diff --git a/editor/icons/icon_add_atlas_tile.svg b/editor/icons/AddAtlasTile.svg
index 97d3590678..97d3590678 100644
--- a/editor/icons/icon_add_atlas_tile.svg
+++ b/editor/icons/AddAtlasTile.svg
diff --git a/editor/icons/icon_add_autotile.svg b/editor/icons/AddAutotile.svg
index c6f1df422d..c6f1df422d 100644
--- a/editor/icons/icon_add_autotile.svg
+++ b/editor/icons/AddAutotile.svg
diff --git a/editor/icons/icon_add_single_tile.svg b/editor/icons/AddSingleTile.svg
index 319fef8078..319fef8078 100644
--- a/editor/icons/icon_add_single_tile.svg
+++ b/editor/icons/AddSingleTile.svg
diff --git a/editor/icons/icon_add_split.svg b/editor/icons/AddSplit.svg
index 1f33e8c72b..1f33e8c72b 100644
--- a/editor/icons/icon_add_split.svg
+++ b/editor/icons/AddSplit.svg
diff --git a/editor/icons/icon_anchor.svg b/editor/icons/Anchor.svg
index 119960d177..119960d177 100644
--- a/editor/icons/icon_anchor.svg
+++ b/editor/icons/Anchor.svg
diff --git a/editor/icons/icon_animated_sprite.svg b/editor/icons/AnimatedSprite.svg
index 411ddda015..411ddda015 100644
--- a/editor/icons/icon_animated_sprite.svg
+++ b/editor/icons/AnimatedSprite.svg
diff --git a/editor/icons/icon_animated_sprite_3d.svg b/editor/icons/AnimatedSprite3D.svg
index 974c4e04eb..974c4e04eb 100644
--- a/editor/icons/icon_animated_sprite_3d.svg
+++ b/editor/icons/AnimatedSprite3D.svg
diff --git a/editor/icons/icon_animated_texture.svg b/editor/icons/AnimatedTexture.svg
index 3719b64747..3719b64747 100644
--- a/editor/icons/icon_animated_texture.svg
+++ b/editor/icons/AnimatedTexture.svg
diff --git a/editor/icons/icon_animation.svg b/editor/icons/Animation.svg
index 2cb738a8a6..2cb738a8a6 100644
--- a/editor/icons/icon_animation.svg
+++ b/editor/icons/Animation.svg
diff --git a/editor/icons/icon_animation_filter.svg b/editor/icons/AnimationFilter.svg
index 45c323543d..45c323543d 100644
--- a/editor/icons/icon_animation_filter.svg
+++ b/editor/icons/AnimationFilter.svg
diff --git a/editor/icons/icon_animation_player.svg b/editor/icons/AnimationPlayer.svg
index a5f7804e0d..a5f7804e0d 100644
--- a/editor/icons/icon_animation_player.svg
+++ b/editor/icons/AnimationPlayer.svg
diff --git a/editor/icons/icon_animation_track_group.svg b/editor/icons/AnimationTrackGroup.svg
index d0d14b7c44..d0d14b7c44 100644
--- a/editor/icons/icon_animation_track_group.svg
+++ b/editor/icons/AnimationTrackGroup.svg
diff --git a/editor/icons/icon_animation_track_list.svg b/editor/icons/AnimationTrackList.svg
index e47c8b18cb..e47c8b18cb 100644
--- a/editor/icons/icon_animation_track_list.svg
+++ b/editor/icons/AnimationTrackList.svg
diff --git a/editor/icons/icon_animation_tree.svg b/editor/icons/AnimationTree.svg
index 718eaac2d2..718eaac2d2 100644
--- a/editor/icons/icon_animation_tree.svg
+++ b/editor/icons/AnimationTree.svg
diff --git a/editor/icons/icon_area.svg b/editor/icons/Area.svg
index 21ebe3c251..21ebe3c251 100644
--- a/editor/icons/icon_area.svg
+++ b/editor/icons/Area.svg
diff --git a/editor/icons/icon_area_2d.svg b/editor/icons/Area2D.svg
index e374205b13..e374205b13 100644
--- a/editor/icons/icon_area_2d.svg
+++ b/editor/icons/Area2D.svg
diff --git a/editor/icons/icon_array.svg b/editor/icons/Array.svg
index d499fcac3a..d499fcac3a 100644
--- a/editor/icons/icon_array.svg
+++ b/editor/icons/Array.svg
diff --git a/editor/icons/icon_array_mesh.svg b/editor/icons/ArrayMesh.svg
index 394a18623d..394a18623d 100644
--- a/editor/icons/icon_array_mesh.svg
+++ b/editor/icons/ArrayMesh.svg
diff --git a/editor/icons/icon_arrow_down.svg b/editor/icons/ArrowDown.svg
index 49a93e6e28..49a93e6e28 100644
--- a/editor/icons/icon_arrow_down.svg
+++ b/editor/icons/ArrowDown.svg
diff --git a/editor/icons/icon_arrow_left.svg b/editor/icons/ArrowLeft.svg
index fbbe5d9075..fbbe5d9075 100644
--- a/editor/icons/icon_arrow_left.svg
+++ b/editor/icons/ArrowLeft.svg
diff --git a/editor/icons/icon_arrow_right.svg b/editor/icons/ArrowRight.svg
index 7895158bb1..7895158bb1 100644
--- a/editor/icons/icon_arrow_right.svg
+++ b/editor/icons/ArrowRight.svg
diff --git a/editor/icons/icon_arrow_up.svg b/editor/icons/ArrowUp.svg
index 9bf19a6a12..9bf19a6a12 100644
--- a/editor/icons/icon_arrow_up.svg
+++ b/editor/icons/ArrowUp.svg
diff --git a/editor/icons/icon_asset_lib.svg b/editor/icons/AssetLib.svg
index 72b20ec047..72b20ec047 100644
--- a/editor/icons/icon_asset_lib.svg
+++ b/editor/icons/AssetLib.svg
diff --git a/editor/icons/icon_atlas_texture.svg b/editor/icons/AtlasTexture.svg
index 28a44e179a..28a44e179a 100644
--- a/editor/icons/icon_atlas_texture.svg
+++ b/editor/icons/AtlasTexture.svg
diff --git a/editor/icons/icon_audio_bus_bypass.svg b/editor/icons/AudioBusBypass.svg
index c251a7c83f..c251a7c83f 100644
--- a/editor/icons/icon_audio_bus_bypass.svg
+++ b/editor/icons/AudioBusBypass.svg
diff --git a/editor/icons/icon_audio_bus_layout.svg b/editor/icons/AudioBusLayout.svg
index f95794a7c7..f95794a7c7 100644
--- a/editor/icons/icon_audio_bus_layout.svg
+++ b/editor/icons/AudioBusLayout.svg
diff --git a/editor/icons/icon_audio_bus_mute.svg b/editor/icons/AudioBusMute.svg
index 4750b0fec0..4750b0fec0 100644
--- a/editor/icons/icon_audio_bus_mute.svg
+++ b/editor/icons/AudioBusMute.svg
diff --git a/editor/icons/icon_audio_bus_solo.svg b/editor/icons/AudioBusSolo.svg
index 5be72a8961..5be72a8961 100644
--- a/editor/icons/icon_audio_bus_solo.svg
+++ b/editor/icons/AudioBusSolo.svg
diff --git a/editor/icons/icon_audio_stream_o_g_g_vorbis.svg b/editor/icons/AudioStreamOGGVorbis.svg
index a8d6fb6bf1..a8d6fb6bf1 100644
--- a/editor/icons/icon_audio_stream_o_g_g_vorbis.svg
+++ b/editor/icons/AudioStreamOGGVorbis.svg
diff --git a/editor/icons/icon_audio_stream_player.svg b/editor/icons/AudioStreamPlayer.svg
index bbe2793407..bbe2793407 100644
--- a/editor/icons/icon_audio_stream_player.svg
+++ b/editor/icons/AudioStreamPlayer.svg
diff --git a/editor/icons/icon_audio_stream_player_2_d.svg b/editor/icons/AudioStreamPlayer2D.svg
index 090b23ff7c..090b23ff7c 100644
--- a/editor/icons/icon_audio_stream_player_2_d.svg
+++ b/editor/icons/AudioStreamPlayer2D.svg
diff --git a/editor/icons/icon_audio_stream_player_3_d.svg b/editor/icons/AudioStreamPlayer3D.svg
index 95da9818aa..95da9818aa 100644
--- a/editor/icons/icon_audio_stream_player_3_d.svg
+++ b/editor/icons/AudioStreamPlayer3D.svg
diff --git a/editor/icons/icon_audio_stream_sample.svg b/editor/icons/AudioStreamSample.svg
index a8d6fb6bf1..a8d6fb6bf1 100644
--- a/editor/icons/icon_audio_stream_sample.svg
+++ b/editor/icons/AudioStreamSample.svg
diff --git a/editor/icons/icon_auto_end.svg b/editor/icons/AutoEnd.svg
index 35f5fb2b1c..35f5fb2b1c 100644
--- a/editor/icons/icon_auto_end.svg
+++ b/editor/icons/AutoEnd.svg
diff --git a/editor/icons/icon_auto_key.svg b/editor/icons/AutoKey.svg
index 3d5569397f..3d5569397f 100644
--- a/editor/icons/icon_auto_key.svg
+++ b/editor/icons/AutoKey.svg
diff --git a/editor/icons/icon_auto_play.svg b/editor/icons/AutoPlay.svg
index dbe41f244f..dbe41f244f 100644
--- a/editor/icons/icon_auto_play.svg
+++ b/editor/icons/AutoPlay.svg
diff --git a/editor/icons/icon_auto_triangle.svg b/editor/icons/AutoTriangle.svg
index 13b8f7c5d2..13b8f7c5d2 100644
--- a/editor/icons/icon_auto_triangle.svg
+++ b/editor/icons/AutoTriangle.svg
diff --git a/editor/icons/icon_back.svg b/editor/icons/Back.svg
index c8ea97fa5c..c8ea97fa5c 100644
--- a/editor/icons/icon_back.svg
+++ b/editor/icons/Back.svg
diff --git a/editor/icons/icon_back_buffer_copy.svg b/editor/icons/BackBufferCopy.svg
index c16cfe9009..c16cfe9009 100644
--- a/editor/icons/icon_back_buffer_copy.svg
+++ b/editor/icons/BackBufferCopy.svg
diff --git a/editor/icons/icon_bake.svg b/editor/icons/Bake.svg
index 9bcfb174dc..9bcfb174dc 100644
--- a/editor/icons/icon_bake.svg
+++ b/editor/icons/Bake.svg
diff --git a/editor/icons/icon_baked_lightmap.svg b/editor/icons/BakedLightmap.svg
index 338a100022..338a100022 100644
--- a/editor/icons/icon_baked_lightmap.svg
+++ b/editor/icons/BakedLightmap.svg
diff --git a/editor/icons/icon_baked_lightmap_data.svg b/editor/icons/BakedLightmapData.svg
index e8d471c2af..e8d471c2af 100644
--- a/editor/icons/icon_baked_lightmap_data.svg
+++ b/editor/icons/BakedLightmapData.svg
diff --git a/editor/icons/icon_basis.svg b/editor/icons/Basis.svg
index ecdb0f4ec0..ecdb0f4ec0 100644
--- a/editor/icons/icon_basis.svg
+++ b/editor/icons/Basis.svg
diff --git a/editor/icons/icon_bezier_handles_balanced.svg b/editor/icons/BezierHandlesBalanced.svg
index 6656d3f5eb..6656d3f5eb 100644
--- a/editor/icons/icon_bezier_handles_balanced.svg
+++ b/editor/icons/BezierHandlesBalanced.svg
diff --git a/editor/icons/icon_bezier_handles_free.svg b/editor/icons/BezierHandlesFree.svg
index 06abfe34ab..06abfe34ab 100644
--- a/editor/icons/icon_bezier_handles_free.svg
+++ b/editor/icons/BezierHandlesFree.svg
diff --git a/editor/icons/icon_bezier_handles_mirror.svg b/editor/icons/BezierHandlesMirror.svg
index be85f170c7..be85f170c7 100644
--- a/editor/icons/icon_bezier_handles_mirror.svg
+++ b/editor/icons/BezierHandlesMirror.svg
diff --git a/editor/icons/icon_bit_map.svg b/editor/icons/BitMap.svg
index b61c1b7dc5..b61c1b7dc5 100644
--- a/editor/icons/icon_bit_map.svg
+++ b/editor/icons/BitMap.svg
diff --git a/editor/icons/icon_bitmap_font.svg b/editor/icons/BitmapFont.svg
index 5e5bd859c9..5e5bd859c9 100644
--- a/editor/icons/icon_bitmap_font.svg
+++ b/editor/icons/BitmapFont.svg
diff --git a/editor/icons/icon_blend.svg b/editor/icons/Blend.svg
index c78b9287fa..c78b9287fa 100644
--- a/editor/icons/icon_blend.svg
+++ b/editor/icons/Blend.svg
diff --git a/editor/icons/icon_bone.svg b/editor/icons/Bone.svg
index fafebb0394..fafebb0394 100644
--- a/editor/icons/icon_bone.svg
+++ b/editor/icons/Bone.svg
diff --git a/editor/icons/icon_bone_2_d.svg b/editor/icons/Bone2D.svg
index 94bfff61e4..94bfff61e4 100644
--- a/editor/icons/icon_bone_2_d.svg
+++ b/editor/icons/Bone2D.svg
diff --git a/editor/icons/icon_bone_attachment.svg b/editor/icons/BoneAttachment.svg
index 0b7dede0b6..0b7dede0b6 100644
--- a/editor/icons/icon_bone_attachment.svg
+++ b/editor/icons/BoneAttachment.svg
diff --git a/editor/icons/icon_bone_track.svg b/editor/icons/BoneTrack.svg
index 0f6f9bb6cd..0f6f9bb6cd 100644
--- a/editor/icons/icon_bone_track.svg
+++ b/editor/icons/BoneTrack.svg
diff --git a/editor/icons/icon_box_shape.svg b/editor/icons/BoxShape.svg
index 171e95f4fa..171e95f4fa 100644
--- a/editor/icons/icon_box_shape.svg
+++ b/editor/icons/BoxShape.svg
diff --git a/editor/icons/icon_bucket.svg b/editor/icons/Bucket.svg
index fc3481290d..fc3481290d 100644
--- a/editor/icons/icon_bucket.svg
+++ b/editor/icons/Bucket.svg
diff --git a/editor/icons/icon_bus_vu_empty.svg b/editor/icons/BusVuEmpty.svg
index 5260b9e252..5260b9e252 100644
--- a/editor/icons/icon_bus_vu_empty.svg
+++ b/editor/icons/BusVuEmpty.svg
diff --git a/editor/icons/icon_bus_vu_frozen.svg b/editor/icons/BusVuFrozen.svg
index c10bb5a1a2..c10bb5a1a2 100644
--- a/editor/icons/icon_bus_vu_frozen.svg
+++ b/editor/icons/BusVuFrozen.svg
diff --git a/editor/icons/icon_bus_vu_full.svg b/editor/icons/BusVuFull.svg
index 377ac60bc1..377ac60bc1 100644
--- a/editor/icons/icon_bus_vu_full.svg
+++ b/editor/icons/BusVuFull.svg
diff --git a/editor/icons/icon_button.svg b/editor/icons/Button.svg
index 6ea5663dda..6ea5663dda 100644
--- a/editor/icons/icon_button.svg
+++ b/editor/icons/Button.svg
diff --git a/editor/icons/icon_button_group.svg b/editor/icons/ButtonGroup.svg
index 683a8c3054..683a8c3054 100644
--- a/editor/icons/icon_button_group.svg
+++ b/editor/icons/ButtonGroup.svg
diff --git a/editor/icons/icon_c_p_u_particles.svg b/editor/icons/CPUParticles.svg
index af4115c93f..af4115c93f 100644
--- a/editor/icons/icon_c_p_u_particles.svg
+++ b/editor/icons/CPUParticles.svg
diff --git a/editor/icons/icon_c_p_u_particles_2_d.svg b/editor/icons/CPUParticles2D.svg
index 25afc35bec..25afc35bec 100644
--- a/editor/icons/icon_c_p_u_particles_2_d.svg
+++ b/editor/icons/CPUParticles2D.svg
diff --git a/editor/icons/Callable.svg b/editor/icons/Callable.svg
new file mode 100644
index 0000000000..8f421f4fed
--- /dev/null
+++ b/editor/icons/Callable.svg
@@ -0,0 +1,5 @@
+<svg width="16" height="16" version="1.1" viewBox="0 0 4.2333 4.2333" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -292.77)">
+<path transform="matrix(.26458 0 0 .26458 0 292.77)" d="m12 1c-2 2-4 4-7 4h-4v5h4c3 3.8e-5 5 2 7 4v-13zm1 4v5c2.5896-0.015798 2.5896-4.9849 0-5zm-11 6v4h2l1-4h-3z" fill="#e0e0e0"/>
+</g>
+</svg>
diff --git a/editor/icons/icon_camera.svg b/editor/icons/Camera.svg
index af1cb8a2e9..af1cb8a2e9 100644
--- a/editor/icons/icon_camera.svg
+++ b/editor/icons/Camera.svg
diff --git a/editor/icons/icon_camera_2d.svg b/editor/icons/Camera2D.svg
index 9a91b3017b..9a91b3017b 100644
--- a/editor/icons/icon_camera_2d.svg
+++ b/editor/icons/Camera2D.svg
diff --git a/editor/icons/icon_camera_texture.svg b/editor/icons/CameraTexture.svg
index e61b5902f0..e61b5902f0 100644
--- a/editor/icons/icon_camera_texture.svg
+++ b/editor/icons/CameraTexture.svg
diff --git a/editor/icons/icon_canvas_item.svg b/editor/icons/CanvasItem.svg
index eefe501ca8..eefe501ca8 100644
--- a/editor/icons/icon_canvas_item.svg
+++ b/editor/icons/CanvasItem.svg
diff --git a/editor/icons/icon_canvas_item_material.svg b/editor/icons/CanvasItemMaterial.svg
index 7df06ed686..7df06ed686 100644
--- a/editor/icons/icon_canvas_item_material.svg
+++ b/editor/icons/CanvasItemMaterial.svg
diff --git a/editor/icons/icon_canvas_item_shader.svg b/editor/icons/CanvasItemShader.svg
index 834fe61472..834fe61472 100644
--- a/editor/icons/icon_canvas_item_shader.svg
+++ b/editor/icons/CanvasItemShader.svg
diff --git a/editor/icons/icon_canvas_item_shader_graph.svg b/editor/icons/CanvasItemShaderGraph.svg
index 3e83751698..3e83751698 100644
--- a/editor/icons/icon_canvas_item_shader_graph.svg
+++ b/editor/icons/CanvasItemShaderGraph.svg
diff --git a/editor/icons/icon_canvas_layer.svg b/editor/icons/CanvasLayer.svg
index a3fcc903d7..a3fcc903d7 100644
--- a/editor/icons/icon_canvas_layer.svg
+++ b/editor/icons/CanvasLayer.svg
diff --git a/editor/icons/icon_canvas_modulate.svg b/editor/icons/CanvasModulate.svg
index a7b788d638..a7b788d638 100644
--- a/editor/icons/icon_canvas_modulate.svg
+++ b/editor/icons/CanvasModulate.svg
diff --git a/editor/icons/icon_capsule_mesh.svg b/editor/icons/CapsuleMesh.svg
index 1c9470105f..1c9470105f 100644
--- a/editor/icons/icon_capsule_mesh.svg
+++ b/editor/icons/CapsuleMesh.svg
diff --git a/editor/icons/icon_capsule_shape.svg b/editor/icons/CapsuleShape.svg
index ba035ca196..ba035ca196 100644
--- a/editor/icons/icon_capsule_shape.svg
+++ b/editor/icons/CapsuleShape.svg
diff --git a/editor/icons/icon_capsule_shape_2d.svg b/editor/icons/CapsuleShape2D.svg
index 81de995cb4..81de995cb4 100644
--- a/editor/icons/icon_capsule_shape_2d.svg
+++ b/editor/icons/CapsuleShape2D.svg
diff --git a/editor/icons/icon_center_container.svg b/editor/icons/CenterContainer.svg
index 5d854a3cc3..5d854a3cc3 100644
--- a/editor/icons/icon_center_container.svg
+++ b/editor/icons/CenterContainer.svg
diff --git a/editor/icons/icon_check_box.svg b/editor/icons/CheckBox.svg
index 6cb1f2aacd..6cb1f2aacd 100644
--- a/editor/icons/icon_check_box.svg
+++ b/editor/icons/CheckBox.svg
diff --git a/editor/icons/icon_check_button.svg b/editor/icons/CheckButton.svg
index f689c5fe47..f689c5fe47 100644
--- a/editor/icons/icon_check_button.svg
+++ b/editor/icons/CheckButton.svg
diff --git a/editor/icons/icon_checkerboard.svg b/editor/icons/Checkerboard.svg
index 7923291017..7923291017 100644
--- a/editor/icons/icon_checkerboard.svg
+++ b/editor/icons/Checkerboard.svg
diff --git a/editor/icons/icon_circle_shape_2d.svg b/editor/icons/CircleShape2D.svg
index e41fc8807c..e41fc8807c 100644
--- a/editor/icons/icon_circle_shape_2d.svg
+++ b/editor/icons/CircleShape2D.svg
diff --git a/editor/icons/icon_class_list.svg b/editor/icons/ClassList.svg
index ae2494724d..ae2494724d 100644
--- a/editor/icons/icon_class_list.svg
+++ b/editor/icons/ClassList.svg
diff --git a/editor/icons/icon_clear.svg b/editor/icons/Clear.svg
index 91343ca6af..91343ca6af 100644
--- a/editor/icons/icon_clear.svg
+++ b/editor/icons/Clear.svg
diff --git a/editor/icons/icon_clipped_camera.svg b/editor/icons/ClippedCamera.svg
index 8c80c04e27..8c80c04e27 100644
--- a/editor/icons/icon_clipped_camera.svg
+++ b/editor/icons/ClippedCamera.svg
diff --git a/editor/icons/icon_close.svg b/editor/icons/Close.svg
index 4147c7bcdd..4147c7bcdd 100644
--- a/editor/icons/icon_close.svg
+++ b/editor/icons/Close.svg
diff --git a/editor/icons/icon_collapse.svg b/editor/icons/Collapse.svg
index 62b5e55d81..62b5e55d81 100644
--- a/editor/icons/icon_collapse.svg
+++ b/editor/icons/Collapse.svg
diff --git a/editor/icons/icon_collision_polygon.svg b/editor/icons/CollisionPolygon.svg
index 5e849ae4e3..5e849ae4e3 100644
--- a/editor/icons/icon_collision_polygon.svg
+++ b/editor/icons/CollisionPolygon.svg
diff --git a/editor/icons/icon_collision_polygon_2d.svg b/editor/icons/CollisionPolygon2D.svg
index 54148f3fd4..54148f3fd4 100644
--- a/editor/icons/icon_collision_polygon_2d.svg
+++ b/editor/icons/CollisionPolygon2D.svg
diff --git a/editor/icons/icon_collision_shape.svg b/editor/icons/CollisionShape.svg
index 8f14996a97..8f14996a97 100644
--- a/editor/icons/icon_collision_shape.svg
+++ b/editor/icons/CollisionShape.svg
diff --git a/editor/icons/icon_collision_shape_2d.svg b/editor/icons/CollisionShape2D.svg
index 8210bf917f..8210bf917f 100644
--- a/editor/icons/icon_collision_shape_2d.svg
+++ b/editor/icons/CollisionShape2D.svg
diff --git a/editor/icons/icon_color.svg b/editor/icons/Color.svg
index de0540763e..de0540763e 100644
--- a/editor/icons/icon_color.svg
+++ b/editor/icons/Color.svg
diff --git a/editor/icons/icon_color_pick.svg b/editor/icons/ColorPick.svg
index d73225bd60..d73225bd60 100644
--- a/editor/icons/icon_color_pick.svg
+++ b/editor/icons/ColorPick.svg
diff --git a/editor/icons/icon_color_picker.svg b/editor/icons/ColorPicker.svg
index 3d03615708..3d03615708 100644
--- a/editor/icons/icon_color_picker.svg
+++ b/editor/icons/ColorPicker.svg
diff --git a/editor/icons/icon_color_picker_button.svg b/editor/icons/ColorPickerButton.svg
index b9fa86db6a..b9fa86db6a 100644
--- a/editor/icons/icon_color_picker_button.svg
+++ b/editor/icons/ColorPickerButton.svg
diff --git a/editor/icons/icon_color_ramp.svg b/editor/icons/ColorRamp.svg
index e0f0a67483..e0f0a67483 100644
--- a/editor/icons/icon_color_ramp.svg
+++ b/editor/icons/ColorRamp.svg
diff --git a/editor/icons/icon_color_rect.svg b/editor/icons/ColorRect.svg
index c2054de9d3..c2054de9d3 100644
--- a/editor/icons/icon_color_rect.svg
+++ b/editor/icons/ColorRect.svg
diff --git a/editor/icons/icon_color_track_vu.svg b/editor/icons/ColorTrackVu.svg
index 5760f81070..5760f81070 100644
--- a/editor/icons/icon_color_track_vu.svg
+++ b/editor/icons/ColorTrackVu.svg
diff --git a/editor/icons/icon_concave_polygon_shape.svg b/editor/icons/ConcavePolygonShape.svg
index 001ab82826..001ab82826 100644
--- a/editor/icons/icon_concave_polygon_shape.svg
+++ b/editor/icons/ConcavePolygonShape.svg
diff --git a/editor/icons/icon_concave_polygon_shape_2d.svg b/editor/icons/ConcavePolygonShape2D.svg
index 38a92095c9..38a92095c9 100644
--- a/editor/icons/icon_concave_polygon_shape_2d.svg
+++ b/editor/icons/ConcavePolygonShape2D.svg
diff --git a/editor/icons/icon_cone_twist_joint.svg b/editor/icons/ConeTwistJoint.svg
index 0e5e98a17b..0e5e98a17b 100644
--- a/editor/icons/icon_cone_twist_joint.svg
+++ b/editor/icons/ConeTwistJoint.svg
diff --git a/editor/icons/icon_confirmation_dialog.svg b/editor/icons/ConfirmationDialog.svg
index d1f13fbb3b..d1f13fbb3b 100644
--- a/editor/icons/icon_confirmation_dialog.svg
+++ b/editor/icons/ConfirmationDialog.svg
diff --git a/editor/icons/icon_container.svg b/editor/icons/Container.svg
index aaea67faa1..aaea67faa1 100644
--- a/editor/icons/icon_container.svg
+++ b/editor/icons/Container.svg
diff --git a/editor/icons/icon_control.svg b/editor/icons/Control.svg
index ff6a52e29a..ff6a52e29a 100644
--- a/editor/icons/icon_control.svg
+++ b/editor/icons/Control.svg
diff --git a/editor/icons/icon_control_align_bottom_center.svg b/editor/icons/ControlAlignBottomCenter.svg
index 7aee8caa79..7aee8caa79 100644
--- a/editor/icons/icon_control_align_bottom_center.svg
+++ b/editor/icons/ControlAlignBottomCenter.svg
diff --git a/editor/icons/icon_control_align_bottom_left.svg b/editor/icons/ControlAlignBottomLeft.svg
index aa26eb570a..aa26eb570a 100644
--- a/editor/icons/icon_control_align_bottom_left.svg
+++ b/editor/icons/ControlAlignBottomLeft.svg
diff --git a/editor/icons/icon_control_align_bottom_right.svg b/editor/icons/ControlAlignBottomRight.svg
index 737328e6f0..737328e6f0 100644
--- a/editor/icons/icon_control_align_bottom_right.svg
+++ b/editor/icons/ControlAlignBottomRight.svg
diff --git a/editor/icons/icon_control_align_bottom_wide.svg b/editor/icons/ControlAlignBottomWide.svg
index ad0d7fac85..ad0d7fac85 100644
--- a/editor/icons/icon_control_align_bottom_wide.svg
+++ b/editor/icons/ControlAlignBottomWide.svg
diff --git a/editor/icons/icon_control_align_center.svg b/editor/icons/ControlAlignCenter.svg
index 14dd500500..14dd500500 100644
--- a/editor/icons/icon_control_align_center.svg
+++ b/editor/icons/ControlAlignCenter.svg
diff --git a/editor/icons/icon_control_align_center_left.svg b/editor/icons/ControlAlignCenterLeft.svg
index 52f1d4d143..52f1d4d143 100644
--- a/editor/icons/icon_control_align_center_left.svg
+++ b/editor/icons/ControlAlignCenterLeft.svg
diff --git a/editor/icons/icon_control_align_center_right.svg b/editor/icons/ControlAlignCenterRight.svg
index 201796f172..201796f172 100644
--- a/editor/icons/icon_control_align_center_right.svg
+++ b/editor/icons/ControlAlignCenterRight.svg
diff --git a/editor/icons/icon_control_align_left_center.svg b/editor/icons/ControlAlignLeftCenter.svg
index 8135c9d851..8135c9d851 100644
--- a/editor/icons/icon_control_align_left_center.svg
+++ b/editor/icons/ControlAlignLeftCenter.svg
diff --git a/editor/icons/icon_control_align_left_wide.svg b/editor/icons/ControlAlignLeftWide.svg
index 56d16bec76..56d16bec76 100644
--- a/editor/icons/icon_control_align_left_wide.svg
+++ b/editor/icons/ControlAlignLeftWide.svg
diff --git a/editor/icons/icon_control_align_right_center.svg b/editor/icons/ControlAlignRightCenter.svg
index 69c4dba40d..69c4dba40d 100644
--- a/editor/icons/icon_control_align_right_center.svg
+++ b/editor/icons/ControlAlignRightCenter.svg
diff --git a/editor/icons/icon_control_align_right_wide.svg b/editor/icons/ControlAlignRightWide.svg
index b0a46cdb82..b0a46cdb82 100644
--- a/editor/icons/icon_control_align_right_wide.svg
+++ b/editor/icons/ControlAlignRightWide.svg
diff --git a/editor/icons/icon_control_align_top_center.svg b/editor/icons/ControlAlignTopCenter.svg
index cafb3ff856..cafb3ff856 100644
--- a/editor/icons/icon_control_align_top_center.svg
+++ b/editor/icons/ControlAlignTopCenter.svg
diff --git a/editor/icons/icon_control_align_top_left.svg b/editor/icons/ControlAlignTopLeft.svg
index ad288647fb..ad288647fb 100644
--- a/editor/icons/icon_control_align_top_left.svg
+++ b/editor/icons/ControlAlignTopLeft.svg
diff --git a/editor/icons/icon_control_align_top_right.svg b/editor/icons/ControlAlignTopRight.svg
index d9955de728..d9955de728 100644
--- a/editor/icons/icon_control_align_top_right.svg
+++ b/editor/icons/ControlAlignTopRight.svg
diff --git a/editor/icons/icon_control_align_top_wide.svg b/editor/icons/ControlAlignTopWide.svg
index 2526b45ad9..2526b45ad9 100644
--- a/editor/icons/icon_control_align_top_wide.svg
+++ b/editor/icons/ControlAlignTopWide.svg
diff --git a/editor/icons/icon_control_align_wide.svg b/editor/icons/ControlAlignWide.svg
index 5d1467cd9b..5d1467cd9b 100644
--- a/editor/icons/icon_control_align_wide.svg
+++ b/editor/icons/ControlAlignWide.svg
diff --git a/editor/icons/icon_control_hcenter_wide.svg b/editor/icons/ControlHcenterWide.svg
index 51c9aeb22d..51c9aeb22d 100644
--- a/editor/icons/icon_control_hcenter_wide.svg
+++ b/editor/icons/ControlHcenterWide.svg
diff --git a/editor/icons/icon_control_layout.svg b/editor/icons/ControlLayout.svg
index e39e6b474c..e39e6b474c 100644
--- a/editor/icons/icon_control_layout.svg
+++ b/editor/icons/ControlLayout.svg
diff --git a/editor/icons/icon_control_vcenter_wide.svg b/editor/icons/ControlVcenterWide.svg
index 93bbc5748b..93bbc5748b 100644
--- a/editor/icons/icon_control_vcenter_wide.svg
+++ b/editor/icons/ControlVcenterWide.svg
diff --git a/editor/icons/icon_convex_polygon_shape.svg b/editor/icons/ConvexPolygonShape.svg
index bfb9230586..bfb9230586 100644
--- a/editor/icons/icon_convex_polygon_shape.svg
+++ b/editor/icons/ConvexPolygonShape.svg
diff --git a/editor/icons/icon_convex_polygon_shape_2d.svg b/editor/icons/ConvexPolygonShape2D.svg
index 8d16523d93..8d16523d93 100644
--- a/editor/icons/icon_convex_polygon_shape_2d.svg
+++ b/editor/icons/ConvexPolygonShape2D.svg
diff --git a/editor/icons/icon_copy_node_path.svg b/editor/icons/CopyNodePath.svg
index 2cabe0a44e..2cabe0a44e 100644
--- a/editor/icons/icon_copy_node_path.svg
+++ b/editor/icons/CopyNodePath.svg
diff --git a/editor/icons/icon_create_new_scene_from.svg b/editor/icons/CreateNewSceneFrom.svg
index ffeaa36bc4..ffeaa36bc4 100644
--- a/editor/icons/icon_create_new_scene_from.svg
+++ b/editor/icons/CreateNewSceneFrom.svg
diff --git a/editor/icons/icon_crosshair.svg b/editor/icons/Crosshair.svg
index b6fa5ec654..b6fa5ec654 100644
--- a/editor/icons/icon_crosshair.svg
+++ b/editor/icons/Crosshair.svg
diff --git a/editor/icons/icon_crypto_key.svg b/editor/icons/CryptoKey.svg
index 45b53c815d..45b53c815d 100644
--- a/editor/icons/icon_crypto_key.svg
+++ b/editor/icons/CryptoKey.svg
diff --git a/editor/icons/icon_cube_map.svg b/editor/icons/CubeMap.svg
index c9e6f1fa7d..c9e6f1fa7d 100644
--- a/editor/icons/icon_cube_map.svg
+++ b/editor/icons/CubeMap.svg
diff --git a/editor/icons/icon_cube_mesh.svg b/editor/icons/CubeMesh.svg
index aeb5324b1b..aeb5324b1b 100644
--- a/editor/icons/icon_cube_mesh.svg
+++ b/editor/icons/CubeMesh.svg
diff --git a/editor/icons/icon_curve.svg b/editor/icons/Curve.svg
index 14895337c6..14895337c6 100644
--- a/editor/icons/icon_curve.svg
+++ b/editor/icons/Curve.svg
diff --git a/editor/icons/icon_curve_2d.svg b/editor/icons/Curve2D.svg
index 23f585c7c5..23f585c7c5 100644
--- a/editor/icons/icon_curve_2d.svg
+++ b/editor/icons/Curve2D.svg
diff --git a/editor/icons/icon_curve_3d.svg b/editor/icons/Curve3D.svg
index f14c581ec3..f14c581ec3 100644
--- a/editor/icons/icon_curve_3d.svg
+++ b/editor/icons/Curve3D.svg
diff --git a/editor/icons/icon_curve_close.svg b/editor/icons/CurveClose.svg
index 7d7bae88c2..7d7bae88c2 100644
--- a/editor/icons/icon_curve_close.svg
+++ b/editor/icons/CurveClose.svg
diff --git a/editor/icons/icon_curve_constant.svg b/editor/icons/CurveConstant.svg
index 713a3a982a..713a3a982a 100644
--- a/editor/icons/icon_curve_constant.svg
+++ b/editor/icons/CurveConstant.svg
diff --git a/editor/icons/icon_curve_create.svg b/editor/icons/CurveCreate.svg
index 43811f93f5..43811f93f5 100644
--- a/editor/icons/icon_curve_create.svg
+++ b/editor/icons/CurveCreate.svg
diff --git a/editor/icons/icon_curve_curve.svg b/editor/icons/CurveCurve.svg
index 60f965abc1..60f965abc1 100644
--- a/editor/icons/icon_curve_curve.svg
+++ b/editor/icons/CurveCurve.svg
diff --git a/editor/icons/icon_curve_delete.svg b/editor/icons/CurveDelete.svg
index afb545840f..afb545840f 100644
--- a/editor/icons/icon_curve_delete.svg
+++ b/editor/icons/CurveDelete.svg
diff --git a/editor/icons/icon_curve_edit.svg b/editor/icons/CurveEdit.svg
index 5d1d6560e1..5d1d6560e1 100644
--- a/editor/icons/icon_curve_edit.svg
+++ b/editor/icons/CurveEdit.svg
diff --git a/editor/icons/icon_curve_in.svg b/editor/icons/CurveIn.svg
index b9e203dea0..b9e203dea0 100644
--- a/editor/icons/icon_curve_in.svg
+++ b/editor/icons/CurveIn.svg
diff --git a/editor/icons/icon_curve_in_out.svg b/editor/icons/CurveInOut.svg
index 6d3c57d4f5..6d3c57d4f5 100644
--- a/editor/icons/icon_curve_in_out.svg
+++ b/editor/icons/CurveInOut.svg
diff --git a/editor/icons/icon_curve_linear.svg b/editor/icons/CurveLinear.svg
index 2256f493ce..2256f493ce 100644
--- a/editor/icons/icon_curve_linear.svg
+++ b/editor/icons/CurveLinear.svg
diff --git a/editor/icons/icon_curve_out.svg b/editor/icons/CurveOut.svg
index 9b04df6b6c..9b04df6b6c 100644
--- a/editor/icons/icon_curve_out.svg
+++ b/editor/icons/CurveOut.svg
diff --git a/editor/icons/icon_curve_out_in.svg b/editor/icons/CurveOutIn.svg
index 4a08d30966..4a08d30966 100644
--- a/editor/icons/icon_curve_out_in.svg
+++ b/editor/icons/CurveOutIn.svg
diff --git a/editor/icons/icon_curve_texture.svg b/editor/icons/CurveTexture.svg
index 05f9d62775..05f9d62775 100644
--- a/editor/icons/icon_curve_texture.svg
+++ b/editor/icons/CurveTexture.svg
diff --git a/editor/icons/icon_cylinder_mesh.svg b/editor/icons/CylinderMesh.svg
index f204edc985..f204edc985 100644
--- a/editor/icons/icon_cylinder_mesh.svg
+++ b/editor/icons/CylinderMesh.svg
diff --git a/editor/icons/icon_cylinder_shape.svg b/editor/icons/CylinderShape.svg
index f0aa5833d2..f0aa5833d2 100644
--- a/editor/icons/icon_cylinder_shape.svg
+++ b/editor/icons/CylinderShape.svg
diff --git a/editor/icons/icon_damped_spring_joint_2d.svg b/editor/icons/DampedSpringJoint2D.svg
index 9bd842bcc8..9bd842bcc8 100644
--- a/editor/icons/icon_damped_spring_joint_2d.svg
+++ b/editor/icons/DampedSpringJoint2D.svg
diff --git a/editor/icons/icon_debug.svg b/editor/icons/Debug.svg
index 7490862c4a..7490862c4a 100644
--- a/editor/icons/icon_debug.svg
+++ b/editor/icons/Debug.svg
diff --git a/editor/icons/icon_debug_continue.svg b/editor/icons/DebugContinue.svg
index 69c64c4fd4..69c64c4fd4 100644
--- a/editor/icons/icon_debug_continue.svg
+++ b/editor/icons/DebugContinue.svg
diff --git a/editor/icons/icon_debug_next.svg b/editor/icons/DebugNext.svg
index 133be255e1..133be255e1 100644
--- a/editor/icons/icon_debug_next.svg
+++ b/editor/icons/DebugNext.svg
diff --git a/editor/icons/icon_debug_skip_breakpoints_off.svg b/editor/icons/DebugSkipBreakpointsOff.svg
index f8923510bb..f8923510bb 100644
--- a/editor/icons/icon_debug_skip_breakpoints_off.svg
+++ b/editor/icons/DebugSkipBreakpointsOff.svg
diff --git a/editor/icons/icon_debug_skip_breakpoints_on.svg b/editor/icons/DebugSkipBreakpointsOn.svg
index d4a4b4c138..d4a4b4c138 100644
--- a/editor/icons/icon_debug_skip_breakpoints_on.svg
+++ b/editor/icons/DebugSkipBreakpointsOn.svg
diff --git a/editor/icons/icon_debug_step.svg b/editor/icons/DebugStep.svg
index c0356463fe..c0356463fe 100644
--- a/editor/icons/icon_debug_step.svg
+++ b/editor/icons/DebugStep.svg
diff --git a/editor/icons/icon_default_project_icon.svg b/editor/icons/DefaultProjectIcon.svg
index 10ecbd019d..10ecbd019d 100644
--- a/editor/icons/icon_default_project_icon.svg
+++ b/editor/icons/DefaultProjectIcon.svg
diff --git a/editor/icons/icon_delete_split.svg b/editor/icons/DeleteSplit.svg
index 7424de3b8a..7424de3b8a 100644
--- a/editor/icons/icon_delete_split.svg
+++ b/editor/icons/DeleteSplit.svg
diff --git a/editor/icons/icon_dictionary.svg b/editor/icons/Dictionary.svg
index 668ef37a86..668ef37a86 100644
--- a/editor/icons/icon_dictionary.svg
+++ b/editor/icons/Dictionary.svg
diff --git a/editor/icons/icon_directional_light.svg b/editor/icons/DirectionalLight.svg
index faac2be134..faac2be134 100644
--- a/editor/icons/icon_directional_light.svg
+++ b/editor/icons/DirectionalLight.svg
diff --git a/editor/icons/icon_distraction_free.svg b/editor/icons/DistractionFree.svg
index 8608b33f58..8608b33f58 100644
--- a/editor/icons/icon_distraction_free.svg
+++ b/editor/icons/DistractionFree.svg
diff --git a/editor/icons/icon_duplicate.svg b/editor/icons/Duplicate.svg
index d506b7a8c7..d506b7a8c7 100644
--- a/editor/icons/icon_duplicate.svg
+++ b/editor/icons/Duplicate.svg
diff --git a/editor/icons/icon_dynamic_font.svg b/editor/icons/DynamicFont.svg
index fe5eca2e35..fe5eca2e35 100644
--- a/editor/icons/icon_dynamic_font.svg
+++ b/editor/icons/DynamicFont.svg
diff --git a/editor/icons/icon_dynamic_font_data.svg b/editor/icons/DynamicFontData.svg
index 56426dd33e..56426dd33e 100644
--- a/editor/icons/icon_dynamic_font_data.svg
+++ b/editor/icons/DynamicFontData.svg
diff --git a/editor/icons/icon_edit.svg b/editor/icons/Edit.svg
index bb7ffa2fce..bb7ffa2fce 100644
--- a/editor/icons/icon_edit.svg
+++ b/editor/icons/Edit.svg
diff --git a/editor/icons/icon_edit_bezier.svg b/editor/icons/EditBezier.svg
index be9e2f22b8..be9e2f22b8 100644
--- a/editor/icons/icon_edit_bezier.svg
+++ b/editor/icons/EditBezier.svg
diff --git a/editor/icons/icon_edit_internal.svg b/editor/icons/EditInternal.svg
index 2a538102ce..2a538102ce 100644
--- a/editor/icons/icon_edit_internal.svg
+++ b/editor/icons/EditInternal.svg
diff --git a/editor/icons/icon_edit_key.svg b/editor/icons/EditKey.svg
index 883ddfda71..883ddfda71 100644
--- a/editor/icons/icon_edit_key.svg
+++ b/editor/icons/EditKey.svg
diff --git a/editor/icons/icon_edit_pivot.svg b/editor/icons/EditPivot.svg
index ae303535b4..ae303535b4 100644
--- a/editor/icons/icon_edit_pivot.svg
+++ b/editor/icons/EditPivot.svg
diff --git a/editor/icons/icon_edit_resource.svg b/editor/icons/EditResource.svg
index e16ca00355..e16ca00355 100644
--- a/editor/icons/icon_edit_resource.svg
+++ b/editor/icons/EditResource.svg
diff --git a/editor/icons/icon_editor_3d_handle.svg b/editor/icons/Editor3DHandle.svg
index 687a5b184d..687a5b184d 100644
--- a/editor/icons/icon_editor_3d_handle.svg
+++ b/editor/icons/Editor3DHandle.svg
diff --git a/editor/icons/icon_editor_control_anchor.svg b/editor/icons/EditorControlAnchor.svg
index 11e2bb5175..11e2bb5175 100644
--- a/editor/icons/icon_editor_control_anchor.svg
+++ b/editor/icons/EditorControlAnchor.svg
diff --git a/editor/icons/icon_editor_curve_handle.svg b/editor/icons/EditorCurveHandle.svg
index c405ceab9d..c405ceab9d 100644
--- a/editor/icons/icon_editor_curve_handle.svg
+++ b/editor/icons/EditorCurveHandle.svg
diff --git a/editor/icons/icon_editor_handle.svg b/editor/icons/EditorHandle.svg
index 8b11e782db..8b11e782db 100644
--- a/editor/icons/icon_editor_handle.svg
+++ b/editor/icons/EditorHandle.svg
diff --git a/editor/icons/icon_editor_handle_add.svg b/editor/icons/EditorHandleAdd.svg
index bf3b604d5c..bf3b604d5c 100644
--- a/editor/icons/icon_editor_handle_add.svg
+++ b/editor/icons/EditorHandleAdd.svg
diff --git a/editor/icons/icon_editor_internal_handle.svg b/editor/icons/EditorInternalHandle.svg
index 244e6b5d6c..244e6b5d6c 100644
--- a/editor/icons/icon_editor_internal_handle.svg
+++ b/editor/icons/EditorInternalHandle.svg
diff --git a/editor/icons/icon_editor_path_sharp_handle.svg b/editor/icons/EditorPathSharpHandle.svg
index db160dfeae..db160dfeae 100644
--- a/editor/icons/icon_editor_path_sharp_handle.svg
+++ b/editor/icons/EditorPathSharpHandle.svg
diff --git a/editor/icons/icon_editor_path_smooth_handle.svg b/editor/icons/EditorPathSmoothHandle.svg
index 34f3d290bd..34f3d290bd 100644
--- a/editor/icons/icon_editor_path_smooth_handle.svg
+++ b/editor/icons/EditorPathSmoothHandle.svg
diff --git a/editor/icons/icon_editor_pivot.svg b/editor/icons/EditorPivot.svg
index 8e00f60530..8e00f60530 100644
--- a/editor/icons/icon_editor_pivot.svg
+++ b/editor/icons/EditorPivot.svg
diff --git a/editor/icons/icon_editor_plugin.svg b/editor/icons/EditorPlugin.svg
index 72f2bd5c28..72f2bd5c28 100644
--- a/editor/icons/icon_editor_plugin.svg
+++ b/editor/icons/EditorPlugin.svg
diff --git a/editor/icons/icon_editor_position.svg b/editor/icons/EditorPosition.svg
index 7b17fb5aa3..7b17fb5aa3 100644
--- a/editor/icons/icon_editor_position.svg
+++ b/editor/icons/EditorPosition.svg
diff --git a/editor/icons/icon_editor_position_previous.svg b/editor/icons/EditorPositionPrevious.svg
index 8c1d2992a5..8c1d2992a5 100644
--- a/editor/icons/icon_editor_position_previous.svg
+++ b/editor/icons/EditorPositionPrevious.svg
diff --git a/editor/icons/icon_editor_position_unselected.svg b/editor/icons/EditorPositionUnselected.svg
index b9a38ca371..b9a38ca371 100644
--- a/editor/icons/icon_editor_position_unselected.svg
+++ b/editor/icons/EditorPositionUnselected.svg
diff --git a/editor/icons/icon_enum.svg b/editor/icons/Enum.svg
index efa3050e95..efa3050e95 100644
--- a/editor/icons/icon_enum.svg
+++ b/editor/icons/Enum.svg
diff --git a/editor/icons/icon_environment.svg b/editor/icons/Environment.svg
index ee29342942..ee29342942 100644
--- a/editor/icons/icon_environment.svg
+++ b/editor/icons/Environment.svg
diff --git a/editor/icons/icon_error.svg b/editor/icons/Error.svg
index 05e548068d..05e548068d 100644
--- a/editor/icons/icon_error.svg
+++ b/editor/icons/Error.svg
diff --git a/editor/icons/icon_error_sign.svg b/editor/icons/ErrorSign.svg
index 96aace5c0c..96aace5c0c 100644
--- a/editor/icons/icon_error_sign.svg
+++ b/editor/icons/ErrorSign.svg
diff --git a/editor/icons/icon_expand_bottom_dock.svg b/editor/icons/ExpandBottomDock.svg
index 09cc3b9b07..09cc3b9b07 100644
--- a/editor/icons/icon_expand_bottom_dock.svg
+++ b/editor/icons/ExpandBottomDock.svg
diff --git a/editor/icons/icon_favorites.svg b/editor/icons/Favorites.svg
index 79e0c8475e..79e0c8475e 100644
--- a/editor/icons/icon_favorites.svg
+++ b/editor/icons/Favorites.svg
diff --git a/editor/icons/icon_file.svg b/editor/icons/File.svg
index 22d330fd56..22d330fd56 100644
--- a/editor/icons/icon_file.svg
+++ b/editor/icons/File.svg
diff --git a/editor/icons/icon_file_big_thumb.svg b/editor/icons/FileBigThumb.svg
index 50900ab684..50900ab684 100644
--- a/editor/icons/icon_file_big_thumb.svg
+++ b/editor/icons/FileBigThumb.svg
diff --git a/editor/icons/icon_file_broken.svg b/editor/icons/FileBroken.svg
index af79f02c12..af79f02c12 100644
--- a/editor/icons/icon_file_broken.svg
+++ b/editor/icons/FileBroken.svg
diff --git a/editor/icons/icon_file_broken_big_thumb.svg b/editor/icons/FileBrokenBigThumb.svg
index 08dee26f1c..08dee26f1c 100644
--- a/editor/icons/icon_file_broken_big_thumb.svg
+++ b/editor/icons/FileBrokenBigThumb.svg
diff --git a/editor/icons/icon_file_dead.svg b/editor/icons/FileDead.svg
index c40aa1b9a4..c40aa1b9a4 100644
--- a/editor/icons/icon_file_dead.svg
+++ b/editor/icons/FileDead.svg
diff --git a/editor/icons/icon_file_dead_big_thumb.svg b/editor/icons/FileDeadBigThumb.svg
index 79369873a6..79369873a6 100644
--- a/editor/icons/icon_file_dead_big_thumb.svg
+++ b/editor/icons/FileDeadBigThumb.svg
diff --git a/editor/icons/icon_file_dead_medium_thumb.svg b/editor/icons/FileDeadMediumThumb.svg
index 62496daaae..62496daaae 100644
--- a/editor/icons/icon_file_dead_medium_thumb.svg
+++ b/editor/icons/FileDeadMediumThumb.svg
diff --git a/editor/icons/icon_file_dialog.svg b/editor/icons/FileDialog.svg
index 7708659c21..7708659c21 100644
--- a/editor/icons/icon_file_dialog.svg
+++ b/editor/icons/FileDialog.svg
diff --git a/editor/icons/icon_file_list.svg b/editor/icons/FileList.svg
index e47c8b18cb..e47c8b18cb 100644
--- a/editor/icons/icon_file_list.svg
+++ b/editor/icons/FileList.svg
diff --git a/editor/icons/icon_file_medium_thumb.svg b/editor/icons/FileMediumThumb.svg
index 4c7d78b58e..4c7d78b58e 100644
--- a/editor/icons/icon_file_medium_thumb.svg
+++ b/editor/icons/FileMediumThumb.svg
diff --git a/editor/icons/icon_file_thumbnail.svg b/editor/icons/FileThumbnail.svg
index 571335a935..571335a935 100644
--- a/editor/icons/icon_file_thumbnail.svg
+++ b/editor/icons/FileThumbnail.svg
diff --git a/editor/icons/icon_filesystem.svg b/editor/icons/Filesystem.svg
index da6fa2ad60..da6fa2ad60 100644
--- a/editor/icons/icon_filesystem.svg
+++ b/editor/icons/Filesystem.svg
diff --git a/editor/icons/icon_fixed_material.svg b/editor/icons/FixedMaterial.svg
index 903691689b..903691689b 100644
--- a/editor/icons/icon_fixed_material.svg
+++ b/editor/icons/FixedMaterial.svg
diff --git a/editor/icons/icon_fixed_spatial_material.svg b/editor/icons/FixedSpatialMaterial.svg
index ba1e251088..ba1e251088 100644
--- a/editor/icons/icon_fixed_spatial_material.svg
+++ b/editor/icons/FixedSpatialMaterial.svg
diff --git a/editor/icons/icon_folder.svg b/editor/icons/Folder.svg
index 00ff7a95e9..00ff7a95e9 100644
--- a/editor/icons/icon_folder.svg
+++ b/editor/icons/Folder.svg
diff --git a/editor/icons/icon_folder_big_thumb.svg b/editor/icons/FolderBigThumb.svg
index a620d17b8f..a620d17b8f 100644
--- a/editor/icons/icon_folder_big_thumb.svg
+++ b/editor/icons/FolderBigThumb.svg
diff --git a/editor/icons/icon_folder_medium_thumb.svg b/editor/icons/FolderMediumThumb.svg
index 431650aff0..431650aff0 100644
--- a/editor/icons/icon_folder_medium_thumb.svg
+++ b/editor/icons/FolderMediumThumb.svg
diff --git a/editor/icons/icon_font.svg b/editor/icons/Font.svg
index 4b71b59d2e..4b71b59d2e 100644
--- a/editor/icons/icon_font.svg
+++ b/editor/icons/Font.svg
diff --git a/editor/icons/icon_forward.svg b/editor/icons/Forward.svg
index aecd4b362c..aecd4b362c 100644
--- a/editor/icons/icon_forward.svg
+++ b/editor/icons/Forward.svg
diff --git a/editor/icons/icon_g_i_probe.svg b/editor/icons/GIProbe.svg
index 5a5bfd3c5a..5a5bfd3c5a 100644
--- a/editor/icons/icon_g_i_probe.svg
+++ b/editor/icons/GIProbe.svg
diff --git a/editor/icons/icon_g_i_probe_data.svg b/editor/icons/GIProbeData.svg
index d4765be30f..d4765be30f 100644
--- a/editor/icons/icon_g_i_probe_data.svg
+++ b/editor/icons/GIProbeData.svg
diff --git a/editor/icons/icon_generic_6_d_o_f_joint.svg b/editor/icons/Generic6DOFJoint.svg
index 30d892e7a1..30d892e7a1 100644
--- a/editor/icons/icon_generic_6_d_o_f_joint.svg
+++ b/editor/icons/Generic6DOFJoint.svg
diff --git a/editor/icons/icon_gizmo_baked_lightmap.svg b/editor/icons/GizmoBakedLightmap.svg
index 9568f7ff25..9568f7ff25 100644
--- a/editor/icons/icon_gizmo_baked_lightmap.svg
+++ b/editor/icons/GizmoBakedLightmap.svg
diff --git a/editor/icons/icon_gizmo_c_p_u_particles.svg b/editor/icons/GizmoCPUParticles.svg
index d4e86d9c42..d4e86d9c42 100644
--- a/editor/icons/icon_gizmo_c_p_u_particles.svg
+++ b/editor/icons/GizmoCPUParticles.svg
diff --git a/editor/icons/icon_gizmo_camera.svg b/editor/icons/GizmoCamera.svg
index f28efb813e..f28efb813e 100644
--- a/editor/icons/icon_gizmo_camera.svg
+++ b/editor/icons/GizmoCamera.svg
diff --git a/editor/icons/icon_gizmo_directional_light.svg b/editor/icons/GizmoDirectionalLight.svg
index dc2d6bf82d..dc2d6bf82d 100644
--- a/editor/icons/icon_gizmo_directional_light.svg
+++ b/editor/icons/GizmoDirectionalLight.svg
diff --git a/editor/icons/icon_gizmo_g_i_probe.svg b/editor/icons/GizmoGIProbe.svg
index c792dc5a28..c792dc5a28 100644
--- a/editor/icons/icon_gizmo_g_i_probe.svg
+++ b/editor/icons/GizmoGIProbe.svg
diff --git a/editor/icons/icon_gizmo_light.svg b/editor/icons/GizmoLight.svg
index 1e47082a0a..1e47082a0a 100644
--- a/editor/icons/icon_gizmo_light.svg
+++ b/editor/icons/GizmoLight.svg
diff --git a/editor/icons/icon_gizmo_listener.svg b/editor/icons/GizmoListener.svg
index 9e28c7730f..9e28c7730f 100644
--- a/editor/icons/icon_gizmo_listener.svg
+++ b/editor/icons/GizmoListener.svg
diff --git a/editor/icons/icon_gizmo_particles.svg b/editor/icons/GizmoParticles.svg
index 1c5d8c5f2d..1c5d8c5f2d 100644
--- a/editor/icons/icon_gizmo_particles.svg
+++ b/editor/icons/GizmoParticles.svg
diff --git a/editor/icons/icon_gizmo_reflection_probe.svg b/editor/icons/GizmoReflectionProbe.svg
index 82136821c7..82136821c7 100644
--- a/editor/icons/icon_gizmo_reflection_probe.svg
+++ b/editor/icons/GizmoReflectionProbe.svg
diff --git a/editor/icons/icon_gizmo_spatial_sample_player.svg b/editor/icons/GizmoSpatialSamplePlayer.svg
index ee471124dc..ee471124dc 100644
--- a/editor/icons/icon_gizmo_spatial_sample_player.svg
+++ b/editor/icons/GizmoSpatialSamplePlayer.svg
diff --git a/editor/icons/icon_gizmo_spot_light.svg b/editor/icons/GizmoSpotLight.svg
index 23a8364679..23a8364679 100644
--- a/editor/icons/icon_gizmo_spot_light.svg
+++ b/editor/icons/GizmoSpotLight.svg
diff --git a/editor/icons/icon_godot.svg b/editor/icons/Godot.svg
index 8ca9fdcabd..8ca9fdcabd 100644
--- a/editor/icons/icon_godot.svg
+++ b/editor/icons/Godot.svg
diff --git a/editor/icons/icon_gradient.svg b/editor/icons/Gradient.svg
index b67a9e6f8a..b67a9e6f8a 100644
--- a/editor/icons/icon_gradient.svg
+++ b/editor/icons/Gradient.svg
diff --git a/editor/icons/icon_gradient_texture.svg b/editor/icons/GradientTexture.svg
index 1388c141bd..1388c141bd 100644
--- a/editor/icons/icon_gradient_texture.svg
+++ b/editor/icons/GradientTexture.svg
diff --git a/editor/icons/icon_graph_edit.svg b/editor/icons/GraphEdit.svg
index 7ab7245260..7ab7245260 100644
--- a/editor/icons/icon_graph_edit.svg
+++ b/editor/icons/GraphEdit.svg
diff --git a/editor/icons/icon_graph_node.svg b/editor/icons/GraphNode.svg
index c8d4fda910..c8d4fda910 100644
--- a/editor/icons/icon_graph_node.svg
+++ b/editor/icons/GraphNode.svg
diff --git a/editor/icons/icon_grid.svg b/editor/icons/Grid.svg
index 869bc649fe..869bc649fe 100644
--- a/editor/icons/icon_grid.svg
+++ b/editor/icons/Grid.svg
diff --git a/editor/icons/icon_grid_container.svg b/editor/icons/GridContainer.svg
index 9fffd8b342..9fffd8b342 100644
--- a/editor/icons/icon_grid_container.svg
+++ b/editor/icons/GridContainer.svg
diff --git a/editor/icons/icon_groove_joint_2d.svg b/editor/icons/GrooveJoint2D.svg
index a2c7b741ad..a2c7b741ad 100644
--- a/editor/icons/icon_groove_joint_2d.svg
+++ b/editor/icons/GrooveJoint2D.svg
diff --git a/editor/icons/icon_group.svg b/editor/icons/Group.svg
index 7e0b2f3675..7e0b2f3675 100644
--- a/editor/icons/icon_group.svg
+++ b/editor/icons/Group.svg
diff --git a/editor/icons/icon_group_viewport.svg b/editor/icons/GroupViewport.svg
index 768c87e18d..768c87e18d 100644
--- a/editor/icons/icon_group_viewport.svg
+++ b/editor/icons/GroupViewport.svg
diff --git a/editor/icons/icon_groups.svg b/editor/icons/Groups.svg
index 5c8bd73f0f..5c8bd73f0f 100644
--- a/editor/icons/icon_groups.svg
+++ b/editor/icons/Groups.svg
diff --git a/editor/icons/icon_GUI_checked.svg b/editor/icons/GuiChecked.svg
index 8d00eca8d3..8d00eca8d3 100644
--- a/editor/icons/icon_GUI_checked.svg
+++ b/editor/icons/GuiChecked.svg
diff --git a/editor/icons/icon_gui_close.svg b/editor/icons/GuiClose.svg
index 3596061877..3596061877 100644
--- a/editor/icons/icon_gui_close.svg
+++ b/editor/icons/GuiClose.svg
diff --git a/editor/icons/icon_gui_close_customizable.svg b/editor/icons/GuiCloseCustomizable.svg
index 3596061877..3596061877 100644
--- a/editor/icons/icon_gui_close_customizable.svg
+++ b/editor/icons/GuiCloseCustomizable.svg
diff --git a/editor/icons/icon_GUI_dropdown.svg b/editor/icons/GuiDropdown.svg
index 3ed9466f4a..3ed9466f4a 100644
--- a/editor/icons/icon_GUI_dropdown.svg
+++ b/editor/icons/GuiDropdown.svg
diff --git a/editor/icons/icon_GUI_ellipsis.svg b/editor/icons/GuiEllipsis.svg
index 4d530d635e..4d530d635e 100644
--- a/editor/icons/icon_GUI_ellipsis.svg
+++ b/editor/icons/GuiEllipsis.svg
diff --git a/editor/icons/icon_gui_graph_node_port.svg b/editor/icons/GuiGraphNodePort.svg
index 2023a30ead..2023a30ead 100644
--- a/editor/icons/icon_gui_graph_node_port.svg
+++ b/editor/icons/GuiGraphNodePort.svg
diff --git a/editor/icons/icon_GUI_h_tick.svg b/editor/icons/GuiHTick.svg
index 01fecf5d12..01fecf5d12 100644
--- a/editor/icons/icon_GUI_h_tick.svg
+++ b/editor/icons/GuiHTick.svg
diff --git a/editor/icons/icon_GUI_hsplitter.svg b/editor/icons/GuiHsplitter.svg
index f94a81cb1e..f94a81cb1e 100644
--- a/editor/icons/icon_GUI_hsplitter.svg
+++ b/editor/icons/GuiHsplitter.svg
diff --git a/editor/icons/icon_GUI_mini_checkerboard.svg b/editor/icons/GuiMiniCheckerboard.svg
index dc6c7e37d1..dc6c7e37d1 100644
--- a/editor/icons/icon_GUI_mini_checkerboard.svg
+++ b/editor/icons/GuiMiniCheckerboard.svg
diff --git a/editor/icons/icon_GUI_option_arrow.svg b/editor/icons/GuiOptionArrow.svg
index 28435e08c3..28435e08c3 100644
--- a/editor/icons/icon_GUI_option_arrow.svg
+++ b/editor/icons/GuiOptionArrow.svg
diff --git a/editor/icons/icon_GUI_progress_bar.svg b/editor/icons/GuiProgressBar.svg
index a7a57adaa7..a7a57adaa7 100644
--- a/editor/icons/icon_GUI_progress_bar.svg
+++ b/editor/icons/GuiProgressBar.svg
diff --git a/editor/icons/icon_GUI_progress_fill.svg b/editor/icons/GuiProgressFill.svg
index a75bf93edd..a75bf93edd 100644
--- a/editor/icons/icon_GUI_progress_fill.svg
+++ b/editor/icons/GuiProgressFill.svg
diff --git a/editor/icons/icon_GUI_radio_checked.svg b/editor/icons/GuiRadioChecked.svg
index 447b57f8ae..447b57f8ae 100644
--- a/editor/icons/icon_GUI_radio_checked.svg
+++ b/editor/icons/GuiRadioChecked.svg
diff --git a/editor/icons/icon_GUI_radio_unchecked.svg b/editor/icons/GuiRadioUnchecked.svg
index 1e8117bd10..1e8117bd10 100644
--- a/editor/icons/icon_GUI_radio_unchecked.svg
+++ b/editor/icons/GuiRadioUnchecked.svg
diff --git a/editor/icons/icon_gui_resizer.svg b/editor/icons/GuiResizer.svg
index 545a1c9612..545a1c9612 100644
--- a/editor/icons/icon_gui_resizer.svg
+++ b/editor/icons/GuiResizer.svg
diff --git a/editor/icons/icon_GUI_scroll_arrow_left.svg b/editor/icons/GuiScrollArrowLeft.svg
index a118f04e17..a118f04e17 100644
--- a/editor/icons/icon_GUI_scroll_arrow_left.svg
+++ b/editor/icons/GuiScrollArrowLeft.svg
diff --git a/editor/icons/icon_GUI_scroll_arrow_left_hl.svg b/editor/icons/GuiScrollArrowLeftHl.svg
index 046356f18b..046356f18b 100644
--- a/editor/icons/icon_GUI_scroll_arrow_left_hl.svg
+++ b/editor/icons/GuiScrollArrowLeftHl.svg
diff --git a/editor/icons/icon_GUI_scroll_arrow_right.svg b/editor/icons/GuiScrollArrowRight.svg
index 4e0a8b5327..4e0a8b5327 100644
--- a/editor/icons/icon_GUI_scroll_arrow_right.svg
+++ b/editor/icons/GuiScrollArrowRight.svg
diff --git a/editor/icons/icon_GUI_scroll_arrow_right_hl.svg b/editor/icons/GuiScrollArrowRightHl.svg
index 4224ca8de4..4224ca8de4 100644
--- a/editor/icons/icon_GUI_scroll_arrow_right_hl.svg
+++ b/editor/icons/GuiScrollArrowRightHl.svg
diff --git a/editor/icons/icon_GUI_scroll_bg.svg b/editor/icons/GuiScrollBg.svg
index 263b42ea61..263b42ea61 100644
--- a/editor/icons/icon_GUI_scroll_bg.svg
+++ b/editor/icons/GuiScrollBg.svg
diff --git a/editor/icons/icon_GUI_scroll_grabber.svg b/editor/icons/GuiScrollGrabber.svg
index 9f6e9f2e25..9f6e9f2e25 100644
--- a/editor/icons/icon_GUI_scroll_grabber.svg
+++ b/editor/icons/GuiScrollGrabber.svg
diff --git a/editor/icons/icon_GUI_scroll_grabber_hl.svg b/editor/icons/GuiScrollGrabberHl.svg
index bf5bce6934..bf5bce6934 100644
--- a/editor/icons/icon_GUI_scroll_grabber_hl.svg
+++ b/editor/icons/GuiScrollGrabberHl.svg
diff --git a/editor/icons/icon_GUI_scroll_grabber_pressed.svg b/editor/icons/GuiScrollGrabberPressed.svg
index da26032474..da26032474 100644
--- a/editor/icons/icon_GUI_scroll_grabber_pressed.svg
+++ b/editor/icons/GuiScrollGrabberPressed.svg
diff --git a/editor/icons/icon_GUI_slider_grabber.svg b/editor/icons/GuiSliderGrabber.svg
index dd751ead80..dd751ead80 100644
--- a/editor/icons/icon_GUI_slider_grabber.svg
+++ b/editor/icons/GuiSliderGrabber.svg
diff --git a/editor/icons/icon_GUI_slider_grabber_hl.svg b/editor/icons/GuiSliderGrabberHl.svg
index 90d62934ec..90d62934ec 100644
--- a/editor/icons/icon_GUI_slider_grabber_hl.svg
+++ b/editor/icons/GuiSliderGrabberHl.svg
diff --git a/editor/icons/icon_GUI_space.svg b/editor/icons/GuiSpace.svg
index b43e97b6e1..b43e97b6e1 100644
--- a/editor/icons/icon_GUI_space.svg
+++ b/editor/icons/GuiSpace.svg
diff --git a/editor/icons/icon_GUI_spinbox_updown.svg b/editor/icons/GuiSpinboxUpdown.svg
index a6776728e3..a6776728e3 100644
--- a/editor/icons/icon_GUI_spinbox_updown.svg
+++ b/editor/icons/GuiSpinboxUpdown.svg
diff --git a/editor/icons/icon_GUI_tab.svg b/editor/icons/GuiTab.svg
index 8451ebe5c0..8451ebe5c0 100644
--- a/editor/icons/icon_GUI_tab.svg
+++ b/editor/icons/GuiTab.svg
diff --git a/editor/icons/icon_GUI_tab_menu.svg b/editor/icons/GuiTabMenu.svg
index 8bf5ef2f7d..8bf5ef2f7d 100644
--- a/editor/icons/icon_GUI_tab_menu.svg
+++ b/editor/icons/GuiTabMenu.svg
diff --git a/editor/icons/icon_GUI_tab_menu_hl.svg b/editor/icons/GuiTabMenuHl.svg
index 42d58a5abf..42d58a5abf 100644
--- a/editor/icons/icon_GUI_tab_menu_hl.svg
+++ b/editor/icons/GuiTabMenuHl.svg
diff --git a/editor/icons/icon_GUI_toggle_off.svg b/editor/icons/GuiToggleOff.svg
index 46f13d198d..46f13d198d 100644
--- a/editor/icons/icon_GUI_toggle_off.svg
+++ b/editor/icons/GuiToggleOff.svg
diff --git a/editor/icons/icon_GUI_toggle_on.svg b/editor/icons/GuiToggleOn.svg
index 0316680daa..0316680daa 100644
--- a/editor/icons/icon_GUI_toggle_on.svg
+++ b/editor/icons/GuiToggleOn.svg
diff --git a/editor/icons/icon_GUI_tree_arrow_down.svg b/editor/icons/GuiTreeArrowDown.svg
index fd2d900711..fd2d900711 100644
--- a/editor/icons/icon_GUI_tree_arrow_down.svg
+++ b/editor/icons/GuiTreeArrowDown.svg
diff --git a/editor/icons/icon_GUI_tree_arrow_right.svg b/editor/icons/GuiTreeArrowRight.svg
index e20c92e2e7..e20c92e2e7 100644
--- a/editor/icons/icon_GUI_tree_arrow_right.svg
+++ b/editor/icons/GuiTreeArrowRight.svg
diff --git a/editor/icons/icon_GUI_tree_arrow_up.svg b/editor/icons/GuiTreeArrowUp.svg
index 464363a8b1..464363a8b1 100644
--- a/editor/icons/icon_GUI_tree_arrow_up.svg
+++ b/editor/icons/GuiTreeArrowUp.svg
diff --git a/editor/icons/icon_GUI_tree_updown.svg b/editor/icons/GuiTreeUpdown.svg
index 66716845df..66716845df 100644
--- a/editor/icons/icon_GUI_tree_updown.svg
+++ b/editor/icons/GuiTreeUpdown.svg
diff --git a/editor/icons/icon_GUI_unchecked.svg b/editor/icons/GuiUnchecked.svg
index 9575422df3..9575422df3 100644
--- a/editor/icons/icon_GUI_unchecked.svg
+++ b/editor/icons/GuiUnchecked.svg
diff --git a/editor/icons/icon_GUI_v_tick.svg b/editor/icons/GuiVTick.svg
index 4205237952..4205237952 100644
--- a/editor/icons/icon_GUI_v_tick.svg
+++ b/editor/icons/GuiVTick.svg
diff --git a/editor/icons/icon_GUI_viewport_hdiagsplitter.svg b/editor/icons/GuiViewportHdiagsplitter.svg
index b1705582dc..b1705582dc 100644
--- a/editor/icons/icon_GUI_viewport_hdiagsplitter.svg
+++ b/editor/icons/GuiViewportHdiagsplitter.svg
diff --git a/editor/icons/icon_GUI_viewport_vdiagsplitter.svg b/editor/icons/GuiViewportVdiagsplitter.svg
index 0817529ff1..0817529ff1 100644
--- a/editor/icons/icon_GUI_viewport_vdiagsplitter.svg
+++ b/editor/icons/GuiViewportVdiagsplitter.svg
diff --git a/editor/icons/icon_GUI_viewport_vhsplitter.svg b/editor/icons/GuiViewportVhsplitter.svg
index a11fbd1b4c..a11fbd1b4c 100644
--- a/editor/icons/icon_GUI_viewport_vhsplitter.svg
+++ b/editor/icons/GuiViewportVhsplitter.svg
diff --git a/editor/icons/icon_GUI_visibility_hidden.svg b/editor/icons/GuiVisibilityHidden.svg
index 1d1e61d1bb..1d1e61d1bb 100644
--- a/editor/icons/icon_GUI_visibility_hidden.svg
+++ b/editor/icons/GuiVisibilityHidden.svg
diff --git a/editor/icons/icon_GUI_visibility_visible.svg b/editor/icons/GuiVisibilityVisible.svg
index 2e56f57ed8..2e56f57ed8 100644
--- a/editor/icons/icon_GUI_visibility_visible.svg
+++ b/editor/icons/GuiVisibilityVisible.svg
diff --git a/editor/icons/icon_GUI_visibility_xray.svg b/editor/icons/GuiVisibilityXray.svg
index 241ff3e7e5..241ff3e7e5 100644
--- a/editor/icons/icon_GUI_visibility_xray.svg
+++ b/editor/icons/GuiVisibilityXray.svg
diff --git a/editor/icons/icon_GUI_vsplit_bg.svg b/editor/icons/GuiVsplitBg.svg
index fa572c797e..fa572c797e 100644
--- a/editor/icons/icon_GUI_vsplit_bg.svg
+++ b/editor/icons/GuiVsplitBg.svg
diff --git a/editor/icons/icon_GUI_vsplitter.svg b/editor/icons/GuiVsplitter.svg
index 8629801713..8629801713 100644
--- a/editor/icons/icon_GUI_vsplitter.svg
+++ b/editor/icons/GuiVsplitter.svg
diff --git a/editor/icons/icon_h_box_container.svg b/editor/icons/HBoxContainer.svg
index 0ddbaf5a2e..0ddbaf5a2e 100644
--- a/editor/icons/icon_h_box_container.svg
+++ b/editor/icons/HBoxContainer.svg
diff --git a/editor/icons/icon_h_scroll_bar.svg b/editor/icons/HScrollBar.svg
index 039ebdf0c1..039ebdf0c1 100644
--- a/editor/icons/icon_h_scroll_bar.svg
+++ b/editor/icons/HScrollBar.svg
diff --git a/editor/icons/icon_h_separator.svg b/editor/icons/HSeparator.svg
index 762992acb8..762992acb8 100644
--- a/editor/icons/icon_h_separator.svg
+++ b/editor/icons/HSeparator.svg
diff --git a/editor/icons/icon_h_slider.svg b/editor/icons/HSlider.svg
index 20fbf0d00b..20fbf0d00b 100644
--- a/editor/icons/icon_h_slider.svg
+++ b/editor/icons/HSlider.svg
diff --git a/editor/icons/icon_h_split_container.svg b/editor/icons/HSplitContainer.svg
index ae7c05ee61..ae7c05ee61 100644
--- a/editor/icons/icon_h_split_container.svg
+++ b/editor/icons/HSplitContainer.svg
diff --git a/editor/icons/icon_h_t_t_p_request.svg b/editor/icons/HTTPRequest.svg
index c79af15a43..c79af15a43 100644
--- a/editor/icons/icon_h_t_t_p_request.svg
+++ b/editor/icons/HTTPRequest.svg
diff --git a/editor/icons/icon_headphones.svg b/editor/icons/Headphones.svg
index 82ef7acb29..82ef7acb29 100644
--- a/editor/icons/icon_headphones.svg
+++ b/editor/icons/Headphones.svg
diff --git a/editor/icons/icon_height_map_shape.svg b/editor/icons/HeightMapShape.svg
index 2e0bf53565..2e0bf53565 100644
--- a/editor/icons/icon_height_map_shape.svg
+++ b/editor/icons/HeightMapShape.svg
diff --git a/editor/icons/icon_help.svg b/editor/icons/Help.svg
index d993c95982..d993c95982 100644
--- a/editor/icons/icon_help.svg
+++ b/editor/icons/Help.svg
diff --git a/editor/icons/icon_help_search.svg b/editor/icons/HelpSearch.svg
index 4a82ba23c7..4a82ba23c7 100644
--- a/editor/icons/icon_help_search.svg
+++ b/editor/icons/HelpSearch.svg
diff --git a/editor/icons/icon_hinge_joint.svg b/editor/icons/HingeJoint.svg
index 21b3e29cb5..21b3e29cb5 100644
--- a/editor/icons/icon_hinge_joint.svg
+++ b/editor/icons/HingeJoint.svg
diff --git a/editor/icons/icon_history.svg b/editor/icons/History.svg
index 48eed7b0c8..48eed7b0c8 100644
--- a/editor/icons/icon_history.svg
+++ b/editor/icons/History.svg
diff --git a/editor/icons/icon_hsize.svg b/editor/icons/Hsize.svg
index 075bab1050..075bab1050 100644
--- a/editor/icons/icon_hsize.svg
+++ b/editor/icons/Hsize.svg
diff --git a/editor/icons/icon_image.svg b/editor/icons/Image.svg
index f3beda898e..f3beda898e 100644
--- a/editor/icons/icon_image.svg
+++ b/editor/icons/Image.svg
diff --git a/editor/icons/icon_image_texture.svg b/editor/icons/ImageTexture.svg
index 6e9905881b..6e9905881b 100644
--- a/editor/icons/icon_image_texture.svg
+++ b/editor/icons/ImageTexture.svg
diff --git a/editor/icons/icon_immediate_geometry.svg b/editor/icons/ImmediateGeometry.svg
index 5679d5906f..5679d5906f 100644
--- a/editor/icons/icon_immediate_geometry.svg
+++ b/editor/icons/ImmediateGeometry.svg
diff --git a/editor/icons/icon_import_check.svg b/editor/icons/ImportCheck.svg
index b2b967f37a..b2b967f37a 100644
--- a/editor/icons/icon_import_check.svg
+++ b/editor/icons/ImportCheck.svg
diff --git a/editor/icons/icon_import_fail.svg b/editor/icons/ImportFail.svg
index 6c81f88d9f..6c81f88d9f 100644
--- a/editor/icons/icon_import_fail.svg
+++ b/editor/icons/ImportFail.svg
diff --git a/editor/icons/icon_information_sign.svg b/editor/icons/InformationSign.svg
index a99be1b042..a99be1b042 100644
--- a/editor/icons/icon_information_sign.svg
+++ b/editor/icons/InformationSign.svg
diff --git a/editor/icons/icon_insert_after.svg b/editor/icons/InsertAfter.svg
index cab00048ac..cab00048ac 100644
--- a/editor/icons/icon_insert_after.svg
+++ b/editor/icons/InsertAfter.svg
diff --git a/editor/icons/icon_insert_before.svg b/editor/icons/InsertBefore.svg
index 366be3a1e6..366be3a1e6 100644
--- a/editor/icons/icon_insert_before.svg
+++ b/editor/icons/InsertBefore.svg
diff --git a/editor/icons/icon_instance.svg b/editor/icons/Instance.svg
index 8fc985bb51..8fc985bb51 100644
--- a/editor/icons/icon_instance.svg
+++ b/editor/icons/Instance.svg
diff --git a/editor/icons/icon_instance_options.svg b/editor/icons/InstanceOptions.svg
index ca9a5bcc87..ca9a5bcc87 100644
--- a/editor/icons/icon_instance_options.svg
+++ b/editor/icons/InstanceOptions.svg
diff --git a/editor/icons/icon_interp_cubic.svg b/editor/icons/InterpCubic.svg
index c2dd7db08c..c2dd7db08c 100644
--- a/editor/icons/icon_interp_cubic.svg
+++ b/editor/icons/InterpCubic.svg
diff --git a/editor/icons/icon_interp_linear.svg b/editor/icons/InterpLinear.svg
index 368be15315..368be15315 100644
--- a/editor/icons/icon_interp_linear.svg
+++ b/editor/icons/InterpLinear.svg
diff --git a/editor/icons/icon_interp_raw.svg b/editor/icons/InterpRaw.svg
index 1c6ae0062a..1c6ae0062a 100644
--- a/editor/icons/icon_interp_raw.svg
+++ b/editor/icons/InterpRaw.svg
diff --git a/editor/icons/icon_interp_wrap_clamp.svg b/editor/icons/InterpWrapClamp.svg
index 9634dc8a07..9634dc8a07 100644
--- a/editor/icons/icon_interp_wrap_clamp.svg
+++ b/editor/icons/InterpWrapClamp.svg
diff --git a/editor/icons/icon_interp_wrap_loop.svg b/editor/icons/InterpWrapLoop.svg
index 6fbb4356c8..6fbb4356c8 100644
--- a/editor/icons/icon_interp_wrap_loop.svg
+++ b/editor/icons/InterpWrapLoop.svg
diff --git a/editor/icons/icon_interpolated_camera.svg b/editor/icons/InterpolatedCamera.svg
index 4bc4ba1ee9..4bc4ba1ee9 100644
--- a/editor/icons/icon_interpolated_camera.svg
+++ b/editor/icons/InterpolatedCamera.svg
diff --git a/editor/icons/icon_inverse_kinematics.svg b/editor/icons/InverseKinematics.svg
index a98c989ccc..a98c989ccc 100644
--- a/editor/icons/icon_inverse_kinematics.svg
+++ b/editor/icons/InverseKinematics.svg
diff --git a/editor/icons/icon_issue.svg b/editor/icons/Issue.svg
index ddaaf41440..ddaaf41440 100644
--- a/editor/icons/icon_issue.svg
+++ b/editor/icons/Issue.svg
diff --git a/editor/icons/icon_item_list.svg b/editor/icons/ItemList.svg
index 311ed08a44..311ed08a44 100644
--- a/editor/icons/icon_item_list.svg
+++ b/editor/icons/ItemList.svg
diff --git a/editor/icons/icon_joy_axis.svg b/editor/icons/JoyAxis.svg
index cb7b5cdf8f..cb7b5cdf8f 100644
--- a/editor/icons/icon_joy_axis.svg
+++ b/editor/icons/JoyAxis.svg
diff --git a/editor/icons/icon_joy_button.svg b/editor/icons/JoyButton.svg
index 9f4fbfdf2d..9f4fbfdf2d 100644
--- a/editor/icons/icon_joy_button.svg
+++ b/editor/icons/JoyButton.svg
diff --git a/editor/icons/icon_joypad.svg b/editor/icons/Joypad.svg
index 8cb5de0c0e..8cb5de0c0e 100644
--- a/editor/icons/icon_joypad.svg
+++ b/editor/icons/Joypad.svg
diff --git a/editor/icons/icon_key.svg b/editor/icons/Key.svg
index d134735c53..d134735c53 100644
--- a/editor/icons/icon_key.svg
+++ b/editor/icons/Key.svg
diff --git a/editor/icons/icon_key_animation.svg b/editor/icons/KeyAnimation.svg
index 6db513ca26..6db513ca26 100644
--- a/editor/icons/icon_key_animation.svg
+++ b/editor/icons/KeyAnimation.svg
diff --git a/editor/icons/icon_key_audio.svg b/editor/icons/KeyAudio.svg
index 75576885ec..75576885ec 100644
--- a/editor/icons/icon_key_audio.svg
+++ b/editor/icons/KeyAudio.svg
diff --git a/editor/icons/icon_key_bezier.svg b/editor/icons/KeyBezier.svg
index dc5800fd5a..dc5800fd5a 100644
--- a/editor/icons/icon_key_bezier.svg
+++ b/editor/icons/KeyBezier.svg
diff --git a/editor/icons/icon_key_bezier_handle.svg b/editor/icons/KeyBezierHandle.svg
index 9f00f61304..9f00f61304 100644
--- a/editor/icons/icon_key_bezier_handle.svg
+++ b/editor/icons/KeyBezierHandle.svg
diff --git a/editor/icons/icon_key_bezier_point.svg b/editor/icons/KeyBezierPoint.svg
index 0edb55cda1..0edb55cda1 100644
--- a/editor/icons/icon_key_bezier_point.svg
+++ b/editor/icons/KeyBezierPoint.svg
diff --git a/editor/icons/icon_key_bezier_selected.svg b/editor/icons/KeyBezierSelected.svg
index 9e50e2bdf1..9e50e2bdf1 100644
--- a/editor/icons/icon_key_bezier_selected.svg
+++ b/editor/icons/KeyBezierSelected.svg
diff --git a/editor/icons/icon_key_call.svg b/editor/icons/KeyCall.svg
index 6cc442c391..6cc442c391 100644
--- a/editor/icons/icon_key_call.svg
+++ b/editor/icons/KeyCall.svg
diff --git a/editor/icons/icon_key_hover.svg b/editor/icons/KeyHover.svg
index 417621716b..417621716b 100644
--- a/editor/icons/icon_key_hover.svg
+++ b/editor/icons/KeyHover.svg
diff --git a/editor/icons/icon_key_invalid.svg b/editor/icons/KeyInvalid.svg
index 8ac9445b31..8ac9445b31 100644
--- a/editor/icons/icon_key_invalid.svg
+++ b/editor/icons/KeyInvalid.svg
diff --git a/editor/icons/icon_key_next.svg b/editor/icons/KeyNext.svg
index 2d064e7e86..2d064e7e86 100644
--- a/editor/icons/icon_key_next.svg
+++ b/editor/icons/KeyNext.svg
diff --git a/editor/icons/icon_key_position.svg b/editor/icons/KeyPosition.svg
index d152b76e8d..d152b76e8d 100644
--- a/editor/icons/icon_key_position.svg
+++ b/editor/icons/KeyPosition.svg
diff --git a/editor/icons/icon_key_rotation.svg b/editor/icons/KeyRotation.svg
index 0d3577eac4..0d3577eac4 100644
--- a/editor/icons/icon_key_rotation.svg
+++ b/editor/icons/KeyRotation.svg
diff --git a/editor/icons/icon_key_scale.svg b/editor/icons/KeyScale.svg
index a1214db62e..a1214db62e 100644
--- a/editor/icons/icon_key_scale.svg
+++ b/editor/icons/KeyScale.svg
diff --git a/editor/icons/icon_key_selected.svg b/editor/icons/KeySelected.svg
index 6594aec6ee..6594aec6ee 100644
--- a/editor/icons/icon_key_selected.svg
+++ b/editor/icons/KeySelected.svg
diff --git a/editor/icons/icon_key_value.svg b/editor/icons/KeyValue.svg
index 8a4787d6ed..8a4787d6ed 100644
--- a/editor/icons/icon_key_value.svg
+++ b/editor/icons/KeyValue.svg
diff --git a/editor/icons/icon_key_xform.svg b/editor/icons/KeyXform.svg
index 4a567075a7..4a567075a7 100644
--- a/editor/icons/icon_key_xform.svg
+++ b/editor/icons/KeyXform.svg
diff --git a/editor/icons/icon_keyboard.svg b/editor/icons/Keyboard.svg
index bd8736278d..bd8736278d 100644
--- a/editor/icons/icon_keyboard.svg
+++ b/editor/icons/Keyboard.svg
diff --git a/editor/icons/icon_kinematic_body.svg b/editor/icons/KinematicBody.svg
index 16078fbdec..16078fbdec 100644
--- a/editor/icons/icon_kinematic_body.svg
+++ b/editor/icons/KinematicBody.svg
diff --git a/editor/icons/icon_kinematic_body_2d.svg b/editor/icons/KinematicBody2D.svg
index be9dfa2d27..be9dfa2d27 100644
--- a/editor/icons/icon_kinematic_body_2d.svg
+++ b/editor/icons/KinematicBody2D.svg
diff --git a/editor/icons/icon_label.svg b/editor/icons/Label.svg
index 24de398501..24de398501 100644
--- a/editor/icons/icon_label.svg
+++ b/editor/icons/Label.svg
diff --git a/editor/icons/icon_large_texture.svg b/editor/icons/LargeTexture.svg
index 15920bf3d3..15920bf3d3 100644
--- a/editor/icons/icon_large_texture.svg
+++ b/editor/icons/LargeTexture.svg
diff --git a/editor/icons/icon_light_2d.svg b/editor/icons/Light2D.svg
index 87cfb29149..87cfb29149 100644
--- a/editor/icons/icon_light_2d.svg
+++ b/editor/icons/Light2D.svg
diff --git a/editor/icons/icon_light_occluder_2d.svg b/editor/icons/LightOccluder2D.svg
index 2905f9badd..2905f9badd 100644
--- a/editor/icons/icon_light_occluder_2d.svg
+++ b/editor/icons/LightOccluder2D.svg
diff --git a/editor/icons/icon_line_2d.svg b/editor/icons/Line2D.svg
index 9728262e50..9728262e50 100644
--- a/editor/icons/icon_line_2d.svg
+++ b/editor/icons/Line2D.svg
diff --git a/editor/icons/icon_line_edit.svg b/editor/icons/LineEdit.svg
index 4df7a3b248..4df7a3b248 100644
--- a/editor/icons/icon_line_edit.svg
+++ b/editor/icons/LineEdit.svg
diff --git a/editor/icons/icon_line_shape_2d.svg b/editor/icons/LineShape2D.svg
index 758c0fbef2..758c0fbef2 100644
--- a/editor/icons/icon_line_shape_2d.svg
+++ b/editor/icons/LineShape2D.svg
diff --git a/editor/icons/icon_link_button.svg b/editor/icons/LinkButton.svg
index bf7f7657eb..bf7f7657eb 100644
--- a/editor/icons/icon_link_button.svg
+++ b/editor/icons/LinkButton.svg
diff --git a/editor/icons/icon_list_select.svg b/editor/icons/ListSelect.svg
index 42feb1922b..42feb1922b 100644
--- a/editor/icons/icon_list_select.svg
+++ b/editor/icons/ListSelect.svg
diff --git a/editor/icons/icon_listener.svg b/editor/icons/Listener.svg
index 96eaeaffa9..96eaeaffa9 100644
--- a/editor/icons/icon_listener.svg
+++ b/editor/icons/Listener.svg
diff --git a/editor/icons/icon_load.svg b/editor/icons/Load.svg
index 7ee6ae2a2d..7ee6ae2a2d 100644
--- a/editor/icons/icon_load.svg
+++ b/editor/icons/Load.svg
diff --git a/editor/icons/icon_lock.svg b/editor/icons/Lock.svg
index 4136dad557..4136dad557 100644
--- a/editor/icons/icon_lock.svg
+++ b/editor/icons/Lock.svg
diff --git a/editor/icons/icon_lock_viewport.svg b/editor/icons/LockViewport.svg
index 99c066055d..99c066055d 100644
--- a/editor/icons/icon_lock_viewport.svg
+++ b/editor/icons/LockViewport.svg
diff --git a/editor/icons/icon_logo.svg b/editor/icons/Logo.svg
index f5379c48d4..f5379c48d4 100644
--- a/editor/icons/icon_logo.svg
+++ b/editor/icons/Logo.svg
diff --git a/editor/icons/icon_loop.svg b/editor/icons/Loop.svg
index bbb8dadc06..bbb8dadc06 100644
--- a/editor/icons/icon_loop.svg
+++ b/editor/icons/Loop.svg
diff --git a/editor/icons/icon_loop_interpolation.svg b/editor/icons/LoopInterpolation.svg
index 052a34ab36..052a34ab36 100644
--- a/editor/icons/icon_loop_interpolation.svg
+++ b/editor/icons/LoopInterpolation.svg
diff --git a/editor/icons/icon_main_play.svg b/editor/icons/MainPlay.svg
index 5fd62b9453..5fd62b9453 100644
--- a/editor/icons/icon_main_play.svg
+++ b/editor/icons/MainPlay.svg
diff --git a/editor/icons/icon_margin_container.svg b/editor/icons/MarginContainer.svg
index f11b415c06..f11b415c06 100644
--- a/editor/icons/icon_margin_container.svg
+++ b/editor/icons/MarginContainer.svg
diff --git a/editor/icons/icon_match_case.svg b/editor/icons/MatchCase.svg
index 1b348f3d46..1b348f3d46 100644
--- a/editor/icons/icon_match_case.svg
+++ b/editor/icons/MatchCase.svg
diff --git a/editor/icons/icon_material_preview_cube.svg b/editor/icons/MaterialPreviewCube.svg
index 7992ce05c1..7992ce05c1 100644
--- a/editor/icons/icon_material_preview_cube.svg
+++ b/editor/icons/MaterialPreviewCube.svg
diff --git a/editor/icons/icon_material_preview_cube_off.svg b/editor/icons/MaterialPreviewCubeOff.svg
index 6dfe169eae..6dfe169eae 100644
--- a/editor/icons/icon_material_preview_cube_off.svg
+++ b/editor/icons/MaterialPreviewCubeOff.svg
diff --git a/editor/icons/icon_material_preview_light_1.svg b/editor/icons/MaterialPreviewLight1.svg
index 3003793013..3003793013 100644
--- a/editor/icons/icon_material_preview_light_1.svg
+++ b/editor/icons/MaterialPreviewLight1.svg
diff --git a/editor/icons/icon_material_preview_light_1_off.svg b/editor/icons/MaterialPreviewLight1Off.svg
index 6948e3d77e..6948e3d77e 100644
--- a/editor/icons/icon_material_preview_light_1_off.svg
+++ b/editor/icons/MaterialPreviewLight1Off.svg
diff --git a/editor/icons/icon_material_preview_light_2.svg b/editor/icons/MaterialPreviewLight2.svg
index 08c05379e4..08c05379e4 100644
--- a/editor/icons/icon_material_preview_light_2.svg
+++ b/editor/icons/MaterialPreviewLight2.svg
diff --git a/editor/icons/icon_material_preview_light_2_off.svg b/editor/icons/MaterialPreviewLight2Off.svg
index cc48927ece..cc48927ece 100644
--- a/editor/icons/icon_material_preview_light_2_off.svg
+++ b/editor/icons/MaterialPreviewLight2Off.svg
diff --git a/editor/icons/icon_material_preview_sphere.svg b/editor/icons/MaterialPreviewSphere.svg
index 4f4ef67e20..4f4ef67e20 100644
--- a/editor/icons/icon_material_preview_sphere.svg
+++ b/editor/icons/MaterialPreviewSphere.svg
diff --git a/editor/icons/icon_material_preview_sphere_off.svg b/editor/icons/MaterialPreviewSphereOff.svg
index f702b4fd27..f702b4fd27 100644
--- a/editor/icons/icon_material_preview_sphere_off.svg
+++ b/editor/icons/MaterialPreviewSphereOff.svg
diff --git a/editor/icons/icon_member_constant.svg b/editor/icons/MemberConstant.svg
index ec82749cf4..ec82749cf4 100644
--- a/editor/icons/icon_member_constant.svg
+++ b/editor/icons/MemberConstant.svg
diff --git a/editor/icons/icon_member_method.svg b/editor/icons/MemberMethod.svg
index ea5c64482c..ea5c64482c 100644
--- a/editor/icons/icon_member_method.svg
+++ b/editor/icons/MemberMethod.svg
diff --git a/editor/icons/icon_member_property.svg b/editor/icons/MemberProperty.svg
index 4b6b7ab5df..4b6b7ab5df 100644
--- a/editor/icons/icon_member_property.svg
+++ b/editor/icons/MemberProperty.svg
diff --git a/editor/icons/icon_member_signal.svg b/editor/icons/MemberSignal.svg
index 5159e4acd7..5159e4acd7 100644
--- a/editor/icons/icon_member_signal.svg
+++ b/editor/icons/MemberSignal.svg
diff --git a/editor/icons/icon_member_theme.svg b/editor/icons/MemberTheme.svg
index 7aaaf2b808..7aaaf2b808 100644
--- a/editor/icons/icon_member_theme.svg
+++ b/editor/icons/MemberTheme.svg
diff --git a/editor/icons/icon_menu_button.svg b/editor/icons/MenuButton.svg
index 8c23927783..8c23927783 100644
--- a/editor/icons/icon_menu_button.svg
+++ b/editor/icons/MenuButton.svg
diff --git a/editor/icons/icon_mesh.svg b/editor/icons/Mesh.svg
index 0fb9e74584..0fb9e74584 100644
--- a/editor/icons/icon_mesh.svg
+++ b/editor/icons/Mesh.svg
diff --git a/editor/icons/icon_mesh_instance.svg b/editor/icons/MeshInstance.svg
index 68344b7dbd..68344b7dbd 100644
--- a/editor/icons/icon_mesh_instance.svg
+++ b/editor/icons/MeshInstance.svg
diff --git a/editor/icons/icon_mesh_instance_2d.svg b/editor/icons/MeshInstance2D.svg
index a173d02771..a173d02771 100644
--- a/editor/icons/icon_mesh_instance_2d.svg
+++ b/editor/icons/MeshInstance2D.svg
diff --git a/editor/icons/icon_mesh_library.svg b/editor/icons/MeshLibrary.svg
index 13ae8fece7..13ae8fece7 100644
--- a/editor/icons/icon_mesh_library.svg
+++ b/editor/icons/MeshLibrary.svg
diff --git a/editor/icons/icon_mesh_texture.svg b/editor/icons/MeshTexture.svg
index b3beff05c0..b3beff05c0 100644
--- a/editor/icons/icon_mesh_texture.svg
+++ b/editor/icons/MeshTexture.svg
diff --git a/editor/icons/icon_mini_object.svg b/editor/icons/MiniObject.svg
index 0b34a9fdbb..0b34a9fdbb 100644
--- a/editor/icons/icon_mini_object.svg
+++ b/editor/icons/MiniObject.svg
diff --git a/editor/icons/icon_mirror_x.svg b/editor/icons/MirrorX.svg
index 445a4e058d..445a4e058d 100644
--- a/editor/icons/icon_mirror_x.svg
+++ b/editor/icons/MirrorX.svg
diff --git a/editor/icons/icon_mirror_y.svg b/editor/icons/MirrorY.svg
index ebfcf8cabd..ebfcf8cabd 100644
--- a/editor/icons/icon_mirror_y.svg
+++ b/editor/icons/MirrorY.svg
diff --git a/editor/icons/icon_mouse.svg b/editor/icons/Mouse.svg
index 571288675a..571288675a 100644
--- a/editor/icons/icon_mouse.svg
+++ b/editor/icons/Mouse.svg
diff --git a/editor/icons/icon_move_down.svg b/editor/icons/MoveDown.svg
index ba0c5d80ba..ba0c5d80ba 100644
--- a/editor/icons/icon_move_down.svg
+++ b/editor/icons/MoveDown.svg
diff --git a/editor/icons/icon_move_left.svg b/editor/icons/MoveLeft.svg
index f4ad280ae1..f4ad280ae1 100644
--- a/editor/icons/icon_move_left.svg
+++ b/editor/icons/MoveLeft.svg
diff --git a/editor/icons/icon_move_point.svg b/editor/icons/MovePoint.svg
index a8c11e7cb3..a8c11e7cb3 100644
--- a/editor/icons/icon_move_point.svg
+++ b/editor/icons/MovePoint.svg
diff --git a/editor/icons/icon_move_right.svg b/editor/icons/MoveRight.svg
index 4d1c3b1145..4d1c3b1145 100644
--- a/editor/icons/icon_move_right.svg
+++ b/editor/icons/MoveRight.svg
diff --git a/editor/icons/icon_move_up.svg b/editor/icons/MoveUp.svg
index 87c7834597..87c7834597 100644
--- a/editor/icons/icon_move_up.svg
+++ b/editor/icons/MoveUp.svg
diff --git a/editor/icons/icon_multi_edit.svg b/editor/icons/MultiEdit.svg
index 9a5b3237b2..9a5b3237b2 100644
--- a/editor/icons/icon_multi_edit.svg
+++ b/editor/icons/MultiEdit.svg
diff --git a/editor/icons/icon_multi_line.svg b/editor/icons/MultiLine.svg
index dd79bb50d8..dd79bb50d8 100644
--- a/editor/icons/icon_multi_line.svg
+++ b/editor/icons/MultiLine.svg
diff --git a/editor/icons/icon_multi_mesh.svg b/editor/icons/MultiMesh.svg
index d317129ef4..d317129ef4 100644
--- a/editor/icons/icon_multi_mesh.svg
+++ b/editor/icons/MultiMesh.svg
diff --git a/editor/icons/icon_multi_mesh_instance.svg b/editor/icons/MultiMeshInstance.svg
index c114a725db..c114a725db 100644
--- a/editor/icons/icon_multi_mesh_instance.svg
+++ b/editor/icons/MultiMeshInstance.svg
diff --git a/editor/icons/icon_multi_mesh_instance_2d.svg b/editor/icons/MultiMeshInstance2D.svg
index 6c54a63ae2..6c54a63ae2 100644
--- a/editor/icons/icon_multi_mesh_instance_2d.svg
+++ b/editor/icons/MultiMeshInstance2D.svg
diff --git a/editor/icons/icon_navigation.svg b/editor/icons/Navigation.svg
index d5a8f8618b..d5a8f8618b 100644
--- a/editor/icons/icon_navigation.svg
+++ b/editor/icons/Navigation.svg
diff --git a/editor/icons/icon_navigation_2d.svg b/editor/icons/Navigation2D.svg
index 79dc532aee..79dc532aee 100644
--- a/editor/icons/icon_navigation_2d.svg
+++ b/editor/icons/Navigation2D.svg
diff --git a/editor/icons/icon_navigation_mesh.svg b/editor/icons/NavigationMesh.svg
index 9bc4a00d53..9bc4a00d53 100644
--- a/editor/icons/icon_navigation_mesh.svg
+++ b/editor/icons/NavigationMesh.svg
diff --git a/editor/icons/icon_navigation_mesh_instance.svg b/editor/icons/NavigationMeshInstance.svg
index 737d9c319d..737d9c319d 100644
--- a/editor/icons/icon_navigation_mesh_instance.svg
+++ b/editor/icons/NavigationMeshInstance.svg
diff --git a/editor/icons/icon_navigation_polygon.svg b/editor/icons/NavigationPolygon.svg
index df2ddb07f6..df2ddb07f6 100644
--- a/editor/icons/icon_navigation_polygon.svg
+++ b/editor/icons/NavigationPolygon.svg
diff --git a/editor/icons/icon_navigation_polygon_instance.svg b/editor/icons/NavigationPolygonInstance.svg
index e16d10614e..e16d10614e 100644
--- a/editor/icons/icon_navigation_polygon_instance.svg
+++ b/editor/icons/NavigationPolygonInstance.svg
diff --git a/editor/icons/icon_new.svg b/editor/icons/New.svg
index a3199e3fba..a3199e3fba 100644
--- a/editor/icons/icon_new.svg
+++ b/editor/icons/New.svg
diff --git a/editor/icons/icon_new_root.svg b/editor/icons/NewRoot.svg
index d32777d507..d32777d507 100644
--- a/editor/icons/icon_new_root.svg
+++ b/editor/icons/NewRoot.svg
diff --git a/editor/icons/icon_nil.svg b/editor/icons/Nil.svg
index 04a29abaaa..04a29abaaa 100644
--- a/editor/icons/icon_nil.svg
+++ b/editor/icons/Nil.svg
diff --git a/editor/icons/icon_nine_patch_rect.svg b/editor/icons/NinePatchRect.svg
index c5b04ec049..c5b04ec049 100644
--- a/editor/icons/icon_nine_patch_rect.svg
+++ b/editor/icons/NinePatchRect.svg
diff --git a/editor/icons/icon_node.svg b/editor/icons/Node.svg
index 93f0ce80b1..93f0ce80b1 100644
--- a/editor/icons/icon_node.svg
+++ b/editor/icons/Node.svg
diff --git a/editor/icons/icon_node_2d.svg b/editor/icons/Node2D.svg
index 5ca5754daa..5ca5754daa 100644
--- a/editor/icons/icon_node_2d.svg
+++ b/editor/icons/Node2D.svg
diff --git a/editor/icons/icon_node_path.svg b/editor/icons/NodePath.svg
index 580283b75a..580283b75a 100644
--- a/editor/icons/icon_node_path.svg
+++ b/editor/icons/NodePath.svg
diff --git a/editor/icons/icon_node_warning.svg b/editor/icons/NodeWarning.svg
index 587a49412e..587a49412e 100644
--- a/editor/icons/icon_node_warning.svg
+++ b/editor/icons/NodeWarning.svg
diff --git a/editor/icons/icon_non_favorite.svg b/editor/icons/NonFavorite.svg
index eb0ebf052c..eb0ebf052c 100644
--- a/editor/icons/icon_non_favorite.svg
+++ b/editor/icons/NonFavorite.svg
diff --git a/editor/icons/icon_o_r_m_material_3d.svg b/editor/icons/ORMMaterial3D.svg
index 3dd6013436..3dd6013436 100644
--- a/editor/icons/icon_o_r_m_material_3d.svg
+++ b/editor/icons/ORMMaterial3D.svg
diff --git a/editor/icons/icon_object.svg b/editor/icons/Object.svg
index c3d1b47538..c3d1b47538 100644
--- a/editor/icons/icon_object.svg
+++ b/editor/icons/Object.svg
diff --git a/editor/icons/icon_occluder_polygon_2d.svg b/editor/icons/OccluderPolygon2D.svg
index 19244f35ca..19244f35ca 100644
--- a/editor/icons/icon_occluder_polygon_2d.svg
+++ b/editor/icons/OccluderPolygon2D.svg
diff --git a/editor/icons/icon_omni_light.svg b/editor/icons/OmniLight.svg
index 6fa0454e8c..6fa0454e8c 100644
--- a/editor/icons/icon_omni_light.svg
+++ b/editor/icons/OmniLight.svg
diff --git a/editor/icons/icon_onion.svg b/editor/icons/Onion.svg
index ff1376c316..ff1376c316 100644
--- a/editor/icons/icon_onion.svg
+++ b/editor/icons/Onion.svg
diff --git a/editor/icons/icon_option_button.svg b/editor/icons/OptionButton.svg
index 6b4402481d..6b4402481d 100644
--- a/editor/icons/icon_option_button.svg
+++ b/editor/icons/OptionButton.svg
diff --git a/editor/icons/icon_overbright_indicator.svg b/editor/icons/OverbrightIndicator.svg
index 9e6f53b727..9e6f53b727 100644
--- a/editor/icons/icon_overbright_indicator.svg
+++ b/editor/icons/OverbrightIndicator.svg
diff --git a/editor/icons/icon_override.svg b/editor/icons/Override.svg
index 2d8a1fb309..2d8a1fb309 100644
--- a/editor/icons/icon_override.svg
+++ b/editor/icons/Override.svg
diff --git a/editor/icons/icon_packed_byte_array.svg b/editor/icons/PackedByteArray.svg
index 5409a47bc4..5409a47bc4 100644
--- a/editor/icons/icon_packed_byte_array.svg
+++ b/editor/icons/PackedByteArray.svg
diff --git a/editor/icons/icon_packed_color_array.svg b/editor/icons/PackedColorArray.svg
index 7a312d0e91..7a312d0e91 100644
--- a/editor/icons/icon_packed_color_array.svg
+++ b/editor/icons/PackedColorArray.svg
diff --git a/editor/icons/icon_packed_data_container.svg b/editor/icons/PackedDataContainer.svg
index 18bad53f66..18bad53f66 100644
--- a/editor/icons/icon_packed_data_container.svg
+++ b/editor/icons/PackedDataContainer.svg
diff --git a/editor/icons/icon_packed_real_array.svg b/editor/icons/PackedFloat32Array.svg
index 734f40cd05..734f40cd05 100644
--- a/editor/icons/icon_packed_real_array.svg
+++ b/editor/icons/PackedFloat32Array.svg
diff --git a/editor/icons/PackedFloat64Array.svg b/editor/icons/PackedFloat64Array.svg
new file mode 100644
index 0000000000..734f40cd05
--- /dev/null
+++ b/editor/icons/PackedFloat64Array.svg
@@ -0,0 +1 @@
+<svg height="12" viewBox="0 0 16 12" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m0 0v12h4v-2h-2v-8h2v-2zm12 0v2h2v8h-2v2h4v-12z" fill="#e0e0e0"/><path d="m6 2a3 3 0 0 0 -3 3v5h2v-2h1v-2h-1v-1a1 1 0 0 1 1-1zm1 0v5a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1-1v-5zm3 0v5a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1-1v-1h1v-2h-1v-2z" fill="#61daf4"/><path d="m7 2v5a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1-1v-5z" fill="#fff" fill-opacity=".39216"/></svg> \ No newline at end of file
diff --git a/editor/icons/icon_packed_int_array.svg b/editor/icons/PackedInt32Array.svg
index a664b2d5fd..a664b2d5fd 100644
--- a/editor/icons/icon_packed_int_array.svg
+++ b/editor/icons/PackedInt32Array.svg
diff --git a/editor/icons/PackedInt64Array.svg b/editor/icons/PackedInt64Array.svg
new file mode 100644
index 0000000000..a664b2d5fd
--- /dev/null
+++ b/editor/icons/PackedInt64Array.svg
@@ -0,0 +1 @@
+<svg height="12" viewBox="0 0 16 12" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m0 0v12h4v-2h-2v-8h2v-2zm12 0v2h2v8h-2v2h4v-12z" fill="#e0e0e0"/><path d="m3 2v2h2v-2zm2 2v2h-2v4h4v-4a1 1 0 0 1 1 1v3h2v-3a3 3 0 0 0 -3-3zm5 3a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1-1v-1h1v-2h-1v-2h-2z" fill="#7dc6ef"/><path d="m5 4v6h2v-4a1 1 0 0 1 1 1v3h2v-3a3 3 0 0 0 -3-3z" fill="#fff" fill-opacity=".39216"/></svg> \ No newline at end of file
diff --git a/editor/icons/icon_packed_scene.svg b/editor/icons/PackedScene.svg
index 9c1d88db1c..9c1d88db1c 100644
--- a/editor/icons/icon_packed_scene.svg
+++ b/editor/icons/PackedScene.svg
diff --git a/editor/icons/icon_packed_string_array.svg b/editor/icons/PackedStringArray.svg
index 7e66f5f5e5..7e66f5f5e5 100644
--- a/editor/icons/icon_packed_string_array.svg
+++ b/editor/icons/PackedStringArray.svg
diff --git a/editor/icons/icon_packed_vector2_array.svg b/editor/icons/PackedVector2Array.svg
index 170512eb39..170512eb39 100644
--- a/editor/icons/icon_packed_vector2_array.svg
+++ b/editor/icons/PackedVector2Array.svg
diff --git a/editor/icons/icon_packed_vector3_array.svg b/editor/icons/PackedVector3Array.svg
index cd3578182f..cd3578182f 100644
--- a/editor/icons/icon_packed_vector3_array.svg
+++ b/editor/icons/PackedVector3Array.svg
diff --git a/editor/icons/icon_paint_vertex.svg b/editor/icons/PaintVertex.svg
index cab3716bf5..cab3716bf5 100644
--- a/editor/icons/icon_paint_vertex.svg
+++ b/editor/icons/PaintVertex.svg
diff --git a/editor/icons/icon_panel.svg b/editor/icons/Panel.svg
index 10a67bae7e..10a67bae7e 100644
--- a/editor/icons/icon_panel.svg
+++ b/editor/icons/Panel.svg
diff --git a/editor/icons/icon_panel_container.svg b/editor/icons/PanelContainer.svg
index 08c5492f7e..08c5492f7e 100644
--- a/editor/icons/icon_panel_container.svg
+++ b/editor/icons/PanelContainer.svg
diff --git a/editor/icons/icon_panels_1.svg b/editor/icons/Panels1.svg
index 850aad2cff..850aad2cff 100644
--- a/editor/icons/icon_panels_1.svg
+++ b/editor/icons/Panels1.svg
diff --git a/editor/icons/icon_panels_2.svg b/editor/icons/Panels2.svg
index 5f3fc6cf48..5f3fc6cf48 100644
--- a/editor/icons/icon_panels_2.svg
+++ b/editor/icons/Panels2.svg
diff --git a/editor/icons/icon_panels_2_alt.svg b/editor/icons/Panels2Alt.svg
index edee3a660f..edee3a660f 100644
--- a/editor/icons/icon_panels_2_alt.svg
+++ b/editor/icons/Panels2Alt.svg
diff --git a/editor/icons/icon_panels_3.svg b/editor/icons/Panels3.svg
index 3ddcb5e2ef..3ddcb5e2ef 100644
--- a/editor/icons/icon_panels_3.svg
+++ b/editor/icons/Panels3.svg
diff --git a/editor/icons/icon_panels_3_alt.svg b/editor/icons/Panels3Alt.svg
index 0f36a24da8..0f36a24da8 100644
--- a/editor/icons/icon_panels_3_alt.svg
+++ b/editor/icons/Panels3Alt.svg
diff --git a/editor/icons/icon_panels_4.svg b/editor/icons/Panels4.svg
index 7b2189087f..7b2189087f 100644
--- a/editor/icons/icon_panels_4.svg
+++ b/editor/icons/Panels4.svg
diff --git a/editor/icons/icon_panorama_sky.svg b/editor/icons/PanoramaSky.svg
index bfff6840bd..bfff6840bd 100644
--- a/editor/icons/icon_panorama_sky.svg
+++ b/editor/icons/PanoramaSky.svg
diff --git a/editor/icons/icon_parallax_background.svg b/editor/icons/ParallaxBackground.svg
index 09e6a7d19d..09e6a7d19d 100644
--- a/editor/icons/icon_parallax_background.svg
+++ b/editor/icons/ParallaxBackground.svg
diff --git a/editor/icons/icon_parallax_layer.svg b/editor/icons/ParallaxLayer.svg
index d8a5ef5e1f..d8a5ef5e1f 100644
--- a/editor/icons/icon_parallax_layer.svg
+++ b/editor/icons/ParallaxLayer.svg
diff --git a/editor/icons/icon_particles.svg b/editor/icons/Particles.svg
index f1378e3f8c..f1378e3f8c 100644
--- a/editor/icons/icon_particles.svg
+++ b/editor/icons/Particles.svg
diff --git a/editor/icons/icon_particles_2d.svg b/editor/icons/Particles2D.svg
index 7151194e36..7151194e36 100644
--- a/editor/icons/icon_particles_2d.svg
+++ b/editor/icons/Particles2D.svg
diff --git a/editor/icons/icon_particles_material.svg b/editor/icons/ParticlesMaterial.svg
index af45f9888a..af45f9888a 100644
--- a/editor/icons/icon_particles_material.svg
+++ b/editor/icons/ParticlesMaterial.svg
diff --git a/editor/icons/icon_path.svg b/editor/icons/Path.svg
index cde9a06903..cde9a06903 100644
--- a/editor/icons/icon_path.svg
+++ b/editor/icons/Path.svg
diff --git a/editor/icons/icon_path_2d.svg b/editor/icons/Path2D.svg
index 8aa0453b88..8aa0453b88 100644
--- a/editor/icons/icon_path_2d.svg
+++ b/editor/icons/Path2D.svg
diff --git a/editor/icons/icon_path_follow.svg b/editor/icons/PathFollow.svg
index 8e904ab5a5..8e904ab5a5 100644
--- a/editor/icons/icon_path_follow.svg
+++ b/editor/icons/PathFollow.svg
diff --git a/editor/icons/icon_path_follow_2d.svg b/editor/icons/PathFollow2D.svg
index 20a32f2d83..20a32f2d83 100644
--- a/editor/icons/icon_path_follow_2d.svg
+++ b/editor/icons/PathFollow2D.svg
diff --git a/editor/icons/icon_pause.svg b/editor/icons/Pause.svg
index 14c9971383..14c9971383 100644
--- a/editor/icons/icon_pause.svg
+++ b/editor/icons/Pause.svg
diff --git a/editor/icons/icon_physical_bone.svg b/editor/icons/PhysicalBone.svg
index 0a34eb6e48..0a34eb6e48 100644
--- a/editor/icons/icon_physical_bone.svg
+++ b/editor/icons/PhysicalBone.svg
diff --git a/editor/icons/icon_pin.svg b/editor/icons/Pin.svg
index 85cd815b64..85cd815b64 100644
--- a/editor/icons/icon_pin.svg
+++ b/editor/icons/Pin.svg
diff --git a/editor/icons/icon_pin_joint.svg b/editor/icons/PinJoint.svg
index 147553d316..147553d316 100644
--- a/editor/icons/icon_pin_joint.svg
+++ b/editor/icons/PinJoint.svg
diff --git a/editor/icons/icon_pin_joint_2d.svg b/editor/icons/PinJoint2D.svg
index f1dcafb923..f1dcafb923 100644
--- a/editor/icons/icon_pin_joint_2d.svg
+++ b/editor/icons/PinJoint2D.svg
diff --git a/editor/icons/icon_pin_pressed.svg b/editor/icons/PinPressed.svg
index 85cd815b64..85cd815b64 100644
--- a/editor/icons/icon_pin_pressed.svg
+++ b/editor/icons/PinPressed.svg
diff --git a/editor/icons/icon_plane.svg b/editor/icons/Plane.svg
index 3a943af0b3..3a943af0b3 100644
--- a/editor/icons/icon_plane.svg
+++ b/editor/icons/Plane.svg
diff --git a/editor/icons/icon_plane_mesh.svg b/editor/icons/PlaneMesh.svg
index ddcc623c67..ddcc623c67 100644
--- a/editor/icons/icon_plane_mesh.svg
+++ b/editor/icons/PlaneMesh.svg
diff --git a/editor/icons/icon_plane_shape.svg b/editor/icons/PlaneShape.svg
index 2c90cf6d53..2c90cf6d53 100644
--- a/editor/icons/icon_plane_shape.svg
+++ b/editor/icons/PlaneShape.svg
diff --git a/editor/icons/icon_play.svg b/editor/icons/Play.svg
index 4c16215a68..4c16215a68 100644
--- a/editor/icons/icon_play.svg
+++ b/editor/icons/Play.svg
diff --git a/editor/icons/icon_play_backwards.svg b/editor/icons/PlayBackwards.svg
index c98f15ea50..c98f15ea50 100644
--- a/editor/icons/icon_play_backwards.svg
+++ b/editor/icons/PlayBackwards.svg
diff --git a/editor/icons/icon_play_custom.svg b/editor/icons/PlayCustom.svg
index e19a8e7028..e19a8e7028 100644
--- a/editor/icons/icon_play_custom.svg
+++ b/editor/icons/PlayCustom.svg
diff --git a/editor/icons/icon_play_overlay.svg b/editor/icons/PlayOverlay.svg
index 1fb2da6596..1fb2da6596 100644
--- a/editor/icons/icon_play_overlay.svg
+++ b/editor/icons/PlayOverlay.svg
diff --git a/editor/icons/icon_play_scene.svg b/editor/icons/PlayScene.svg
index 5e5097fd66..5e5097fd66 100644
--- a/editor/icons/icon_play_scene.svg
+++ b/editor/icons/PlayScene.svg
diff --git a/editor/icons/icon_play_start.svg b/editor/icons/PlayStart.svg
index 2ade7371e0..2ade7371e0 100644
--- a/editor/icons/icon_play_start.svg
+++ b/editor/icons/PlayStart.svg
diff --git a/editor/icons/icon_play_start_backwards.svg b/editor/icons/PlayStartBackwards.svg
index 195f9a646e..195f9a646e 100644
--- a/editor/icons/icon_play_start_backwards.svg
+++ b/editor/icons/PlayStartBackwards.svg
diff --git a/editor/icons/icon_play_travel.svg b/editor/icons/PlayTravel.svg
index d772476e15..d772476e15 100644
--- a/editor/icons/icon_play_travel.svg
+++ b/editor/icons/PlayTravel.svg
diff --git a/editor/icons/icon_plugin_script.svg b/editor/icons/PluginScript.svg
index 0d080c132e..0d080c132e 100644
--- a/editor/icons/icon_plugin_script.svg
+++ b/editor/icons/PluginScript.svg
diff --git a/editor/icons/icon_point_mesh.svg b/editor/icons/PointMesh.svg
index 0504b7ff01..0504b7ff01 100644
--- a/editor/icons/icon_point_mesh.svg
+++ b/editor/icons/PointMesh.svg
diff --git a/editor/icons/icon_polygon_2_d.svg b/editor/icons/Polygon2D.svg
index 485109072e..485109072e 100644
--- a/editor/icons/icon_polygon_2_d.svg
+++ b/editor/icons/Polygon2D.svg
diff --git a/editor/icons/icon_polygon_path_finder.svg b/editor/icons/PolygonPathFinder.svg
index b41067d08a..b41067d08a 100644
--- a/editor/icons/icon_polygon_path_finder.svg
+++ b/editor/icons/PolygonPathFinder.svg
diff --git a/editor/icons/icon_popup.svg b/editor/icons/Popup.svg
index 93f7e5000d..93f7e5000d 100644
--- a/editor/icons/icon_popup.svg
+++ b/editor/icons/Popup.svg
diff --git a/editor/icons/icon_popup_dialog.svg b/editor/icons/PopupDialog.svg
index d871e56a63..d871e56a63 100644
--- a/editor/icons/icon_popup_dialog.svg
+++ b/editor/icons/PopupDialog.svg
diff --git a/editor/icons/icon_popup_menu.svg b/editor/icons/PopupMenu.svg
index dd7b2bb0fd..dd7b2bb0fd 100644
--- a/editor/icons/icon_popup_menu.svg
+++ b/editor/icons/PopupMenu.svg
diff --git a/editor/icons/icon_popup_panel.svg b/editor/icons/PopupPanel.svg
index 47a5448f5b..47a5448f5b 100644
--- a/editor/icons/icon_popup_panel.svg
+++ b/editor/icons/PopupPanel.svg
diff --git a/editor/icons/icon_portal.svg b/editor/icons/Portal.svg
index 99d626e2f4..99d626e2f4 100644
--- a/editor/icons/icon_portal.svg
+++ b/editor/icons/Portal.svg
diff --git a/editor/icons/icon_position_2d.svg b/editor/icons/Position2D.svg
index 22d4ab05ca..22d4ab05ca 100644
--- a/editor/icons/icon_position_2d.svg
+++ b/editor/icons/Position2D.svg
diff --git a/editor/icons/icon_position_3d.svg b/editor/icons/Position3D.svg
index 0401942d69..0401942d69 100644
--- a/editor/icons/icon_position_3d.svg
+++ b/editor/icons/Position3D.svg
diff --git a/editor/icons/icon_prism_mesh.svg b/editor/icons/PrismMesh.svg
index c391652add..c391652add 100644
--- a/editor/icons/icon_prism_mesh.svg
+++ b/editor/icons/PrismMesh.svg
diff --git a/editor/icons/icon_procedural_sky.svg b/editor/icons/ProceduralSky.svg
index 356a966fe9..356a966fe9 100644
--- a/editor/icons/icon_procedural_sky.svg
+++ b/editor/icons/ProceduralSky.svg
diff --git a/editor/icons/icon_progress_1.svg b/editor/icons/Progress1.svg
index 01c2f8f334..01c2f8f334 100644
--- a/editor/icons/icon_progress_1.svg
+++ b/editor/icons/Progress1.svg
diff --git a/editor/icons/icon_progress_2.svg b/editor/icons/Progress2.svg
index a18ceb0381..a18ceb0381 100644
--- a/editor/icons/icon_progress_2.svg
+++ b/editor/icons/Progress2.svg
diff --git a/editor/icons/icon_progress_3.svg b/editor/icons/Progress3.svg
index 55b01dad83..55b01dad83 100644
--- a/editor/icons/icon_progress_3.svg
+++ b/editor/icons/Progress3.svg
diff --git a/editor/icons/icon_progress_4.svg b/editor/icons/Progress4.svg
index a038bbec70..a038bbec70 100644
--- a/editor/icons/icon_progress_4.svg
+++ b/editor/icons/Progress4.svg
diff --git a/editor/icons/icon_progress_5.svg b/editor/icons/Progress5.svg
index 64144978af..64144978af 100644
--- a/editor/icons/icon_progress_5.svg
+++ b/editor/icons/Progress5.svg
diff --git a/editor/icons/icon_progress_6.svg b/editor/icons/Progress6.svg
index 83b1806263..83b1806263 100644
--- a/editor/icons/icon_progress_6.svg
+++ b/editor/icons/Progress6.svg
diff --git a/editor/icons/icon_progress_7.svg b/editor/icons/Progress7.svg
index 77d4321a14..77d4321a14 100644
--- a/editor/icons/icon_progress_7.svg
+++ b/editor/icons/Progress7.svg
diff --git a/editor/icons/icon_progress_8.svg b/editor/icons/Progress8.svg
index ee76ba4499..ee76ba4499 100644
--- a/editor/icons/icon_progress_8.svg
+++ b/editor/icons/Progress8.svg
diff --git a/editor/icons/icon_progress_bar.svg b/editor/icons/ProgressBar.svg
index 70f99e3bbb..70f99e3bbb 100644
--- a/editor/icons/icon_progress_bar.svg
+++ b/editor/icons/ProgressBar.svg
diff --git a/editor/icons/icon_project_icon_loading.svg b/editor/icons/ProjectIconLoading.svg
index 3802b67654..3802b67654 100644
--- a/editor/icons/icon_project_icon_loading.svg
+++ b/editor/icons/ProjectIconLoading.svg
diff --git a/editor/icons/icon_proximity_group.svg b/editor/icons/ProximityGroup.svg
index 7df1cc9093..7df1cc9093 100644
--- a/editor/icons/icon_proximity_group.svg
+++ b/editor/icons/ProximityGroup.svg
diff --git a/editor/icons/icon_proxy_texture.svg b/editor/icons/ProxyTexture.svg
index 0c19363cb4..0c19363cb4 100644
--- a/editor/icons/icon_proxy_texture.svg
+++ b/editor/icons/ProxyTexture.svg
diff --git a/editor/icons/icon_quad.svg b/editor/icons/Quad.svg
index 4657e0b0bd..4657e0b0bd 100644
--- a/editor/icons/icon_quad.svg
+++ b/editor/icons/Quad.svg
diff --git a/editor/icons/icon_quad_mesh.svg b/editor/icons/QuadMesh.svg
index de0bd3e127..de0bd3e127 100644
--- a/editor/icons/icon_quad_mesh.svg
+++ b/editor/icons/QuadMesh.svg
diff --git a/editor/icons/icon_quat.svg b/editor/icons/Quat.svg
index 8702a3041a..8702a3041a 100644
--- a/editor/icons/icon_quat.svg
+++ b/editor/icons/Quat.svg
diff --git a/editor/icons/icon_r_i_d.svg b/editor/icons/RID.svg
index a6ace54d12..a6ace54d12 100644
--- a/editor/icons/icon_r_i_d.svg
+++ b/editor/icons/RID.svg
diff --git a/editor/icons/icon_ray_cast.svg b/editor/icons/RayCast.svg
index e782b27e9f..e782b27e9f 100644
--- a/editor/icons/icon_ray_cast.svg
+++ b/editor/icons/RayCast.svg
diff --git a/editor/icons/icon_ray_cast_2d.svg b/editor/icons/RayCast2D.svg
index 02faaa51c9..02faaa51c9 100644
--- a/editor/icons/icon_ray_cast_2d.svg
+++ b/editor/icons/RayCast2D.svg
diff --git a/editor/icons/icon_ray_shape.svg b/editor/icons/RayShape.svg
index 37c2206740..37c2206740 100644
--- a/editor/icons/icon_ray_shape.svg
+++ b/editor/icons/RayShape.svg
diff --git a/editor/icons/icon_ray_shape_2d.svg b/editor/icons/RayShape2D.svg
index 109c254fc3..109c254fc3 100644
--- a/editor/icons/icon_ray_shape_2d.svg
+++ b/editor/icons/RayShape2D.svg
diff --git a/editor/icons/icon_rayito.svg b/editor/icons/Rayito.svg
index 4fd6a2827b..4fd6a2827b 100644
--- a/editor/icons/icon_rayito.svg
+++ b/editor/icons/Rayito.svg
diff --git a/editor/icons/icon_rect2.svg b/editor/icons/Rect2.svg
index 25feb52cab..25feb52cab 100644
--- a/editor/icons/icon_rect2.svg
+++ b/editor/icons/Rect2.svg
diff --git a/editor/icons/Rect2i.svg b/editor/icons/Rect2i.svg
new file mode 100644
index 0000000000..d28c098ed6
--- /dev/null
+++ b/editor/icons/Rect2i.svg
@@ -0,0 +1,4 @@
+<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
+<path d="m9 2v2h-1c-1.7267 0-3 1.3359-3 3 0 1.6569 1.3431 3 3 3h1v-2h-1c-0.55228 0-1-0.44772-1-1s0.44772-1 1-1h1v1c0 1.6569 1.3431 3 3 3v-2c-0.55228 0-0.93526-0.45152-1-1v-1h1v-2h-1v-2zm-5 2c-1.6569 0-2.9547 1.3438-3 3v3h2v-3c0-0.55228 0.44772-1 1-1h1v-2z" fill="#f191a5"/>
+<path d="m13 2v2h2v-2zm0 4v4h2v-4z" fill="#7dc6ef"/>
+</svg>
diff --git a/editor/icons/icon_rectangle_shape_2d.svg b/editor/icons/RectangleShape2D.svg
index 437547ece3..437547ece3 100644
--- a/editor/icons/icon_rectangle_shape_2d.svg
+++ b/editor/icons/RectangleShape2D.svg
diff --git a/editor/icons/icon_reference_rect.svg b/editor/icons/ReferenceRect.svg
index 2fd530d584..2fd530d584 100644
--- a/editor/icons/icon_reference_rect.svg
+++ b/editor/icons/ReferenceRect.svg
diff --git a/editor/icons/icon_reflection_probe.svg b/editor/icons/ReflectionProbe.svg
index 6bf9cc9013..6bf9cc9013 100644
--- a/editor/icons/icon_reflection_probe.svg
+++ b/editor/icons/ReflectionProbe.svg
diff --git a/editor/icons/icon_region_edit.svg b/editor/icons/RegionEdit.svg
index 8443c0e454..8443c0e454 100644
--- a/editor/icons/icon_region_edit.svg
+++ b/editor/icons/RegionEdit.svg
diff --git a/editor/icons/icon_reload.svg b/editor/icons/Reload.svg
index 223a725332..223a725332 100644
--- a/editor/icons/icon_reload.svg
+++ b/editor/icons/Reload.svg
diff --git a/editor/icons/icon_reload_small.svg b/editor/icons/ReloadSmall.svg
index ce707b645a..ce707b645a 100644
--- a/editor/icons/icon_reload_small.svg
+++ b/editor/icons/ReloadSmall.svg
diff --git a/editor/icons/icon_remote_transform.svg b/editor/icons/RemoteTransform.svg
index 2bdf8cd858..2bdf8cd858 100644
--- a/editor/icons/icon_remote_transform.svg
+++ b/editor/icons/RemoteTransform.svg
diff --git a/editor/icons/icon_remote_transform_2d.svg b/editor/icons/RemoteTransform2D.svg
index 51c9e084df..51c9e084df 100644
--- a/editor/icons/icon_remote_transform_2d.svg
+++ b/editor/icons/RemoteTransform2D.svg
diff --git a/editor/icons/icon_remove.svg b/editor/icons/Remove.svg
index 9372eb08b5..9372eb08b5 100644
--- a/editor/icons/icon_remove.svg
+++ b/editor/icons/Remove.svg
diff --git a/editor/icons/icon_remove_internal.svg b/editor/icons/RemoveInternal.svg
index 0a7e06e6cd..0a7e06e6cd 100644
--- a/editor/icons/icon_remove_internal.svg
+++ b/editor/icons/RemoveInternal.svg
diff --git a/editor/icons/icon_rename.svg b/editor/icons/Rename.svg
index 01923e3a0a..01923e3a0a 100644
--- a/editor/icons/icon_rename.svg
+++ b/editor/icons/Rename.svg
diff --git a/editor/icons/icon_reparent.svg b/editor/icons/Reparent.svg
index 39b79cd3a1..39b79cd3a1 100644
--- a/editor/icons/icon_reparent.svg
+++ b/editor/icons/Reparent.svg
diff --git a/editor/icons/icon_reparent_to_new_node.svg b/editor/icons/ReparentToNewNode.svg
index 37fbee848c..37fbee848c 100644
--- a/editor/icons/icon_reparent_to_new_node.svg
+++ b/editor/icons/ReparentToNewNode.svg
diff --git a/editor/icons/icon_resource_preloader.svg b/editor/icons/ResourcePreloader.svg
index 417e63b604..417e63b604 100644
--- a/editor/icons/icon_resource_preloader.svg
+++ b/editor/icons/ResourcePreloader.svg
diff --git a/editor/icons/icon_rich_text_effect.svg b/editor/icons/RichTextEffect.svg
index afe08685bd..afe08685bd 100644
--- a/editor/icons/icon_rich_text_effect.svg
+++ b/editor/icons/RichTextEffect.svg
diff --git a/editor/icons/icon_rich_text_label.svg b/editor/icons/RichTextLabel.svg
index 3f4b33707c..3f4b33707c 100644
--- a/editor/icons/icon_rich_text_label.svg
+++ b/editor/icons/RichTextLabel.svg
diff --git a/editor/icons/icon_rigid_body.svg b/editor/icons/RigidBody.svg
index 5d766f7c3d..5d766f7c3d 100644
--- a/editor/icons/icon_rigid_body.svg
+++ b/editor/icons/RigidBody.svg
diff --git a/editor/icons/icon_rigid_body_2d.svg b/editor/icons/RigidBody2D.svg
index bb97fa650b..bb97fa650b 100644
--- a/editor/icons/icon_rigid_body_2d.svg
+++ b/editor/icons/RigidBody2D.svg
diff --git a/editor/icons/icon_room.svg b/editor/icons/Room.svg
index 799be9f99a..799be9f99a 100644
--- a/editor/icons/icon_room.svg
+++ b/editor/icons/Room.svg
diff --git a/editor/icons/icon_room_bounds.svg b/editor/icons/RoomBounds.svg
index ad90944ac6..ad90944ac6 100644
--- a/editor/icons/icon_room_bounds.svg
+++ b/editor/icons/RoomBounds.svg
diff --git a/editor/icons/icon_rotate_0.svg b/editor/icons/Rotate0.svg
index 96174ca93b..96174ca93b 100644
--- a/editor/icons/icon_rotate_0.svg
+++ b/editor/icons/Rotate0.svg
diff --git a/editor/icons/icon_rotate_180.svg b/editor/icons/Rotate180.svg
index 11415e1e19..11415e1e19 100644
--- a/editor/icons/icon_rotate_180.svg
+++ b/editor/icons/Rotate180.svg
diff --git a/editor/icons/icon_rotate_270.svg b/editor/icons/Rotate270.svg
index be26bc4337..be26bc4337 100644
--- a/editor/icons/icon_rotate_270.svg
+++ b/editor/icons/Rotate270.svg
diff --git a/editor/icons/icon_rotate_90.svg b/editor/icons/Rotate90.svg
index d46c56a1fc..d46c56a1fc 100644
--- a/editor/icons/icon_rotate_90.svg
+++ b/editor/icons/Rotate90.svg
diff --git a/editor/icons/icon_rotate_left.svg b/editor/icons/RotateLeft.svg
index 223a725332..223a725332 100644
--- a/editor/icons/icon_rotate_left.svg
+++ b/editor/icons/RotateLeft.svg
diff --git a/editor/icons/icon_rotate_right.svg b/editor/icons/RotateRight.svg
index 2b66bae998..2b66bae998 100644
--- a/editor/icons/icon_rotate_right.svg
+++ b/editor/icons/RotateRight.svg
diff --git a/editor/icons/icon_ruler.svg b/editor/icons/Ruler.svg
index dbe02102ec..dbe02102ec 100644
--- a/editor/icons/icon_ruler.svg
+++ b/editor/icons/Ruler.svg
diff --git a/editor/icons/icon_sample_library.svg b/editor/icons/SampleLibrary.svg
index e83a1a3778..e83a1a3778 100644
--- a/editor/icons/icon_sample_library.svg
+++ b/editor/icons/SampleLibrary.svg
diff --git a/editor/icons/icon_save.svg b/editor/icons/Save.svg
index be5d3ef6fd..be5d3ef6fd 100644
--- a/editor/icons/icon_save.svg
+++ b/editor/icons/Save.svg
diff --git a/editor/icons/icon_script.svg b/editor/icons/Script.svg
index 1c6ec51a48..1c6ec51a48 100644
--- a/editor/icons/icon_script.svg
+++ b/editor/icons/Script.svg
diff --git a/editor/icons/icon_script_create.svg b/editor/icons/ScriptCreate.svg
index 0a03907a13..0a03907a13 100644
--- a/editor/icons/icon_script_create.svg
+++ b/editor/icons/ScriptCreate.svg
diff --git a/editor/icons/icon_script_create_dialog.svg b/editor/icons/ScriptCreateDialog.svg
index 751b799ba9..751b799ba9 100644
--- a/editor/icons/icon_script_create_dialog.svg
+++ b/editor/icons/ScriptCreateDialog.svg
diff --git a/editor/icons/icon_script_extend.svg b/editor/icons/ScriptExtend.svg
index efa0077ab1..efa0077ab1 100644
--- a/editor/icons/icon_script_extend.svg
+++ b/editor/icons/ScriptExtend.svg
diff --git a/editor/icons/icon_script_remove.svg b/editor/icons/ScriptRemove.svg
index de67d02947..de67d02947 100644
--- a/editor/icons/icon_script_remove.svg
+++ b/editor/icons/ScriptRemove.svg
diff --git a/editor/icons/icon_scroll_container.svg b/editor/icons/ScrollContainer.svg
index 738748ca91..738748ca91 100644
--- a/editor/icons/icon_scroll_container.svg
+++ b/editor/icons/ScrollContainer.svg
diff --git a/editor/icons/icon_search.svg b/editor/icons/Search.svg
index 04dc4f7372..04dc4f7372 100644
--- a/editor/icons/icon_search.svg
+++ b/editor/icons/Search.svg
diff --git a/editor/icons/icon_segment_shape_2d.svg b/editor/icons/SegmentShape2D.svg
index e4c04ae7c6..e4c04ae7c6 100644
--- a/editor/icons/icon_segment_shape_2d.svg
+++ b/editor/icons/SegmentShape2D.svg
diff --git a/editor/icons/icon_shader.svg b/editor/icons/Shader.svg
index 479379d235..479379d235 100644
--- a/editor/icons/icon_shader.svg
+++ b/editor/icons/Shader.svg
diff --git a/editor/icons/icon_shader_material.svg b/editor/icons/ShaderMaterial.svg
index 37c1610f29..37c1610f29 100644
--- a/editor/icons/icon_shader_material.svg
+++ b/editor/icons/ShaderMaterial.svg
diff --git a/editor/icons/icon_short_cut.svg b/editor/icons/ShortCut.svg
index f4e302efdb..f4e302efdb 100644
--- a/editor/icons/icon_short_cut.svg
+++ b/editor/icons/ShortCut.svg
diff --git a/editor/icons/icon_signal.svg b/editor/icons/Signal.svg
index 82fdf2b059..82fdf2b059 100644
--- a/editor/icons/icon_signal.svg
+++ b/editor/icons/Signal.svg
diff --git a/editor/icons/icon_signals.svg b/editor/icons/Signals.svg
index 9c09546f84..9c09546f84 100644
--- a/editor/icons/icon_signals.svg
+++ b/editor/icons/Signals.svg
diff --git a/editor/icons/icon_signals_and_groups.svg b/editor/icons/SignalsAndGroups.svg
index d568296d5f..d568296d5f 100644
--- a/editor/icons/icon_signals_and_groups.svg
+++ b/editor/icons/SignalsAndGroups.svg
diff --git a/editor/icons/icon_skeleton.svg b/editor/icons/Skeleton.svg
index 015c842125..015c842125 100644
--- a/editor/icons/icon_skeleton.svg
+++ b/editor/icons/Skeleton.svg
diff --git a/editor/icons/icon_skeleton_2d.svg b/editor/icons/Skeleton2D.svg
index 8e38b5c971..8e38b5c971 100644
--- a/editor/icons/icon_skeleton_2d.svg
+++ b/editor/icons/Skeleton2D.svg
diff --git a/editor/icons/icon_skeleton_i_k.svg b/editor/icons/SkeletonIK.svg
index e69f6e8bf3..e69f6e8bf3 100644
--- a/editor/icons/icon_skeleton_i_k.svg
+++ b/editor/icons/SkeletonIK.svg
diff --git a/editor/icons/icon_slider_joint.svg b/editor/icons/SliderJoint.svg
index fdd7487bbf..fdd7487bbf 100644
--- a/editor/icons/icon_slider_joint.svg
+++ b/editor/icons/SliderJoint.svg
diff --git a/editor/icons/icon_slot.svg b/editor/icons/Slot.svg
index 24d54297a8..24d54297a8 100644
--- a/editor/icons/icon_slot.svg
+++ b/editor/icons/Slot.svg
diff --git a/editor/icons/icon_snap.svg b/editor/icons/Snap.svg
index 632cf6c27d..632cf6c27d 100644
--- a/editor/icons/icon_snap.svg
+++ b/editor/icons/Snap.svg
diff --git a/editor/icons/icon_snap_grid.svg b/editor/icons/SnapGrid.svg
index a4a1f33053..a4a1f33053 100644
--- a/editor/icons/icon_snap_grid.svg
+++ b/editor/icons/SnapGrid.svg
diff --git a/editor/icons/icon_soft_body.svg b/editor/icons/SoftBody.svg
index 2c907df847..2c907df847 100644
--- a/editor/icons/icon_soft_body.svg
+++ b/editor/icons/SoftBody.svg
diff --git a/editor/icons/icon_sort.svg b/editor/icons/Sort.svg
index 0b2f7f7ea9..0b2f7f7ea9 100644
--- a/editor/icons/icon_sort.svg
+++ b/editor/icons/Sort.svg
diff --git a/editor/icons/icon_spatial.svg b/editor/icons/Spatial.svg
index 6a469dde13..6a469dde13 100644
--- a/editor/icons/icon_spatial.svg
+++ b/editor/icons/Spatial.svg
diff --git a/editor/icons/icon_spatial_material.svg b/editor/icons/SpatialMaterial.svg
index cfd994a0fe..cfd994a0fe 100644
--- a/editor/icons/icon_spatial_material.svg
+++ b/editor/icons/SpatialMaterial.svg
diff --git a/editor/icons/icon_sphere_mesh.svg b/editor/icons/SphereMesh.svg
index b01ba46bcf..b01ba46bcf 100644
--- a/editor/icons/icon_sphere_mesh.svg
+++ b/editor/icons/SphereMesh.svg
diff --git a/editor/icons/icon_sphere_shape.svg b/editor/icons/SphereShape.svg
index 4da18a1a38..4da18a1a38 100644
--- a/editor/icons/icon_sphere_shape.svg
+++ b/editor/icons/SphereShape.svg
diff --git a/editor/icons/icon_spin_box.svg b/editor/icons/SpinBox.svg
index 728710e440..728710e440 100644
--- a/editor/icons/icon_spin_box.svg
+++ b/editor/icons/SpinBox.svg
diff --git a/editor/icons/icon_spot_light.svg b/editor/icons/SpotLight.svg
index 6a35ee3890..6a35ee3890 100644
--- a/editor/icons/icon_spot_light.svg
+++ b/editor/icons/SpotLight.svg
diff --git a/editor/icons/icon_spring_arm.svg b/editor/icons/SpringArm.svg
index eb0c1ebd7d..eb0c1ebd7d 100644
--- a/editor/icons/icon_spring_arm.svg
+++ b/editor/icons/SpringArm.svg
diff --git a/editor/icons/icon_sprite.svg b/editor/icons/Sprite.svg
index 26a10625fc..26a10625fc 100644
--- a/editor/icons/icon_sprite.svg
+++ b/editor/icons/Sprite.svg
diff --git a/editor/icons/icon_sprite_3d.svg b/editor/icons/Sprite3D.svg
index 385bb8f87d..385bb8f87d 100644
--- a/editor/icons/icon_sprite_3d.svg
+++ b/editor/icons/Sprite3D.svg
diff --git a/editor/icons/icon_sprite_frames.svg b/editor/icons/SpriteFrames.svg
index f27adcb78c..f27adcb78c 100644
--- a/editor/icons/icon_sprite_frames.svg
+++ b/editor/icons/SpriteFrames.svg
diff --git a/editor/icons/icon_sprite_sheet.svg b/editor/icons/SpriteSheet.svg
index 9b3eda3287..9b3eda3287 100644
--- a/editor/icons/icon_sprite_sheet.svg
+++ b/editor/icons/SpriteSheet.svg
diff --git a/editor/icons/icon_standard_material_3d.svg b/editor/icons/StandardMaterial3D.svg
index aa8bfc9a5b..aa8bfc9a5b 100644
--- a/editor/icons/icon_standard_material_3d.svg
+++ b/editor/icons/StandardMaterial3D.svg
diff --git a/editor/icons/icon_static_body.svg b/editor/icons/StaticBody.svg
index de819bd76b..de819bd76b 100644
--- a/editor/icons/icon_static_body.svg
+++ b/editor/icons/StaticBody.svg
diff --git a/editor/icons/icon_static_body_2d.svg b/editor/icons/StaticBody2D.svg
index 2d846c5471..2d846c5471 100644
--- a/editor/icons/icon_static_body_2d.svg
+++ b/editor/icons/StaticBody2D.svg
diff --git a/editor/icons/icon_status_error.svg b/editor/icons/StatusError.svg
index ac3060e155..ac3060e155 100644
--- a/editor/icons/icon_status_error.svg
+++ b/editor/icons/StatusError.svg
diff --git a/editor/icons/icon_status_success.svg b/editor/icons/StatusSuccess.svg
index 4a22c6fc7f..4a22c6fc7f 100644
--- a/editor/icons/icon_status_success.svg
+++ b/editor/icons/StatusSuccess.svg
diff --git a/editor/icons/icon_status_warning.svg b/editor/icons/StatusWarning.svg
index 4ec16008d7..4ec16008d7 100644
--- a/editor/icons/icon_status_warning.svg
+++ b/editor/icons/StatusWarning.svg
diff --git a/editor/icons/icon_stop.svg b/editor/icons/Stop.svg
index 2cb013c0df..2cb013c0df 100644
--- a/editor/icons/icon_stop.svg
+++ b/editor/icons/Stop.svg
diff --git a/editor/icons/icon_stream_texture.svg b/editor/icons/StreamTexture.svg
index e7845e10f3..e7845e10f3 100644
--- a/editor/icons/icon_stream_texture.svg
+++ b/editor/icons/StreamTexture.svg
diff --git a/editor/icons/icon_string.svg b/editor/icons/String.svg
index 9f3bb0b011..9f3bb0b011 100644
--- a/editor/icons/icon_string.svg
+++ b/editor/icons/String.svg
diff --git a/editor/icons/StringName.svg b/editor/icons/StringName.svg
new file mode 100644
index 0000000000..bedaa6d634
--- /dev/null
+++ b/editor/icons/StringName.svg
@@ -0,0 +1,4 @@
+<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
+<path d="m5 2c-1.6569 0-3 1.3431-3 3v2c0 0.55228-0.44772 1-1 1h-1v2h1c1.6569 0 3-1.3431 3-3v-2c0-0.55228 0.44772-1 1-1h1v3c0 1.6569 1.3431 3 3 3h3v-4h1c0.55228 0 1 0.44772 1 1v3h2v-3c0-1.6569-1.3431-3-3-3h-5v-2zm3 4h2v2h-1c-0.55228 0-1-0.44772-1-1z" fill="#6ba7ec"/>
+<path d="m10 4v6h2v-4h1c0.55228 0 1 0.44772 1 1v3h2v-3c0-1.6569-1.3431-3-3-3h-1z" fill="#fff" fill-opacity=".39216"/>
+</svg>
diff --git a/editor/icons/icon_style_box_empty.svg b/editor/icons/StyleBoxEmpty.svg
index 0268b03ef2..0268b03ef2 100644
--- a/editor/icons/icon_style_box_empty.svg
+++ b/editor/icons/StyleBoxEmpty.svg
diff --git a/editor/icons/icon_style_box_flat.svg b/editor/icons/StyleBoxFlat.svg
index a6f43be4c8..a6f43be4c8 100644
--- a/editor/icons/icon_style_box_flat.svg
+++ b/editor/icons/StyleBoxFlat.svg
diff --git a/editor/icons/icon_style_box_line.svg b/editor/icons/StyleBoxLine.svg
index d7c26aac9d..d7c26aac9d 100644
--- a/editor/icons/icon_style_box_line.svg
+++ b/editor/icons/StyleBoxLine.svg
diff --git a/editor/icons/icon_style_box_texture.svg b/editor/icons/StyleBoxTexture.svg
index 6f067a4db4..6f067a4db4 100644
--- a/editor/icons/icon_style_box_texture.svg
+++ b/editor/icons/StyleBoxTexture.svg
diff --git a/editor/icons/icon_tab_container.svg b/editor/icons/TabContainer.svg
index fe0e426ef9..fe0e426ef9 100644
--- a/editor/icons/icon_tab_container.svg
+++ b/editor/icons/TabContainer.svg
diff --git a/editor/icons/icon_tabs.svg b/editor/icons/Tabs.svg
index ad1e9069d0..ad1e9069d0 100644
--- a/editor/icons/icon_tabs.svg
+++ b/editor/icons/Tabs.svg
diff --git a/editor/icons/icon_test_cube.svg b/editor/icons/TestCube.svg
index 16cf68520f..16cf68520f 100644
--- a/editor/icons/icon_test_cube.svg
+++ b/editor/icons/TestCube.svg
diff --git a/editor/icons/icon_text_edit.svg b/editor/icons/TextEdit.svg
index 66f2fca4ba..66f2fca4ba 100644
--- a/editor/icons/icon_text_edit.svg
+++ b/editor/icons/TextEdit.svg
diff --git a/editor/icons/icon_text_file.svg b/editor/icons/TextFile.svg
index d381048212..d381048212 100644
--- a/editor/icons/icon_text_file.svg
+++ b/editor/icons/TextFile.svg
diff --git a/editor/icons/icon_texture_3_d.svg b/editor/icons/Texture3D.svg
index ed8ce3e4ef..ed8ce3e4ef 100644
--- a/editor/icons/icon_texture_3_d.svg
+++ b/editor/icons/Texture3D.svg
diff --git a/editor/icons/icon_texture_array.svg b/editor/icons/TextureArray.svg
index 4631b1449c..4631b1449c 100644
--- a/editor/icons/icon_texture_array.svg
+++ b/editor/icons/TextureArray.svg
diff --git a/editor/icons/icon_texture_button.svg b/editor/icons/TextureButton.svg
index 6e1d1b6436..6e1d1b6436 100644
--- a/editor/icons/icon_texture_button.svg
+++ b/editor/icons/TextureButton.svg
diff --git a/editor/icons/icon_texture_progress.svg b/editor/icons/TextureProgress.svg
index 5763fde840..5763fde840 100644
--- a/editor/icons/icon_texture_progress.svg
+++ b/editor/icons/TextureProgress.svg
diff --git a/editor/icons/icon_texture_rect.svg b/editor/icons/TextureRect.svg
index 1d1b5ed8f7..1d1b5ed8f7 100644
--- a/editor/icons/icon_texture_rect.svg
+++ b/editor/icons/TextureRect.svg
diff --git a/editor/icons/icon_theme.svg b/editor/icons/Theme.svg
index e16acbfb72..e16acbfb72 100644
--- a/editor/icons/icon_theme.svg
+++ b/editor/icons/Theme.svg
diff --git a/editor/icons/icon_thumbnail_wait.svg b/editor/icons/ThumbnailWait.svg
index fe242e81fb..fe242e81fb 100644
--- a/editor/icons/icon_thumbnail_wait.svg
+++ b/editor/icons/ThumbnailWait.svg
diff --git a/editor/icons/icon_tile_map.svg b/editor/icons/TileMap.svg
index afdaeea7e8..afdaeea7e8 100644
--- a/editor/icons/icon_tile_map.svg
+++ b/editor/icons/TileMap.svg
diff --git a/editor/icons/icon_tile_set.svg b/editor/icons/TileSet.svg
index 0948e6dae1..0948e6dae1 100644
--- a/editor/icons/icon_tile_set.svg
+++ b/editor/icons/TileSet.svg
diff --git a/editor/icons/icon_time.svg b/editor/icons/Time.svg
index eb411c6858..eb411c6858 100644
--- a/editor/icons/icon_time.svg
+++ b/editor/icons/Time.svg
diff --git a/editor/icons/icon_timeline_indicator.svg b/editor/icons/TimelineIndicator.svg
index fd18192705..fd18192705 100644
--- a/editor/icons/icon_timeline_indicator.svg
+++ b/editor/icons/TimelineIndicator.svg
diff --git a/editor/icons/icon_timer.svg b/editor/icons/Timer.svg
index d445eeb1dd..d445eeb1dd 100644
--- a/editor/icons/icon_timer.svg
+++ b/editor/icons/Timer.svg
diff --git a/editor/icons/icon_tool_add_node.svg b/editor/icons/ToolAddNode.svg
index 71599c0b0d..71599c0b0d 100644
--- a/editor/icons/icon_tool_add_node.svg
+++ b/editor/icons/ToolAddNode.svg
diff --git a/editor/icons/icon_tool_button.svg b/editor/icons/ToolButton.svg
index 98a41d2a08..98a41d2a08 100644
--- a/editor/icons/icon_tool_button.svg
+++ b/editor/icons/ToolButton.svg
diff --git a/editor/icons/icon_tool_connect.svg b/editor/icons/ToolConnect.svg
index 321f68654a..321f68654a 100644
--- a/editor/icons/icon_tool_connect.svg
+++ b/editor/icons/ToolConnect.svg
diff --git a/editor/icons/icon_tool_move.svg b/editor/icons/ToolMove.svg
index a02296fed6..a02296fed6 100644
--- a/editor/icons/icon_tool_move.svg
+++ b/editor/icons/ToolMove.svg
diff --git a/editor/icons/icon_tool_pan.svg b/editor/icons/ToolPan.svg
index e195542687..e195542687 100644
--- a/editor/icons/icon_tool_pan.svg
+++ b/editor/icons/ToolPan.svg
diff --git a/editor/icons/icon_tool_rotate.svg b/editor/icons/ToolRotate.svg
index e25b08cd07..e25b08cd07 100644
--- a/editor/icons/icon_tool_rotate.svg
+++ b/editor/icons/ToolRotate.svg
diff --git a/editor/icons/icon_tool_scale.svg b/editor/icons/ToolScale.svg
index 8fc1527296..8fc1527296 100644
--- a/editor/icons/icon_tool_scale.svg
+++ b/editor/icons/ToolScale.svg
diff --git a/editor/icons/icon_tool_select.svg b/editor/icons/ToolSelect.svg
index 4285b3181b..4285b3181b 100644
--- a/editor/icons/icon_tool_select.svg
+++ b/editor/icons/ToolSelect.svg
diff --git a/editor/icons/icon_tool_triangle.svg b/editor/icons/ToolTriangle.svg
index 17ce12265e..17ce12265e 100644
--- a/editor/icons/icon_tool_triangle.svg
+++ b/editor/icons/ToolTriangle.svg
diff --git a/editor/icons/icon_tools.svg b/editor/icons/Tools.svg
index dc002d6a4d..dc002d6a4d 100644
--- a/editor/icons/icon_tools.svg
+++ b/editor/icons/Tools.svg
diff --git a/editor/icons/icon_touch_screen_button.svg b/editor/icons/TouchScreenButton.svg
index d29e411f05..d29e411f05 100644
--- a/editor/icons/icon_touch_screen_button.svg
+++ b/editor/icons/TouchScreenButton.svg
diff --git a/editor/icons/icon_track_add_key.svg b/editor/icons/TrackAddKey.svg
index 582003cd9b..582003cd9b 100644
--- a/editor/icons/icon_track_add_key.svg
+++ b/editor/icons/TrackAddKey.svg
diff --git a/editor/icons/icon_track_add_key_hl.svg b/editor/icons/TrackAddKeyHl.svg
index 7f3c60a562..7f3c60a562 100644
--- a/editor/icons/icon_track_add_key_hl.svg
+++ b/editor/icons/TrackAddKeyHl.svg
diff --git a/editor/icons/icon_track_capture.svg b/editor/icons/TrackCapture.svg
index 51a38ff1fb..51a38ff1fb 100644
--- a/editor/icons/icon_track_capture.svg
+++ b/editor/icons/TrackCapture.svg
diff --git a/editor/icons/icon_track_color.svg b/editor/icons/TrackColor.svg
index 6a736c7a84..6a736c7a84 100644
--- a/editor/icons/icon_track_color.svg
+++ b/editor/icons/TrackColor.svg
diff --git a/editor/icons/icon_track_continuous.svg b/editor/icons/TrackContinuous.svg
index 2e89cdd821..2e89cdd821 100644
--- a/editor/icons/icon_track_continuous.svg
+++ b/editor/icons/TrackContinuous.svg
diff --git a/editor/icons/icon_track_discrete.svg b/editor/icons/TrackDiscrete.svg
index a0550822bf..a0550822bf 100644
--- a/editor/icons/icon_track_discrete.svg
+++ b/editor/icons/TrackDiscrete.svg
diff --git a/editor/icons/icon_track_trigger.svg b/editor/icons/TrackTrigger.svg
index 5572b254a2..5572b254a2 100644
--- a/editor/icons/icon_track_trigger.svg
+++ b/editor/icons/TrackTrigger.svg
diff --git a/editor/icons/icon_transform.svg b/editor/icons/Transform.svg
index 0ed5377ed7..0ed5377ed7 100644
--- a/editor/icons/icon_transform.svg
+++ b/editor/icons/Transform.svg
diff --git a/editor/icons/icon_transform_2_D.svg b/editor/icons/Transform2D.svg
index a57587ba06..a57587ba06 100644
--- a/editor/icons/icon_transform_2_D.svg
+++ b/editor/icons/Transform2D.svg
diff --git a/editor/icons/icon_transition_end.svg b/editor/icons/TransitionEnd.svg
index 8d6857432f..8d6857432f 100644
--- a/editor/icons/icon_transition_end.svg
+++ b/editor/icons/TransitionEnd.svg
diff --git a/editor/icons/icon_transition_end_auto.svg b/editor/icons/TransitionEndAuto.svg
index fbfa7b03db..fbfa7b03db 100644
--- a/editor/icons/icon_transition_end_auto.svg
+++ b/editor/icons/TransitionEndAuto.svg
diff --git a/editor/icons/icon_transition_end_auto_big.svg b/editor/icons/TransitionEndAutoBig.svg
index fcc894a3e6..fcc894a3e6 100644
--- a/editor/icons/icon_transition_end_auto_big.svg
+++ b/editor/icons/TransitionEndAutoBig.svg
diff --git a/editor/icons/icon_transition_end_big.svg b/editor/icons/TransitionEndBig.svg
index cc93dd5808..cc93dd5808 100644
--- a/editor/icons/icon_transition_end_big.svg
+++ b/editor/icons/TransitionEndBig.svg
diff --git a/editor/icons/icon_transition_immediate.svg b/editor/icons/TransitionImmediate.svg
index 56e9b6c0f3..56e9b6c0f3 100644
--- a/editor/icons/icon_transition_immediate.svg
+++ b/editor/icons/TransitionImmediate.svg
diff --git a/editor/icons/icon_transition_immediate_auto.svg b/editor/icons/TransitionImmediateAuto.svg
index 8453bcff08..8453bcff08 100644
--- a/editor/icons/icon_transition_immediate_auto.svg
+++ b/editor/icons/TransitionImmediateAuto.svg
diff --git a/editor/icons/icon_transition_immediate_auto_big.svg b/editor/icons/TransitionImmediateAutoBig.svg
index 77f7ba592e..77f7ba592e 100644
--- a/editor/icons/icon_transition_immediate_auto_big.svg
+++ b/editor/icons/TransitionImmediateAutoBig.svg
diff --git a/editor/icons/icon_transition_immediate_big.svg b/editor/icons/TransitionImmediateBig.svg
index 94584c45f7..94584c45f7 100644
--- a/editor/icons/icon_transition_immediate_big.svg
+++ b/editor/icons/TransitionImmediateBig.svg
diff --git a/editor/icons/icon_transition_sync.svg b/editor/icons/TransitionSync.svg
index affa353100..affa353100 100644
--- a/editor/icons/icon_transition_sync.svg
+++ b/editor/icons/TransitionSync.svg
diff --git a/editor/icons/icon_transition_sync_auto.svg b/editor/icons/TransitionSyncAuto.svg
index 767773a000..767773a000 100644
--- a/editor/icons/icon_transition_sync_auto.svg
+++ b/editor/icons/TransitionSyncAuto.svg
diff --git a/editor/icons/icon_transition_sync_auto_big.svg b/editor/icons/TransitionSyncAutoBig.svg
index c9735a2653..c9735a2653 100644
--- a/editor/icons/icon_transition_sync_auto_big.svg
+++ b/editor/icons/TransitionSyncAutoBig.svg
diff --git a/editor/icons/icon_transition_sync_big.svg b/editor/icons/TransitionSyncBig.svg
index 959f26c6f1..959f26c6f1 100644
--- a/editor/icons/icon_transition_sync_big.svg
+++ b/editor/icons/TransitionSyncBig.svg
diff --git a/editor/icons/icon_translation.svg b/editor/icons/Translation.svg
index 4195ce04a9..4195ce04a9 100644
--- a/editor/icons/icon_translation.svg
+++ b/editor/icons/Translation.svg
diff --git a/editor/icons/icon_transpose.svg b/editor/icons/Transpose.svg
index e63c679323..e63c679323 100644
--- a/editor/icons/icon_transpose.svg
+++ b/editor/icons/Transpose.svg
diff --git a/editor/icons/icon_tree.svg b/editor/icons/Tree.svg
index 8e450948ce..8e450948ce 100644
--- a/editor/icons/icon_tree.svg
+++ b/editor/icons/Tree.svg
diff --git a/editor/icons/icon_tween.svg b/editor/icons/Tween.svg
index c311cbd05e..c311cbd05e 100644
--- a/editor/icons/icon_tween.svg
+++ b/editor/icons/Tween.svg
diff --git a/editor/icons/icon_unbone.svg b/editor/icons/Unbone.svg
index 75df7e6ce9..75df7e6ce9 100644
--- a/editor/icons/icon_unbone.svg
+++ b/editor/icons/Unbone.svg
diff --git a/editor/icons/icon_ungroup.svg b/editor/icons/Ungroup.svg
index c6e235f47d..c6e235f47d 100644
--- a/editor/icons/icon_ungroup.svg
+++ b/editor/icons/Ungroup.svg
diff --git a/editor/icons/icon_unlock.svg b/editor/icons/Unlock.svg
index 52be7e2233..52be7e2233 100644
--- a/editor/icons/icon_unlock.svg
+++ b/editor/icons/Unlock.svg
diff --git a/editor/icons/icon_unpaint_vertex.svg b/editor/icons/UnpaintVertex.svg
index 7bb94f06be..7bb94f06be 100644
--- a/editor/icons/icon_unpaint_vertex.svg
+++ b/editor/icons/UnpaintVertex.svg
diff --git a/editor/icons/icon_uv.svg b/editor/icons/Uv.svg
index f68ea2c984..f68ea2c984 100644
--- a/editor/icons/icon_uv.svg
+++ b/editor/icons/Uv.svg
diff --git a/editor/icons/icon_v_box_container.svg b/editor/icons/VBoxContainer.svg
index 17b83ced0a..17b83ced0a 100644
--- a/editor/icons/icon_v_box_container.svg
+++ b/editor/icons/VBoxContainer.svg
diff --git a/editor/icons/icon_v_scroll_bar.svg b/editor/icons/VScrollBar.svg
index 285e54fbd1..285e54fbd1 100644
--- a/editor/icons/icon_v_scroll_bar.svg
+++ b/editor/icons/VScrollBar.svg
diff --git a/editor/icons/icon_v_separator.svg b/editor/icons/VSeparator.svg
index 6476ea5ad7..6476ea5ad7 100644
--- a/editor/icons/icon_v_separator.svg
+++ b/editor/icons/VSeparator.svg
diff --git a/editor/icons/icon_v_slider.svg b/editor/icons/VSlider.svg
index c6fc1e6e0f..c6fc1e6e0f 100644
--- a/editor/icons/icon_v_slider.svg
+++ b/editor/icons/VSlider.svg
diff --git a/editor/icons/icon_v_split_container.svg b/editor/icons/VSplitContainer.svg
index b9bbb4bfc3..b9bbb4bfc3 100644
--- a/editor/icons/icon_v_split_container.svg
+++ b/editor/icons/VSplitContainer.svg
diff --git a/editor/icons/icon_variant.svg b/editor/icons/Variant.svg
index 7c2e4559d1..7c2e4559d1 100644
--- a/editor/icons/icon_variant.svg
+++ b/editor/icons/Variant.svg
diff --git a/editor/icons/icon_vector2.svg b/editor/icons/Vector2.svg
index b4e9b44c03..b4e9b44c03 100644
--- a/editor/icons/icon_vector2.svg
+++ b/editor/icons/Vector2.svg
diff --git a/editor/icons/Vector2i.svg b/editor/icons/Vector2i.svg
new file mode 100644
index 0000000000..6cf9a896f3
--- /dev/null
+++ b/editor/icons/Vector2i.svg
@@ -0,0 +1,5 @@
+<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
+<path d="m8 2v2h1c0.55228 0 1 0.44772 1 1s-0.44772 1-1 1c-0.71466-1.248e-4 -1.3751 0.38109-1.7324 1-0.17472 0.30426-0.26633 0.64914-0.26562 1h-2e-3v2h5v-2h-3c1.0717-1.344e-4 2.0619-0.57191 2.5977-1.5 0.5359-0.9282 0.5359-2.0718 0-3-0.53578-0.92809-1.526-1.4999-2.5977-1.5zm-7 2v6h2c1.6569 0 3-1.3431 3-3v-3h-2v3c0 0.55228-0.44772 1-1 1v-4z" fill="#bd91f1"/>
+<path d="m8 2v2h1c0.55228 0 1 0.44772 1 1s-0.44772 1-1 1c-0.71466-1.248e-4 -1.3751 0.38109-1.7324 1-0.17472 0.30426-0.26633 0.64914-0.26562 1h-0.001953v2h5v-2h-3c1.0717-1.344e-4 2.0619-0.57191 2.5977-1.5 0.5359-0.9282 0.5359-2.0718 0-3-0.53583-0.92809-1.526-1.4999-2.5977-1.5z" fill="#fff" fill-opacity=".39216"/>
+<path d="m13 2v2h2v-2zm0 4v4h2v-4z" fill="#7dc6ef"/>
+</svg>
diff --git a/editor/icons/icon_vector3.svg b/editor/icons/Vector3.svg
index 74861160d6..74861160d6 100644
--- a/editor/icons/icon_vector3.svg
+++ b/editor/icons/Vector3.svg
diff --git a/editor/icons/Vector3i.svg b/editor/icons/Vector3i.svg
new file mode 100644
index 0000000000..d0be27886d
--- /dev/null
+++ b/editor/icons/Vector3i.svg
@@ -0,0 +1,5 @@
+<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
+<path d="m8 2v2h2c0 0.55228-0.44772 1-1 1v2c0.55228 0 1 0.44772 1 1s-0.45296 0.92408-1 1h-1v2h1c1.0717-1.34e-4 2.0619-0.57191 2.5977-1.5 0.5359-0.9282 0.5359-2.0718 0-3-0.10406-0.1795-0.22646-0.34771-0.36523-0.50195 0.13855-0.15301 0.26094-0.31991 0.36523-0.49805 0.26209-0.45639 0.3995-0.97371 0.39844-1.5h0.0039v-2zm-7 2v6h2c1.6569 0 3-1.3431 3-3v-3h-2v3c0 0.55228-0.44772 1-1 1v-4z" fill="#e286f0"/>
+<path d="m8 2v2h2c0 0.55228-0.44772 1-1 1v2c0.55228 0 1 0.44772 1 1s-0.44948 0.95585-1 1h-1v2h1c1.0717-1.34e-4 2.0619-0.57191 2.5977-1.5 0.5359-0.9282 0.5359-2.0718 0-3-0.10406-0.1795-0.22646-0.34771-0.36523-0.50195 0.13855-0.15301 0.26094-0.31991 0.36523-0.49805 0.26209-0.45639 0.3995-0.97371 0.39844-1.5h0.0039v-2z" fill="#fff" fill-opacity=".39216"/>
+<path d="m13 2v2h2v-2zm0 4v4h2v-4z" fill="#7dc6ef"/>
+</svg>
diff --git a/editor/icons/icon_vehicle_body.svg b/editor/icons/VehicleBody.svg
index a509730602..a509730602 100644
--- a/editor/icons/icon_vehicle_body.svg
+++ b/editor/icons/VehicleBody.svg
diff --git a/editor/icons/icon_vehicle_wheel.svg b/editor/icons/VehicleWheel.svg
index bd870c0118..bd870c0118 100644
--- a/editor/icons/icon_vehicle_wheel.svg
+++ b/editor/icons/VehicleWheel.svg
diff --git a/editor/icons/icon_video_player.svg b/editor/icons/VideoPlayer.svg
index 4e8dcf0ec2..4e8dcf0ec2 100644
--- a/editor/icons/icon_video_player.svg
+++ b/editor/icons/VideoPlayer.svg
diff --git a/editor/icons/icon_viewport.svg b/editor/icons/Viewport.svg
index 7cd5d73cde..7cd5d73cde 100644
--- a/editor/icons/icon_viewport.svg
+++ b/editor/icons/Viewport.svg
diff --git a/editor/icons/icon_viewport_container.svg b/editor/icons/ViewportContainer.svg
index 18dcddc15f..18dcddc15f 100644
--- a/editor/icons/icon_viewport_container.svg
+++ b/editor/icons/ViewportContainer.svg
diff --git a/editor/icons/icon_viewport_speed.svg b/editor/icons/ViewportSpeed.svg
index 364eb4969b..364eb4969b 100644
--- a/editor/icons/icon_viewport_speed.svg
+++ b/editor/icons/ViewportSpeed.svg
diff --git a/editor/icons/icon_viewport_texture.svg b/editor/icons/ViewportTexture.svg
index 145beff6bc..145beff6bc 100644
--- a/editor/icons/icon_viewport_texture.svg
+++ b/editor/icons/ViewportTexture.svg
diff --git a/editor/icons/icon_viewport_zoom.svg b/editor/icons/ViewportZoom.svg
index 6d64d1b8a4..6d64d1b8a4 100644
--- a/editor/icons/icon_viewport_zoom.svg
+++ b/editor/icons/ViewportZoom.svg
diff --git a/editor/icons/icon_visibility_enabler.svg b/editor/icons/VisibilityEnabler.svg
index 70e4f081c2..70e4f081c2 100644
--- a/editor/icons/icon_visibility_enabler.svg
+++ b/editor/icons/VisibilityEnabler.svg
diff --git a/editor/icons/icon_visibility_enabler_2d.svg b/editor/icons/VisibilityEnabler2D.svg
index 2976e468ed..2976e468ed 100644
--- a/editor/icons/icon_visibility_enabler_2d.svg
+++ b/editor/icons/VisibilityEnabler2D.svg
diff --git a/editor/icons/icon_visibility_notifier.svg b/editor/icons/VisibilityNotifier.svg
index c908d5c99d..c908d5c99d 100644
--- a/editor/icons/icon_visibility_notifier.svg
+++ b/editor/icons/VisibilityNotifier.svg
diff --git a/editor/icons/icon_visibility_notifier_2d.svg b/editor/icons/VisibilityNotifier2D.svg
index e05d7d3887..e05d7d3887 100644
--- a/editor/icons/icon_visibility_notifier_2d.svg
+++ b/editor/icons/VisibilityNotifier2D.svg
diff --git a/editor/icons/icon_visual_shader.svg b/editor/icons/VisualShader.svg
index 15cb60d2e3..15cb60d2e3 100644
--- a/editor/icons/icon_visual_shader.svg
+++ b/editor/icons/VisualShader.svg
diff --git a/editor/icons/icon_visual_shader_port.svg b/editor/icons/VisualShaderPort.svg
index 9df6344fe2..9df6344fe2 100644
--- a/editor/icons/icon_visual_shader_port.svg
+++ b/editor/icons/VisualShaderPort.svg
diff --git a/editor/icons/icon_warning.svg b/editor/icons/Warning.svg
index 698288d5a9..698288d5a9 100644
--- a/editor/icons/icon_warning.svg
+++ b/editor/icons/Warning.svg
diff --git a/editor/icons/icon_window_dialog.svg b/editor/icons/WindowDialog.svg
index 3c7be2a58d..3c7be2a58d 100644
--- a/editor/icons/icon_window_dialog.svg
+++ b/editor/icons/WindowDialog.svg
diff --git a/editor/icons/icon_world.svg b/editor/icons/World.svg
index 3db96a75a6..3db96a75a6 100644
--- a/editor/icons/icon_world.svg
+++ b/editor/icons/World.svg
diff --git a/editor/icons/icon_world_2d.svg b/editor/icons/World2D.svg
index 862242ec44..862242ec44 100644
--- a/editor/icons/icon_world_2d.svg
+++ b/editor/icons/World2D.svg
diff --git a/editor/icons/icon_world_environment.svg b/editor/icons/WorldEnvironment.svg
index e87a4b5b0c..e87a4b5b0c 100644
--- a/editor/icons/icon_world_environment.svg
+++ b/editor/icons/WorldEnvironment.svg
diff --git a/editor/icons/icon_x509_certificate.svg b/editor/icons/X509Certificate.svg
index e175fa3234..e175fa3234 100644
--- a/editor/icons/icon_x509_certificate.svg
+++ b/editor/icons/X509Certificate.svg
diff --git a/editor/icons/icon_y_sort.svg b/editor/icons/YSort.svg
index dbcefef216..dbcefef216 100644
--- a/editor/icons/icon_y_sort.svg
+++ b/editor/icons/YSort.svg
diff --git a/editor/icons/icon_zoom.svg b/editor/icons/Zoom.svg
index aa517b6ae2..aa517b6ae2 100644
--- a/editor/icons/icon_zoom.svg
+++ b/editor/icons/Zoom.svg
diff --git a/editor/icons/icon_zoom_less.svg b/editor/icons/ZoomLess.svg
index cf3b4475c9..cf3b4475c9 100644
--- a/editor/icons/icon_zoom_less.svg
+++ b/editor/icons/ZoomLess.svg
diff --git a/editor/icons/icon_zoom_more.svg b/editor/icons/ZoomMore.svg
index 8847eea53f..8847eea53f 100644
--- a/editor/icons/icon_zoom_more.svg
+++ b/editor/icons/ZoomMore.svg
diff --git a/editor/icons/icon_zoom_reset.svg b/editor/icons/ZoomReset.svg
index 6ecb4111fe..6ecb4111fe 100644
--- a/editor/icons/icon_zoom_reset.svg
+++ b/editor/icons/ZoomReset.svg
diff --git a/editor/icons/icon_bool.svg b/editor/icons/bool.svg
index 5ffd40a815..5ffd40a815 100644
--- a/editor/icons/icon_bool.svg
+++ b/editor/icons/bool.svg
diff --git a/editor/icons/editor_icons_builders.py b/editor/icons/editor_icons_builders.py
index dfd0802ce9..ea2c2e57d1 100644
--- a/editor/icons/editor_icons_builders.py
+++ b/editor/icons/editor_icons_builders.py
@@ -27,7 +27,6 @@ def make_editor_icons_action(target, source, env):
icons_string.write("\\" + str(hex(ord(b)))[1:])
b = svgf.read(1)
-
icons_string.write('"')
if fname != svg_icons[-1]:
icons_string.write(",")
@@ -44,17 +43,16 @@ def make_editor_icons_action(target, source, env):
s.write("static const char *editor_icons_names[] = {\n")
# this is used to store the indices of thumbnail icons
- thumb_medium_indices = [];
- thumb_big_indices = [];
+ thumb_medium_indices = []
+ thumb_big_indices = []
index = 0
for f in svg_icons:
fname = str(f)
- icon_name = os.path.basename(fname)[5:-4].title().replace("_", "")
+ # Trim the `.svg` extension from the string.
+ icon_name = os.path.basename(fname)[:-4]
# some special cases
- if icon_name in ['Int', 'Bool', 'Float']:
- icon_name = icon_name.lower()
if icon_name.endswith("MediumThumb"): # don't know a better way to handle this
thumb_medium_indices.append(str(index))
if icon_name.endswith("BigThumb"): # don't know a better way to handle this
diff --git a/editor/icons/icon_float.svg b/editor/icons/float.svg
index 5c09d4c244..5c09d4c244 100644
--- a/editor/icons/icon_float.svg
+++ b/editor/icons/float.svg
diff --git a/editor/icons/icon_int.svg b/editor/icons/int.svg
index 4226c8cb7e..4226c8cb7e 100644
--- a/editor/icons/icon_int.svg
+++ b/editor/icons/int.svg
diff --git a/editor/import/editor_import_plugin.cpp b/editor/import/editor_import_plugin.cpp
index 53a654c971..aad378c94f 100644
--- a/editor/import/editor_import_plugin.cpp
+++ b/editor/import/editor_import_plugin.cpp
@@ -162,7 +162,7 @@ void EditorImportPlugin::_bind_methods() {
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::ARRAY, "get_import_options", PropertyInfo(Variant::INT, "preset")));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::STRING, "get_save_extension"));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::STRING, "get_resource_type"));
- ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::REAL, "get_priority"));
+ ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::FLOAT, "get_priority"));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::INT, "get_import_order"));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "get_option_visibility", PropertyInfo(Variant::STRING, "option"), PropertyInfo(Variant::DICTIONARY, "options")));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::INT, "import", PropertyInfo(Variant::STRING, "source_file"), PropertyInfo(Variant::STRING, "save_path"), PropertyInfo(Variant::DICTIONARY, "options"), PropertyInfo(Variant::ARRAY, "platform_variants"), PropertyInfo(Variant::ARRAY, "gen_files")));
diff --git a/editor/import/resource_importer_bitmask.cpp b/editor/import/resource_importer_bitmask.cpp
index 22989b81e4..252af9050b 100644
--- a/editor/import/resource_importer_bitmask.cpp
+++ b/editor/import/resource_importer_bitmask.cpp
@@ -75,7 +75,7 @@ String ResourceImporterBitMap::get_preset_name(int p_idx) const {
void ResourceImporterBitMap::get_import_options(List<ImportOption> *r_options, int p_preset) const {
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "create_from", PROPERTY_HINT_ENUM, "Black & White,Alpha"), 0));
- r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "threshold", PROPERTY_HINT_RANGE, "0,1,0.01"), 0.5));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "threshold", PROPERTY_HINT_RANGE, "0,1,0.01"), 0.5));
}
Error ResourceImporterBitMap::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp
index 22c2a71286..9fb6be50d9 100644
--- a/editor/import/resource_importer_scene.cpp
+++ b/editor/import/resource_importer_scene.cpp
@@ -1160,7 +1160,7 @@ void ResourceImporterScene::get_import_options(List<ImportOption> *r_options, in
bool scenes_out = p_preset == PRESET_MULTIPLE_SCENES || p_preset == PRESET_MULTIPLE_SCENES_AND_MATERIALS;
bool animations_out = p_preset == PRESET_SEPARATE_ANIMATIONS || p_preset == PRESET_SEPARATE_MESHES_AND_ANIMATIONS || p_preset == PRESET_SEPARATE_MATERIALS_AND_ANIMATIONS || p_preset == PRESET_SEPARATE_MESHES_MATERIALS_AND_ANIMATIONS;
- r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "nodes/root_scale", PROPERTY_HINT_RANGE, "0.001,1000,0.001"), 1.0));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "nodes/root_scale", PROPERTY_HINT_RANGE, "0.001,1000,0.001"), 1.0));
r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "nodes/custom_script", PROPERTY_HINT_FILE, script_ext_hint), ""));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "nodes/storage", PROPERTY_HINT_ENUM, "Single Scene,Instanced Sub-Scenes"), scenes_out ? 1 : 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "materials/location", PROPERTY_HINT_ENUM, "Node,Mesh"), (meshes_out || materials_out) ? 1 : 0));
@@ -1170,18 +1170,18 @@ void ResourceImporterScene::get_import_options(List<ImportOption> *r_options, in
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "meshes/ensure_tangents"), true));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "meshes/storage", PROPERTY_HINT_ENUM, "Built-In,Files (.mesh),Files (.tres)"), meshes_out ? 1 : 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "meshes/light_baking", PROPERTY_HINT_ENUM, "Disabled,Enable,Gen Lightmaps", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), 0));
- r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "meshes/lightmap_texel_size", PROPERTY_HINT_RANGE, "0.001,100,0.001"), 0.1));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "meshes/lightmap_texel_size", PROPERTY_HINT_RANGE, "0.001,100,0.001"), 0.1));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "skins/use_named_skins"), true));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "external_files/store_in_subdir"), false));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "animation/import", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), true));
- r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "animation/fps", PROPERTY_HINT_RANGE, "1,120,1"), 15));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "animation/fps", PROPERTY_HINT_RANGE, "1,120,1"), 15));
r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "animation/filter_script", PROPERTY_HINT_MULTILINE_TEXT), ""));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "animation/storage", PROPERTY_HINT_ENUM, "Built-In,Files (.anim),Files (.tres)", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), animations_out));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "animation/keep_custom_tracks"), animations_out));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "animation/optimizer/enabled", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), true));
- r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "animation/optimizer/max_linear_error"), 0.05));
- r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "animation/optimizer/max_angular_error"), 0.01));
- r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "animation/optimizer/max_angle"), 22));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "animation/optimizer/max_linear_error"), 0.05));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "animation/optimizer/max_angular_error"), 0.01));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "animation/optimizer/max_angle"), 22));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "animation/optimizer/remove_unused_tracks"), true));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "animation/clips/amount", PROPERTY_HINT_RANGE, "0,256,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), 0));
for (int i = 0; i < 256; i++) {
diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp
index 7144bc04c8..3254b32dae 100644
--- a/editor/import/resource_importer_texture.cpp
+++ b/editor/import/resource_importer_texture.cpp
@@ -210,7 +210,7 @@ String ResourceImporterTexture::get_preset_name(int p_idx) const {
void ResourceImporterTexture::get_import_options(List<ImportOption> *r_options, int p_preset) const {
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/mode", PROPERTY_HINT_ENUM, "Lossless,Lossy,VRAM Compressed,VRAM Uncompressed,Basis Universal", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), p_preset == PRESET_3D ? 2 : 0));
- r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "compress/lossy_quality", PROPERTY_HINT_RANGE, "0,1,0.01"), 0.7));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "compress/lossy_quality", PROPERTY_HINT_RANGE, "0,1,0.01"), 0.7));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/hdr_mode", PROPERTY_HINT_ENUM, "Enabled,Force RGBE"), 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/bptc_ldr", PROPERTY_HINT_ENUM, "Enabled,RGBA Only"), 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/normal_map", PROPERTY_HINT_ENUM, "Detect,Enable,Disabled"), 0));
@@ -226,7 +226,7 @@ void ResourceImporterTexture::get_import_options(List<ImportOption> *r_options,
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "process/HDR_as_SRGB"), false));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "process/size_limit", PROPERTY_HINT_RANGE, "0,4096,1"), 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "detect_3d/compress_to", PROPERTY_HINT_ENUM, "Disabled,VRAM Compressed,Basis Universal"), (p_preset == PRESET_DETECT) ? 1 : 0));
- r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "svg/scale", PROPERTY_HINT_RANGE, "0.001,100,0.001"), 1.0));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "svg/scale", PROPERTY_HINT_RANGE, "0.001,100,0.001"), 1.0));
}
void ResourceImporterTexture::save_to_stex_format(FileAccess *f, const Ref<Image> &p_image, CompressMode p_compress_mode, Image::UsedChannels p_channels, Image::CompressMode p_compress_format, float p_lossy_quality, bool p_force_rgbe) {
diff --git a/editor/import/resource_importer_texture_atlas.cpp b/editor/import/resource_importer_texture_atlas.cpp
index 4291d6f2d7..3172cc7279 100644
--- a/editor/import/resource_importer_texture_atlas.cpp
+++ b/editor/import/resource_importer_texture_atlas.cpp
@@ -143,8 +143,8 @@ static void _plot_triangle(Vector2 *vertices, const Vector2 &p_offset, bool p_tr
int px = xi, py = yi;
int sx = px, sy = py;
- sx = CLAMP(sx, 0, src_width);
- sy = CLAMP(sy, 0, src_height);
+ sx = CLAMP(sx, 0, src_width - 1);
+ sy = CLAMP(sy, 0, src_height - 1);
Color color = p_src_image->get_pixel(sx, sy);
if (p_transposed) {
SWAP(px, py);
@@ -165,8 +165,8 @@ static void _plot_triangle(Vector2 *vertices, const Vector2 &p_offset, bool p_tr
for (int xi = (xf < width ? int(xf) : width - 1); xi >= (xt > 0 ? xt : 0); xi--) {
int px = xi, py = yi;
int sx = px, sy = py;
- sx = CLAMP(sx, 0, src_width);
- sy = CLAMP(sy, 0, src_height);
+ sx = CLAMP(sx, 0, src_width - 1);
+ sy = CLAMP(sy, 0, src_height - 1);
Color color = p_src_image->get_pixel(sx, sy);
if (p_transposed) {
SWAP(px, py);
diff --git a/editor/import/resource_importer_wav.cpp b/editor/import/resource_importer_wav.cpp
index b65209d204..71f81051bc 100644
--- a/editor/import/resource_importer_wav.cpp
+++ b/editor/import/resource_importer_wav.cpp
@@ -82,7 +82,7 @@ void ResourceImporterWAV::get_import_options(List<ImportOption> *r_options, int
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "force/8_bit"), false));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "force/mono"), false));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "force/max_rate", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), false));
- r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "force/max_rate_hz", PROPERTY_HINT_EXP_RANGE, "11025,192000,1"), 44100));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "force/max_rate_hz", PROPERTY_HINT_EXP_RANGE, "11025,192000,1"), 44100));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "edit/trim"), false));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "edit/normalize"), false));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "edit/loop"), false));
diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp
index 85356a209f..1f96092bba 100644
--- a/editor/inspector_dock.cpp
+++ b/editor/inspector_dock.cpp
@@ -260,7 +260,7 @@ void InspectorDock::_prepare_history() {
}
}
-void InspectorDock::_select_history(int p_idx) const {
+void InspectorDock::_select_history(int p_idx) {
//push it to the top, it is not correct, but it's more useful
ObjectID id = EditorNode::get_singleton()->get_editor_history()->get_history_obj(p_idx);
Object *obj = ObjectDB::get_instance(id);
@@ -269,7 +269,7 @@ void InspectorDock::_select_history(int p_idx) const {
editor->push_item(obj);
}
-void InspectorDock::_resource_created() const {
+void InspectorDock::_resource_created() {
Object *c = new_resource_dialog->instance_selected();
ERR_FAIL_COND(!c);
@@ -280,7 +280,7 @@ void InspectorDock::_resource_created() const {
editor->push_item(c);
}
-void InspectorDock::_resource_selected(const RES &p_res, const String &p_property) const {
+void InspectorDock::_resource_selected(const RES &p_res, const String &p_property) {
if (p_res.is_null())
return;
diff --git a/editor/inspector_dock.h b/editor/inspector_dock.h
index a7da4bef4c..016aee12cf 100644
--- a/editor/inspector_dock.h
+++ b/editor/inspector_dock.h
@@ -104,13 +104,13 @@ class InspectorDock : public VBoxContainer {
void _paste_resource() const;
void _warning_pressed();
- void _resource_created() const;
- void _resource_selected(const RES &p_res, const String &p_property = "") const;
+ void _resource_created();
+ void _resource_selected(const RES &p_res, const String &p_property = "");
void _edit_forward();
void _edit_back();
void _menu_collapseall();
void _menu_expandall();
- void _select_history(int p_idx) const;
+ void _select_history(int p_idx);
void _prepare_history();
void _property_keyed(const String &p_keyed, const Variant &p_value, bool p_advance);
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index 26c3c21d61..0f2a7376f5 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -38,10 +38,8 @@
#include "editor/animation_track_editor.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
-
-// For onion skinning.
-#include "editor/plugins/canvas_item_editor_plugin.h"
-#include "editor/plugins/spatial_editor_plugin.h"
+#include "editor/plugins/canvas_item_editor_plugin.h" // For onion skinning.
+#include "editor/plugins/spatial_editor_plugin.h" // For onion skinning.
#include "scene/main/viewport.h"
#include "servers/visual_server.h"
@@ -375,8 +373,7 @@ void AnimationPlayerEditor::_animation_save_in_path(const Ref<Resource> &p_resou
Error err = ResourceSaver::save(path, p_resource, flg | ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS);
if (err != OK) {
- accept->set_text(TTR("Error saving resource!"));
- accept->popup_centered_minsize();
+ EditorNode::get_singleton()->show_warning(TTR("Error saving resource!"));
return;
}
@@ -1628,10 +1625,6 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay
scale->set_tooltip(TTR("Scale animation playback globally for the node."));
scale->hide();
- accept = memnew(AcceptDialog);
- add_child(accept);
- accept->connect_compat("confirmed", this, "_menu_confirm_current");
-
delete_dialog = memnew(ConfirmationDialog);
add_child(delete_dialog);
delete_dialog->connect_compat("confirmed", this, "_animation_remove_confirmed");
diff --git a/editor/plugins/animation_player_editor_plugin.h b/editor/plugins/animation_player_editor_plugin.h
index ab9db279d5..40815151a3 100644
--- a/editor/plugins/animation_player_editor_plugin.h
+++ b/editor/plugins/animation_player_editor_plugin.h
@@ -110,7 +110,6 @@ class AnimationPlayerEditor : public VBoxContainer {
float timeline_position;
EditorFileDialog *file;
- AcceptDialog *accept;
ConfirmationDialog *delete_dialog;
int current_option;
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index dfcaf5cdd2..f5cc0ccf2a 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -3100,7 +3100,7 @@ void CanvasItemEditor::_draw_control_helpers(Control *control) {
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);
- FALLTHROUGH;
+ [[fallthrough]];
case DRAG_MOVE:
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);
@@ -3115,7 +3115,7 @@ void CanvasItemEditor::_draw_control_helpers(Control *control) {
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);
- FALLTHROUGH;
+ [[fallthrough]];
case DRAG_MOVE:
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);
@@ -3130,7 +3130,7 @@ void CanvasItemEditor::_draw_control_helpers(Control *control) {
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);
- FALLTHROUGH;
+ [[fallthrough]];
case DRAG_MOVE:
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));
@@ -3145,7 +3145,7 @@ void CanvasItemEditor::_draw_control_helpers(Control *control) {
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);
- FALLTHROUGH;
+ [[fallthrough]];
case DRAG_MOVE:
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));
diff --git a/editor/plugins/cpu_particles_editor_plugin.cpp b/editor/plugins/cpu_particles_editor_plugin.cpp
index 8a73ae1e1f..3d438226d2 100644
--- a/editor/plugins/cpu_particles_editor_plugin.cpp
+++ b/editor/plugins/cpu_particles_editor_plugin.cpp
@@ -51,12 +51,6 @@ void CPUParticlesEditor::_menu_option(int p_option) {
switch (p_option) {
- case MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_MESH: {
-
- emission_file_dialog->popup_centered_ratio();
-
- } break;
-
case MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE: {
emission_tree_dialog->popup_centered_ratio();
@@ -112,7 +106,6 @@ CPUParticlesEditor::CPUParticlesEditor() {
particles_editor_hb->hide();
options->set_text(TTR("CPUParticles"));
- options->get_popup()->add_item(TTR("Create Emission Points From Mesh"), MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_MESH);
options->get_popup()->add_item(TTR("Create Emission Points From Node"), MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE);
options->get_popup()->add_separator();
options->get_popup()->add_item(TTR("Restart"), MENU_OPTION_RESTART);
diff --git a/editor/plugins/cpu_particles_editor_plugin.h b/editor/plugins/cpu_particles_editor_plugin.h
index deaced9ad9..4cf143fc0c 100644
--- a/editor/plugins/cpu_particles_editor_plugin.h
+++ b/editor/plugins/cpu_particles_editor_plugin.h
@@ -41,7 +41,6 @@ class CPUParticlesEditor : public ParticlesEditorBase {
enum Menu {
MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE,
- MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_MESH,
MENU_OPTION_CLEAR_EMISSION_VOLUME,
MENU_OPTION_RESTART
diff --git a/editor/plugins/mesh_instance_editor_plugin.cpp b/editor/plugins/mesh_instance_editor_plugin.cpp
index 182a8600e4..37cf16de58 100644
--- a/editor/plugins/mesh_instance_editor_plugin.cpp
+++ b/editor/plugins/mesh_instance_editor_plugin.cpp
@@ -455,7 +455,7 @@ MeshInstanceEditor::MeshInstanceEditor() {
options->get_popup()->add_separator();
options->get_popup()->add_item(TTR("Create Trimesh Collision Sibling"), MENU_OPTION_CREATE_TRIMESH_COLLISION_SHAPE);
options->get_popup()->set_item_tooltip(options->get_popup()->get_item_count() - 1, TTR("Creates a polygon-based collision shape.\nThis is the most accurate (but slowest) option for collision detection."));
- options->get_popup()->add_item(TTR("Create Single Convex Collision Siblings"), MENU_OPTION_CREATE_SINGLE_CONVEX_COLLISION_SHAPE);
+ options->get_popup()->add_item(TTR("Create Single Convex Collision Sibling"), MENU_OPTION_CREATE_SINGLE_CONVEX_COLLISION_SHAPE);
options->get_popup()->set_item_tooltip(options->get_popup()->get_item_count() - 1, TTR("Creates a single convex collision shape.\nThis is the fastest (but least accurate) option for collision detection."));
options->get_popup()->add_item(TTR("Create Multiple Convex Collision Siblings"), MENU_OPTION_CREATE_MULTIPLE_CONVEX_COLLISION_SHAPES);
options->get_popup()->set_item_tooltip(options->get_popup()->get_item_count() - 1, TTR("Creates a polygon-based collision shape.\nThis is a performance middle-ground between the two above options."));
diff --git a/editor/plugins/particles_editor_plugin.cpp b/editor/plugins/particles_editor_plugin.cpp
index cea2182ae9..7020abc301 100644
--- a/editor/plugins/particles_editor_plugin.cpp
+++ b/editor/plugins/particles_editor_plugin.cpp
@@ -231,23 +231,9 @@ ParticlesEditorBase::ParticlesEditorBase() {
emission_dialog->get_ok()->set_text(TTR("Create"));
emission_dialog->connect_compat("confirmed", this, "_generate_emission_points");
- emission_file_dialog = memnew(EditorFileDialog);
- add_child(emission_file_dialog);
- emission_file_dialog->connect_compat("file_selected", this, "_resource_seleted");
emission_tree_dialog = memnew(SceneTreeDialog);
add_child(emission_tree_dialog);
emission_tree_dialog->connect_compat("selected", this, "_node_selected");
-
- List<String> extensions;
- ResourceLoader::get_recognized_extensions_for_type("Mesh", &extensions);
-
- emission_file_dialog->clear_filters();
- for (int i = 0; i < extensions.size(); i++) {
-
- emission_file_dialog->add_filter("*." + extensions[i] + " ; " + extensions[i].to_upper());
- }
-
- emission_file_dialog->set_mode(EditorFileDialog::MODE_OPEN_FILE);
}
void ParticlesEditor::_node_removed(Node *p_node) {
@@ -279,17 +265,6 @@ void ParticlesEditor::_menu_option(int p_option) {
generate_seconds->set_value(trunc(gen_time) + 1.0);
generate_aabb->popup_centered_minsize();
} break;
- case MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_MESH: {
-
- Ref<ParticlesMaterial> material = node->get_process_material();
- if (material.is_null()) {
- EditorNode::get_singleton()->show_warning(TTR("A processor material of type 'ParticlesMaterial' is required."));
- return;
- }
- emission_file_dialog->popup_centered_ratio();
-
- } break;
-
case MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE: {
Ref<ParticlesMaterial> material = node->get_process_material();
if (material.is_null()) {
@@ -467,7 +442,6 @@ ParticlesEditor::ParticlesEditor() {
options->set_text(TTR("Particles"));
options->get_popup()->add_item(TTR("Generate AABB"), MENU_OPTION_GENERATE_AABB);
options->get_popup()->add_separator();
- options->get_popup()->add_item(TTR("Create Emission Points From Mesh"), MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_MESH);
options->get_popup()->add_item(TTR("Create Emission Points From Node"), MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE);
options->get_popup()->add_separator();
options->get_popup()->add_item(TTR("Convert to CPUParticles"), MENU_OPTION_CONVERT_TO_CPU_PARTICLES);
diff --git a/editor/plugins/particles_editor_plugin.h b/editor/plugins/particles_editor_plugin.h
index 5419b7d3d5..fb5ce17560 100644
--- a/editor/plugins/particles_editor_plugin.h
+++ b/editor/plugins/particles_editor_plugin.h
@@ -46,7 +46,6 @@ protected:
MenuButton *options;
HBoxContainer *particles_editor_hb;
- EditorFileDialog *emission_file_dialog;
SceneTreeDialog *emission_tree_dialog;
ConfirmationDialog *emission_dialog;
@@ -77,7 +76,6 @@ class ParticlesEditor : public ParticlesEditorBase {
MENU_OPTION_GENERATE_AABB,
MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE,
- MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_MESH,
MENU_OPTION_CLEAR_EMISSION_VOLUME,
MENU_OPTION_CONVERT_TO_CPU_PARTICLES,
MENU_OPTION_RESTART,
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index c0928ba79b..9dc98dc2a0 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -214,7 +214,7 @@ void ScriptEditorQuickOpen::_notification(int p_what) {
connect_compat("confirmed", this, "_confirmed");
search_box->set_clear_button_enabled(true);
- FALLTHROUGH;
+ [[fallthrough]];
}
case NOTIFICATION_THEME_CHANGED: {
search_box->set_right_icon(get_icon("Search", "EditorIcons"));
@@ -900,7 +900,7 @@ void ScriptEditor::_file_dialog_action(String p_file) {
}
file->close();
memdelete(file);
- FALLTHROUGH;
+ [[fallthrough]];
}
case FILE_OPEN: {
@@ -1396,7 +1396,7 @@ void ScriptEditor::_notification(int p_what) {
script_split->connect_compat("dragged", this, "_script_split_dragged");
EditorSettings::get_singleton()->connect_compat("settings_changed", this, "_editor_settings_changed");
- FALLTHROUGH;
+ [[fallthrough]];
}
case NOTIFICATION_THEME_CHANGED: {
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 4986e60ff0..4e0787c805 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -307,8 +307,10 @@ void ScriptTextEditor::_set_theme_for_script() {
text_edit->add_keyword_color("Dictionary", basetype_color);
text_edit->add_keyword_color("Array", basetype_color);
text_edit->add_keyword_color("PackedByteArray", basetype_color);
- text_edit->add_keyword_color("PackedIntArray", basetype_color);
- text_edit->add_keyword_color("PackedRealArray", basetype_color);
+ text_edit->add_keyword_color("PackedInt32Array", basetype_color);
+ text_edit->add_keyword_color("PackedFloat32Array", basetype_color);
+ text_edit->add_keyword_color("PackedInt64Array", basetype_color);
+ text_edit->add_keyword_color("PackedFloat64Array", basetype_color);
text_edit->add_keyword_color("PackedStringArray", basetype_color);
text_edit->add_keyword_color("PackedVector2Array", basetype_color);
text_edit->add_keyword_color("PackedVector3Array", basetype_color);
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp
index 6e8eeaec82..4c8a0590fd 100644
--- a/editor/plugins/spatial_editor_plugin.cpp
+++ b/editor/plugins/spatial_editor_plugin.cpp
@@ -6042,7 +6042,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
EDITOR_DEF("editors/3d/manipulator_gizmo_size", 80);
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "editors/3d/manipulator_gizmo_size", PROPERTY_HINT_RANGE, "16,1024,1"));
EDITOR_DEF("editors/3d/manipulator_gizmo_opacity", 0.4);
- EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::REAL, "editors/3d/manipulator_gizmo_opacity", PROPERTY_HINT_RANGE, "0,1,0.01"));
+ EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::FLOAT, "editors/3d/manipulator_gizmo_opacity", PROPERTY_HINT_RANGE, "0,1,0.01"));
over_gizmo_handle = -1;
}
diff --git a/editor/plugins/sprite_editor_plugin.cpp b/editor/plugins/sprite_editor_plugin.cpp
index 92bdbdd733..c35afa0644 100644
--- a/editor/plugins/sprite_editor_plugin.cpp
+++ b/editor/plugins/sprite_editor_plugin.cpp
@@ -376,7 +376,7 @@ void SpriteEditor::_convert_to_polygon_2d_node() {
Vector<Vector2> outline = computed_outline_lines[i];
Vector<Vector2> uv_outline = outline_lines[i];
- PackedIntArray pia;
+ PackedInt32Array pia;
pia.resize(outline.size());
int *pia_write = pia.ptrw();
diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp
index 81f2a222da..c80ba873fb 100644
--- a/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -234,7 +234,7 @@ void SpriteFramesEditor::_notification(int p_what) {
_delete->set_icon(get_icon("Remove", "EditorIcons"));
new_anim->set_icon(get_icon("New", "EditorIcons"));
remove_anim->set_icon(get_icon("Remove", "EditorIcons"));
- FALLTHROUGH;
+ [[fallthrough]];
}
case NOTIFICATION_THEME_CHANGED: {
splite_sheet_scroll->add_style_override("bg", get_stylebox("bg", "Tree"));
diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp
index a7115fc9a2..10d00b2a1d 100644
--- a/editor/plugins/tile_map_editor_plugin.cpp
+++ b/editor/plugins/tile_map_editor_plugin.cpp
@@ -55,7 +55,7 @@ void TileMapEditor::_notification(int p_what) {
if (is_visible_in_tree()) {
_update_palette();
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case NOTIFICATION_ENTER_TREE: {
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp
index 02c3709766..a61b291029 100644
--- a/editor/plugins/tile_set_editor_plugin.cpp
+++ b/editor/plugins/tile_set_editor_plugin.cpp
@@ -3507,7 +3507,7 @@ void TilesetEditorContext::_get_property_list(List<PropertyInfo> *p_list) const
p_list->push_back(PropertyInfo(Variant::OBJECT, "selected_collision", PROPERTY_HINT_RESOURCE_TYPE, tileset_editor->edited_collision_shape->get_class()));
if (tileset_editor->edited_collision_shape.is_valid()) {
p_list->push_back(PropertyInfo(Variant::BOOL, "selected_collision_one_way", PROPERTY_HINT_NONE));
- p_list->push_back(PropertyInfo(Variant::REAL, "selected_collision_one_way_margin", PROPERTY_HINT_NONE));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "selected_collision_one_way_margin", PROPERTY_HINT_NONE));
}
}
if (tileset_editor->edit_mode == TileSetEditor::EDITMODE_NAVIGATION && tileset_editor->edited_navigation_shape.is_valid()) {
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index e228f25c62..2fb23f6a84 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -35,6 +35,7 @@
#include "core/os/input.h"
#include "core/os/keyboard.h"
#include "core/project_settings.h"
+#include "core/version.h"
#include "editor/editor_log.h"
#include "editor/editor_properties.h"
#include "editor/editor_scale.h"
@@ -75,6 +76,12 @@ void VisualShaderEditor::edit(VisualShader *p_visual_shader) {
if (!visual_shader->is_connected_compat("changed", this, "_update_preview")) {
visual_shader->connect_compat("changed", this, "_update_preview");
}
+#ifndef DISABLE_DEPRECATED
+ String version = VERSION_BRANCH;
+ if (visual_shader->get_version() != version) {
+ visual_shader->update_version(version);
+ }
+#endif
visual_shader->set_graph_offset(graph->get_scroll_ofs() / EDSCALE);
} else {
if (visual_shader.is_valid()) {
@@ -380,6 +387,9 @@ void VisualShaderEditor::_update_options_menu() {
case VisualShaderNode::PORT_TYPE_SCALAR:
item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_icon("float", "EditorIcons"));
break;
+ case VisualShaderNode::PORT_TYPE_SCALAR_INT:
+ item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_icon("int", "EditorIcons"));
+ break;
case VisualShaderNode::PORT_TYPE_VECTOR:
item->set_icon(0, EditorNode::get_singleton()->get_gui_base()->get_icon("Vector3", "EditorIcons"));
break;
@@ -428,14 +438,22 @@ void VisualShaderEditor::_update_created_node(GraphNode *node) {
if (EditorSettings::get_singleton()->get("interface/theme/use_graph_node_headers")) {
Ref<StyleBoxFlat> sb = node->get_stylebox("frame", "GraphNode");
Color c = sb->get_border_color();
- Color mono_color = ((c.r + c.g + c.b) / 3) < 0.7 ? Color(1.0, 1.0, 1.0) : Color(0.0, 0.0, 0.0);
+ Color ic;
+ Color mono_color;
+ if (((c.r + c.g + c.b) / 3) < 0.7) {
+ mono_color = Color(1.0, 1.0, 1.0);
+ ic = Color(0.0, 0.0, 0.0, 0.7);
+ } else {
+ mono_color = Color(0.0, 0.0, 0.0);
+ ic = Color(1.0, 1.0, 1.0, 0.7);
+ }
mono_color.a = 0.85;
c = mono_color;
node->add_color_override("title_color", c);
c.a = 0.7;
node->add_color_override("close_color", c);
- node->add_color_override("resizer_color", c);
+ node->add_color_override("resizer_color", ic);
}
}
@@ -462,12 +480,13 @@ void VisualShaderEditor::_update_graph() {
}
}
- static const Color type_color[5] = {
- Color(0.38, 0.85, 0.96), // scalar
+ static const Color type_color[6] = {
+ Color(0.38, 0.85, 0.96), // scalar (float)
+ Color(0.49, 0.78, 0.94), // scalar (int)
Color(0.84, 0.49, 0.93), // vector
Color(0.55, 0.65, 0.94), // boolean
Color(0.96, 0.66, 0.43), // transform
- Color(1.0, 1.0, 0.0) // sampler
+ Color(1.0, 1.0, 0.0), // sampler
};
List<VisualShader::Connection> connections;
@@ -528,7 +547,8 @@ void VisualShaderEditor::_update_graph() {
}
Ref<VisualShaderNodeUniform> uniform = vsnode;
- Ref<VisualShaderNodeScalarUniform> scalar_uniform = vsnode;
+ Ref<VisualShaderNodeFloatUniform> float_uniform = vsnode;
+ Ref<VisualShaderNodeIntUniform> int_uniform = vsnode;
if (uniform.is_valid()) {
graph->add_child(node);
_update_created_node(node);
@@ -543,7 +563,7 @@ void VisualShaderEditor::_update_graph() {
//shortcut
VisualShaderNode::PortType port_right = vsnode->get_output_port_type(0);
node->set_slot(0, false, VisualShaderNode::PORT_TYPE_SCALAR, Color(), true, port_right, type_color[port_right]);
- if (!scalar_uniform.is_valid()) {
+ if (!float_uniform.is_valid() && !int_uniform.is_valid()) {
continue;
}
}
@@ -557,13 +577,13 @@ void VisualShaderEditor::_update_graph() {
}
}
- if (custom_editor && !scalar_uniform.is_valid() && vsnode->get_output_port_count() > 0 && vsnode->get_output_port_name(0) == "" && (vsnode->get_input_port_count() == 0 || vsnode->get_input_port_name(0) == "")) {
+ if (custom_editor && !float_uniform.is_valid() && !int_uniform.is_valid() && vsnode->get_output_port_count() > 0 && vsnode->get_output_port_name(0) == "" && (vsnode->get_input_port_count() == 0 || vsnode->get_input_port_name(0) == "")) {
//will be embedded in first port
} else if (custom_editor) {
port_offset++;
node->add_child(custom_editor);
- if (scalar_uniform.is_valid()) {
+ if (float_uniform.is_valid() || int_uniform.is_valid()) {
custom_editor->call_deferred("_show_prop_names", true);
continue;
}
@@ -648,7 +668,7 @@ void VisualShaderEditor::_update_graph() {
button->set_text(((bool)default_value) ? "true" : "false");
} break;
case Variant::INT:
- case Variant::REAL: {
+ case Variant::FLOAT: {
button->set_text(String::num(default_value, 4));
} break;
case Variant::VECTOR3: {
@@ -670,7 +690,8 @@ void VisualShaderEditor::_update_graph() {
if (is_group) {
OptionButton *type_box = memnew(OptionButton);
hb->add_child(type_box);
- type_box->add_item(TTR("Scalar"));
+ type_box->add_item(TTR("Float"));
+ type_box->add_item(TTR("Int"));
type_box->add_item(TTR("Vector"));
type_box->add_item(TTR("Boolean"));
type_box->add_item(TTR("Transform"));
@@ -732,7 +753,8 @@ void VisualShaderEditor::_update_graph() {
OptionButton *type_box = memnew(OptionButton);
hb->add_child(type_box);
- type_box->add_item(TTR("Scalar"));
+ type_box->add_item(TTR("Float"));
+ type_box->add_item(TTR("Int"));
type_box->add_item(TTR("Vector"));
type_box->add_item(TTR("Boolean"));
type_box->add_item(TTR("Transform"));
@@ -1295,7 +1317,7 @@ VisualShaderNode *VisualShaderEditor::_add_node(int p_idx, int p_op_idx) {
VisualShaderNode *vsn = Object::cast_to<VisualShaderNode>(ClassDB::instance(add_options[p_idx].type));
ERR_FAIL_COND_V(!vsn, NULL);
- VisualShaderNodeScalarConstant *constant = Object::cast_to<VisualShaderNodeScalarConstant>(vsn);
+ VisualShaderNodeFloatConstant *constant = Object::cast_to<VisualShaderNodeFloatConstant>(vsn);
if (constant) {
if ((int)add_options[p_idx].value != -1)
@@ -1334,16 +1356,28 @@ VisualShaderNode *VisualShaderEditor::_add_node(int p_idx, int p_op_idx) {
colorFunc->set_function((VisualShaderNodeColorFunc::Function)p_op_idx);
}
- VisualShaderNodeScalarOp *scalarOp = Object::cast_to<VisualShaderNodeScalarOp>(vsn);
+ VisualShaderNodeFloatOp *floatOp = Object::cast_to<VisualShaderNodeFloatOp>(vsn);
+
+ if (floatOp) {
+ floatOp->set_operator((VisualShaderNodeFloatOp::Operator)p_op_idx);
+ }
+
+ VisualShaderNodeIntOp *intOp = Object::cast_to<VisualShaderNodeIntOp>(vsn);
+
+ if (intOp) {
+ intOp->set_operator((VisualShaderNodeIntOp::Operator)p_op_idx);
+ }
+
+ VisualShaderNodeFloatFunc *floatFunc = Object::cast_to<VisualShaderNodeFloatFunc>(vsn);
- if (scalarOp) {
- scalarOp->set_operator((VisualShaderNodeScalarOp::Operator)p_op_idx);
+ if (floatFunc) {
+ floatFunc->set_function((VisualShaderNodeFloatFunc::Function)p_op_idx);
}
- VisualShaderNodeScalarFunc *scalarFunc = Object::cast_to<VisualShaderNodeScalarFunc>(vsn);
+ VisualShaderNodeIntFunc *intFunc = Object::cast_to<VisualShaderNodeIntFunc>(vsn);
- if (scalarFunc) {
- scalarFunc->set_function((VisualShaderNodeScalarFunc::Function)p_op_idx);
+ if (intFunc) {
+ intFunc->set_function((VisualShaderNodeIntFunc::Function)p_op_idx);
}
VisualShaderNodeVectorOp *vecOp = Object::cast_to<VisualShaderNodeVectorOp>(vsn);
@@ -1575,8 +1609,29 @@ void VisualShaderEditor::_graph_gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseButton> mb = p_event;
- if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == BUTTON_RIGHT)
- _show_members_dialog(true);
+ if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == BUTTON_RIGHT) {
+ List<int> to_change;
+ for (int i = 0; i < graph->get_child_count(); i++) {
+ GraphNode *gn = Object::cast_to<GraphNode>(graph->get_child(i));
+ if (gn) {
+ if (gn->is_selected() && gn->is_close_button_visible()) {
+ to_change.push_back(gn->get_name().operator String().to_int());
+ }
+ }
+ }
+ if (to_change.empty() && copy_nodes_buffer.empty()) {
+ _show_members_dialog(true);
+ } else {
+ popup_menu->set_item_disabled(NodeMenuOptions::COPY, to_change.empty());
+ popup_menu->set_item_disabled(NodeMenuOptions::PASTE, copy_nodes_buffer.empty());
+ popup_menu->set_item_disabled(NodeMenuOptions::DELETE, to_change.empty());
+ popup_menu->set_item_disabled(NodeMenuOptions::DUPLICATE, to_change.empty());
+ menu_point = graph->get_local_mouse_position();
+ Point2 gpos = Input::get_singleton()->get_mouse_position();
+ popup_menu->set_position(gpos);
+ popup_menu->popup();
+ }
+ }
}
void VisualShaderEditor::_show_members_dialog(bool at_mouse_pos) {
@@ -1874,7 +1929,7 @@ void VisualShaderEditor::_copy_nodes() {
_dup_copy_nodes(copy_type, copy_nodes_buffer, copy_nodes_excluded_buffer);
}
-void VisualShaderEditor::_paste_nodes() {
+void VisualShaderEditor::_paste_nodes(bool p_use_custom_position, const Vector2 &p_custom_position) {
if (copy_nodes_buffer.empty())
return;
@@ -1885,12 +1940,19 @@ void VisualShaderEditor::_paste_nodes() {
float scale = graph->get_zoom();
- _dup_paste_nodes(type, copy_type, copy_nodes_buffer, copy_nodes_excluded_buffer, (graph->get_scroll_ofs() / scale + graph->get_local_mouse_position() / scale - selection_center), false);
+ Vector2 mpos;
+ if (p_use_custom_position) {
+ mpos = p_custom_position;
+ } else {
+ mpos = graph->get_local_mouse_position();
+ }
+
+ _dup_paste_nodes(type, copy_type, copy_nodes_buffer, copy_nodes_excluded_buffer, (graph->get_scroll_ofs() / scale + mpos / scale - selection_center), false);
_dup_update_excluded(type, copy_nodes_excluded_buffer); // to prevent selection of previous copies at new paste
}
-void VisualShaderEditor::_on_nodes_delete() {
+void VisualShaderEditor::_delete_nodes() {
VisualShader::Type type = VisualShader::Type(edit_type->get_selected());
List<int> to_erase;
@@ -2076,6 +2138,26 @@ void VisualShaderEditor::_tools_menu_option(int p_idx) {
}
}
+void VisualShaderEditor::_node_menu_id_pressed(int p_idx) {
+ switch (p_idx) {
+ case NodeMenuOptions::ADD:
+ _show_members_dialog(true);
+ break;
+ case NodeMenuOptions::COPY:
+ _copy_nodes();
+ break;
+ case NodeMenuOptions::PASTE:
+ _paste_nodes(true, menu_point);
+ break;
+ case NodeMenuOptions::DELETE:
+ _delete_nodes();
+ break;
+ case NodeMenuOptions::DUPLICATE:
+ _duplicate_nodes();
+ break;
+ }
+}
+
Variant VisualShaderEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
if (p_from == members) {
@@ -2214,7 +2296,7 @@ void VisualShaderEditor::_bind_methods() {
ClassDB::bind_method("_node_selected", &VisualShaderEditor::_node_selected);
ClassDB::bind_method("_scroll_changed", &VisualShaderEditor::_scroll_changed);
ClassDB::bind_method("_delete_request", &VisualShaderEditor::_delete_request);
- ClassDB::bind_method("_on_nodes_delete", &VisualShaderEditor::_on_nodes_delete);
+ ClassDB::bind_method("_delete_nodes", &VisualShaderEditor::_delete_nodes);
ClassDB::bind_method("_node_changed", &VisualShaderEditor::_node_changed);
ClassDB::bind_method("_edit_port_default_input", &VisualShaderEditor::_edit_port_default_input);
ClassDB::bind_method("_port_edited", &VisualShaderEditor::_port_edited);
@@ -2257,6 +2339,8 @@ void VisualShaderEditor::_bind_methods() {
ClassDB::bind_method("_member_unselected", &VisualShaderEditor::_member_unselected);
ClassDB::bind_method("_member_create", &VisualShaderEditor::_member_create);
ClassDB::bind_method("_member_cancel", &VisualShaderEditor::_member_cancel);
+
+ ClassDB::bind_method("_node_menu_id_pressed", &VisualShaderEditor::_node_menu_id_pressed);
}
VisualShaderEditor *VisualShaderEditor::singleton = NULL;
@@ -2290,6 +2374,7 @@ VisualShaderEditor::VisualShaderEditor() {
main_box->add_child(graph);
graph->set_drag_forwarding(this);
graph->add_valid_right_disconnect_type(VisualShaderNode::PORT_TYPE_SCALAR);
+ graph->add_valid_right_disconnect_type(VisualShaderNode::PORT_TYPE_SCALAR_INT);
graph->add_valid_right_disconnect_type(VisualShaderNode::PORT_TYPE_BOOLEAN);
graph->add_valid_right_disconnect_type(VisualShaderNode::PORT_TYPE_VECTOR);
graph->add_valid_right_disconnect_type(VisualShaderNode::PORT_TYPE_TRANSFORM);
@@ -2303,17 +2388,24 @@ VisualShaderEditor::VisualShaderEditor() {
graph->connect_compat("duplicate_nodes_request", this, "_duplicate_nodes");
graph->connect_compat("copy_nodes_request", this, "_copy_nodes");
graph->connect_compat("paste_nodes_request", this, "_paste_nodes");
- graph->connect_compat("delete_nodes_request", this, "_on_nodes_delete");
+ graph->connect_compat("delete_nodes_request", this, "_delete_nodes");
graph->connect_compat("gui_input", this, "_graph_gui_input");
graph->connect_compat("connection_to_empty", this, "_connection_to_empty");
graph->connect_compat("connection_from_empty", this, "_connection_from_empty");
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR, VisualShaderNode::PORT_TYPE_SCALAR);
+ graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR, VisualShaderNode::PORT_TYPE_SCALAR_INT);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR, VisualShaderNode::PORT_TYPE_VECTOR);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR, VisualShaderNode::PORT_TYPE_BOOLEAN);
+ graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR_INT, VisualShaderNode::PORT_TYPE_SCALAR_INT);
+ graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR_INT, VisualShaderNode::PORT_TYPE_SCALAR);
+ graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR_INT, VisualShaderNode::PORT_TYPE_VECTOR);
+ graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_SCALAR_INT, VisualShaderNode::PORT_TYPE_BOOLEAN);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_VECTOR, VisualShaderNode::PORT_TYPE_SCALAR);
+ graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_VECTOR, VisualShaderNode::PORT_TYPE_SCALAR_INT);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_VECTOR, VisualShaderNode::PORT_TYPE_VECTOR);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_VECTOR, VisualShaderNode::PORT_TYPE_BOOLEAN);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_BOOLEAN, VisualShaderNode::PORT_TYPE_SCALAR);
+ graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_BOOLEAN, VisualShaderNode::PORT_TYPE_SCALAR_INT);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_BOOLEAN, VisualShaderNode::PORT_TYPE_VECTOR);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_BOOLEAN, VisualShaderNode::PORT_TYPE_BOOLEAN);
graph->add_valid_connection_type(VisualShaderNode::PORT_TYPE_TRANSFORM, VisualShaderNode::PORT_TYPE_TRANSFORM);
@@ -2365,6 +2457,20 @@ VisualShaderEditor::VisualShaderEditor() {
error_text->set_visible(false);
///////////////////////////////////////
+ // POPUP MENU
+ ///////////////////////////////////////
+
+ popup_menu = memnew(PopupMenu);
+ add_child(popup_menu);
+ popup_menu->add_item("Add Node", NodeMenuOptions::ADD);
+ popup_menu->add_separator();
+ popup_menu->add_item("Copy", NodeMenuOptions::COPY);
+ popup_menu->add_item("Paste", NodeMenuOptions::PASTE);
+ popup_menu->add_item("Delete", NodeMenuOptions::DELETE);
+ popup_menu->add_item("Duplicate", NodeMenuOptions::DUPLICATE);
+ popup_menu->connect_compat("id_pressed", this, "_node_menu_id_pressed");
+
+ ///////////////////////////////////////
// SHADER NODES TREE
///////////////////////////////////////
@@ -2602,7 +2708,7 @@ VisualShaderEditor::VisualShaderEditor() {
add_options.push_back(AddOption("CustomAlpha", "Input", "Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "custom_alpha"), "custom_alpha", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES));
add_options.push_back(AddOption("Delta", "Input", "Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "delta"), "delta", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES));
add_options.push_back(AddOption("EmissionTransform", "Input", "Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "emission_transform"), "emission_transform", VisualShaderNode::PORT_TYPE_TRANSFORM, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES));
- add_options.push_back(AddOption("Index", "Input", "Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "index"), "index", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES));
+ add_options.push_back(AddOption("Index", "Input", "Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "index"), "index", VisualShaderNode::PORT_TYPE_SCALAR_INT, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES));
add_options.push_back(AddOption("LifeTime", "Input", "Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "lifetime"), "lifetime", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES));
add_options.push_back(AddOption("Restart", "Input", "Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "restart"), "restart", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES));
add_options.push_back(AddOption("Time", "Input", "Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_shader_mode, "time"), "time", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES));
@@ -2611,71 +2717,84 @@ VisualShaderEditor::VisualShaderEditor() {
// SCALAR
- add_options.push_back(AddOption("ScalarFunc", "Scalar", "Common", "VisualShaderNodeScalarFunc", TTR("Scalar function."), -1, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("ScalarOp", "Scalar", "Common", "VisualShaderNodeScalarOp", TTR("Scalar operator."), -1, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("FloatFunc", "Scalar", "Common", "VisualShaderNodeFloatFunc", TTR("Float function."), -1, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("IntFunc", "Scalar", "Common", "VisualShaderNodeIntFunc", TTR("Integer function."), -1, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("FloatOp", "Scalar", "Common", "VisualShaderNodeFloatOp", TTR("Float operator."), -1, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("IntOp", "Scalar", "Common", "VisualShaderNodeIntOp", TTR("Integer operator."), -1, VisualShaderNode::PORT_TYPE_SCALAR_INT));
//CONSTANTS
- add_options.push_back(AddOption("E", "Scalar", "Constants", "VisualShaderNodeScalarConstant", TTR("E constant (2.718282). Represents the base of the natural logarithm."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_E));
- add_options.push_back(AddOption("Epsilon", "Scalar", "Constants", "VisualShaderNodeScalarConstant", TTR("Epsilon constant (0.00001). Smallest possible scalar number."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, CMP_EPSILON));
- add_options.push_back(AddOption("Phi", "Scalar", "Constants", "VisualShaderNodeScalarConstant", TTR("Phi constant (1.618034). Golden ratio."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, 1.618034f));
- add_options.push_back(AddOption("Pi/4", "Scalar", "Constants", "VisualShaderNodeScalarConstant", TTR("Pi/4 constant (0.785398) or 45 degrees."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_PI / 4));
- add_options.push_back(AddOption("Pi/2", "Scalar", "Constants", "VisualShaderNodeScalarConstant", TTR("Pi/2 constant (1.570796) or 90 degrees."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_PI / 2));
- add_options.push_back(AddOption("Pi", "Scalar", "Constants", "VisualShaderNodeScalarConstant", TTR("Pi constant (3.141593) or 180 degrees."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_PI));
- add_options.push_back(AddOption("Tau", "Scalar", "Constants", "VisualShaderNodeScalarConstant", TTR("Tau constant (6.283185) or 360 degrees."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_TAU));
- add_options.push_back(AddOption("Sqrt2", "Scalar", "Constants", "VisualShaderNodeScalarConstant", TTR("Sqrt2 constant (1.414214). Square root of 2."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_SQRT2));
+ add_options.push_back(AddOption("E", "Scalar", "Constants", "VisualShaderNodeFloatConstant", TTR("E constant (2.718282). Represents the base of the natural logarithm."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_E));
+ add_options.push_back(AddOption("Epsilon", "Scalar", "Constants", "VisualShaderNodeFloatConstant", TTR("Epsilon constant (0.00001). Smallest possible scalar number."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, CMP_EPSILON));
+ add_options.push_back(AddOption("Phi", "Scalar", "Constants", "VisualShaderNodeFloatConstant", TTR("Phi constant (1.618034). Golden ratio."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, 1.618034f));
+ add_options.push_back(AddOption("Pi/4", "Scalar", "Constants", "VisualShaderNodeFloatConstant", TTR("Pi/4 constant (0.785398) or 45 degrees."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_PI / 4));
+ add_options.push_back(AddOption("Pi/2", "Scalar", "Constants", "VisualShaderNodeFloatConstant", TTR("Pi/2 constant (1.570796) or 90 degrees."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_PI / 2));
+ add_options.push_back(AddOption("Pi", "Scalar", "Constants", "VisualShaderNodeFloatConstant", TTR("Pi constant (3.141593) or 180 degrees."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_PI));
+ add_options.push_back(AddOption("Tau", "Scalar", "Constants", "VisualShaderNodeFloatConstant", TTR("Tau constant (6.283185) or 360 degrees."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_TAU));
+ add_options.push_back(AddOption("Sqrt2", "Scalar", "Constants", "VisualShaderNodeFloatConstant", TTR("Sqrt2 constant (1.414214). Square root of 2."), -1, VisualShaderNode::PORT_TYPE_SCALAR, -1, -1, Math_SQRT2));
// FUNCTIONS
- add_options.push_back(AddOption("Abs", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the absolute value of the parameter."), VisualShaderNodeScalarFunc::FUNC_ABS, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("ACos", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the arc-cosine of the parameter."), VisualShaderNodeScalarFunc::FUNC_ACOS, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("ACosH", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the inverse hyperbolic cosine of the parameter."), VisualShaderNodeScalarFunc::FUNC_ACOSH, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("ASin", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the arc-sine of the parameter."), VisualShaderNodeScalarFunc::FUNC_ASIN, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("ASinH", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the inverse hyperbolic sine of the parameter."), VisualShaderNodeScalarFunc::FUNC_ASINH, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("ATan", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the arc-tangent of the parameter."), VisualShaderNodeScalarFunc::FUNC_ATAN, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("ATan2", "Scalar", "Functions", "VisualShaderNodeScalarOp", TTR("Returns the arc-tangent of the parameters."), VisualShaderNodeScalarOp::OP_ATAN2, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("ATanH", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the inverse hyperbolic tangent of the parameter."), VisualShaderNodeScalarFunc::FUNC_ATANH, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Ceil", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Finds the nearest integer that is greater than or equal to the parameter."), VisualShaderNodeScalarFunc::FUNC_CEIL, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Abs", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the absolute value of the parameter."), VisualShaderNodeFloatFunc::FUNC_ABS, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Abs", "Scalar", "Functions", "VisualShaderNodeIntFunc", TTR("Returns the absolute value of the parameter."), VisualShaderNodeIntFunc::FUNC_ABS, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("ACos", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the arc-cosine of the parameter."), VisualShaderNodeFloatFunc::FUNC_ACOS, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("ACosH", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the inverse hyperbolic cosine of the parameter."), VisualShaderNodeFloatFunc::FUNC_ACOSH, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("ASin", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the arc-sine of the parameter."), VisualShaderNodeFloatFunc::FUNC_ASIN, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("ASinH", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the inverse hyperbolic sine of the parameter."), VisualShaderNodeFloatFunc::FUNC_ASINH, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("ATan", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the arc-tangent of the parameter."), VisualShaderNodeFloatFunc::FUNC_ATAN, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("ATan2", "Scalar", "Functions", "VisualShaderNodeFloatOp", TTR("Returns the arc-tangent of the parameters."), VisualShaderNodeFloatOp::OP_ATAN2, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("ATanH", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the inverse hyperbolic tangent of the parameter."), VisualShaderNodeFloatFunc::FUNC_ATANH, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Ceil", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Finds the nearest integer that is greater than or equal to the parameter."), VisualShaderNodeFloatFunc::FUNC_CEIL, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("Clamp", "Scalar", "Functions", "VisualShaderNodeScalarClamp", TTR("Constrains a value to lie between two further values."), -1, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Cos", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the cosine of the parameter."), VisualShaderNodeScalarFunc::FUNC_COS, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("CosH", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the hyperbolic cosine of the parameter."), VisualShaderNodeScalarFunc::FUNC_COSH, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Degrees", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Converts a quantity in radians to degrees."), VisualShaderNodeScalarFunc::FUNC_DEGREES, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Exp", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Base-e Exponential."), VisualShaderNodeScalarFunc::FUNC_EXP, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Exp2", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Base-2 Exponential."), VisualShaderNodeScalarFunc::FUNC_EXP2, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Floor", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Finds the nearest integer less than or equal to the parameter."), VisualShaderNodeScalarFunc::FUNC_FLOOR, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Fract", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Computes the fractional part of the argument."), VisualShaderNodeScalarFunc::FUNC_FRAC, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("InverseSqrt", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the inverse of the square root of the parameter."), VisualShaderNodeScalarFunc::FUNC_INVERSE_SQRT, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Log", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Natural logarithm."), VisualShaderNodeScalarFunc::FUNC_LOG, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Log2", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Base-2 logarithm."), VisualShaderNodeScalarFunc::FUNC_LOG2, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Max", "Scalar", "Functions", "VisualShaderNodeScalarOp", TTR("Returns the greater of two values."), VisualShaderNodeScalarOp::OP_MAX, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Min", "Scalar", "Functions", "VisualShaderNodeScalarOp", TTR("Returns the lesser of two values."), VisualShaderNodeScalarOp::OP_MIN, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Clamp", "Scalar", "Functions", "VisualShaderNodeIntFunc", TTR("Constrains a value to lie between two further values."), VisualShaderNodeIntFunc::FUNC_CLAMP, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("Cos", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the cosine of the parameter."), VisualShaderNodeFloatFunc::FUNC_COS, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("CosH", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the hyperbolic cosine of the parameter."), VisualShaderNodeFloatFunc::FUNC_COSH, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Degrees", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Converts a quantity in radians to degrees."), VisualShaderNodeFloatFunc::FUNC_DEGREES, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Exp", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Base-e Exponential."), VisualShaderNodeFloatFunc::FUNC_EXP, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Exp2", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Base-2 Exponential."), VisualShaderNodeFloatFunc::FUNC_EXP2, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Floor", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Finds the nearest integer less than or equal to the parameter."), VisualShaderNodeFloatFunc::FUNC_FLOOR, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Fract", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Computes the fractional part of the argument."), VisualShaderNodeFloatFunc::FUNC_FRAC, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("InverseSqrt", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the inverse of the square root of the parameter."), VisualShaderNodeFloatFunc::FUNC_INVERSE_SQRT, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Log", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Natural logarithm."), VisualShaderNodeFloatFunc::FUNC_LOG, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Log2", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Base-2 logarithm."), VisualShaderNodeFloatFunc::FUNC_LOG2, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Max", "Scalar", "Functions", "VisualShaderNodeFloatOp", TTR("Returns the greater of two values."), VisualShaderNodeFloatOp::OP_MAX, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Min", "Scalar", "Functions", "VisualShaderNodeFloatOp", TTR("Returns the lesser of two values."), VisualShaderNodeFloatOp::OP_MIN, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("Mix", "Scalar", "Functions", "VisualShaderNodeScalarInterp", TTR("Linear interpolation between two scalars."), -1, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Negate", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the opposite value of the parameter."), VisualShaderNodeScalarFunc::FUNC_NEGATE, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("OneMinus", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("1.0 - scalar"), VisualShaderNodeScalarFunc::FUNC_ONEMINUS, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Pow", "Scalar", "Functions", "VisualShaderNodeScalarOp", TTR("Returns the value of the first parameter raised to the power of the second."), VisualShaderNodeScalarOp::OP_POW, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Radians", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Converts a quantity in degrees to radians."), VisualShaderNodeScalarFunc::FUNC_RADIANS, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Reciprocal", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("1.0 / scalar"), VisualShaderNodeScalarFunc::FUNC_RECIPROCAL, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Round", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Finds the nearest integer to the parameter."), VisualShaderNodeScalarFunc::FUNC_ROUND, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("RoundEven", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Finds the nearest even integer to the parameter."), VisualShaderNodeScalarFunc::FUNC_ROUNDEVEN, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Saturate", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Clamps the value between 0.0 and 1.0."), VisualShaderNodeScalarFunc::FUNC_SATURATE, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Sign", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Extracts the sign of the parameter."), VisualShaderNodeScalarFunc::FUNC_SIGN, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Sin", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the sine of the parameter."), VisualShaderNodeScalarFunc::FUNC_SIN, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("SinH", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the hyperbolic sine of the parameter."), VisualShaderNodeScalarFunc::FUNC_SINH, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Sqrt", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the square root of the parameter."), VisualShaderNodeScalarFunc::FUNC_SQRT, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Negate", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the opposite value of the parameter."), VisualShaderNodeFloatFunc::FUNC_NEGATE, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Negate", "Scalar", "Functions", "VisualShaderNodeIntFunc", TTR("Returns the opposite value of the parameter."), VisualShaderNodeIntFunc::FUNC_NEGATE, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("OneMinus", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("1.0 - scalar"), VisualShaderNodeFloatFunc::FUNC_ONEMINUS, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Pow", "Scalar", "Functions", "VisualShaderNodeFloatOp", TTR("Returns the value of the first parameter raised to the power of the second."), VisualShaderNodeFloatOp::OP_POW, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Radians", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Converts a quantity in degrees to radians."), VisualShaderNodeFloatFunc::FUNC_RADIANS, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Reciprocal", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("1.0 / scalar"), VisualShaderNodeFloatFunc::FUNC_RECIPROCAL, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Round", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Finds the nearest integer to the parameter."), VisualShaderNodeFloatFunc::FUNC_ROUND, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("RoundEven", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Finds the nearest even integer to the parameter."), VisualShaderNodeFloatFunc::FUNC_ROUNDEVEN, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Saturate", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Clamps the value between 0.0 and 1.0."), VisualShaderNodeFloatFunc::FUNC_SATURATE, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Sign", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Extracts the sign of the parameter."), VisualShaderNodeFloatFunc::FUNC_SIGN, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Sign", "Scalar", "Functions", "VisualShaderNodeIntFunc", TTR("Extracts the sign of the parameter."), VisualShaderNodeIntFunc::FUNC_SIGN, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("Sin", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the sine of the parameter."), VisualShaderNodeFloatFunc::FUNC_SIN, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("SinH", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the hyperbolic sine of the parameter."), VisualShaderNodeFloatFunc::FUNC_SINH, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Sqrt", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the square root of the parameter."), VisualShaderNodeFloatFunc::FUNC_SQRT, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("SmoothStep", "Scalar", "Functions", "VisualShaderNodeScalarSmoothStep", TTR("SmoothStep function( scalar(edge0), scalar(edge1), scalar(x) ).\n\nReturns 0.0 if 'x' is smaller than 'edge0' and 1.0 if x is larger than 'edge1'. Otherwise the return value is interpolated between 0.0 and 1.0 using Hermite polynomials."), -1, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Step", "Scalar", "Functions", "VisualShaderNodeScalarOp", TTR("Step function( scalar(edge), scalar(x) ).\n\nReturns 0.0 if 'x' is smaller than 'edge' and otherwise 1.0."), VisualShaderNodeScalarOp::OP_STEP, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Tan", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the tangent of the parameter."), VisualShaderNodeScalarFunc::FUNC_TAN, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("TanH", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Returns the hyperbolic tangent of the parameter."), VisualShaderNodeScalarFunc::FUNC_TANH, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Trunc", "Scalar", "Functions", "VisualShaderNodeScalarFunc", TTR("Finds the truncated value of the parameter."), VisualShaderNodeScalarFunc::FUNC_TRUNC, VisualShaderNode::PORT_TYPE_SCALAR));
-
- add_options.push_back(AddOption("Add", "Scalar", "Operators", "VisualShaderNodeScalarOp", TTR("Adds scalar to scalar."), VisualShaderNodeScalarOp::OP_ADD, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Divide", "Scalar", "Operators", "VisualShaderNodeScalarOp", TTR("Divides scalar by scalar."), VisualShaderNodeScalarOp::OP_DIV, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Multiply", "Scalar", "Operators", "VisualShaderNodeScalarOp", TTR("Multiplies scalar by scalar."), VisualShaderNodeScalarOp::OP_MUL, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Remainder", "Scalar", "Operators", "VisualShaderNodeScalarOp", TTR("Returns the remainder of the two scalars."), VisualShaderNodeScalarOp::OP_MOD, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Subtract", "Scalar", "Operators", "VisualShaderNodeScalarOp", TTR("Subtracts scalar from scalar."), VisualShaderNodeScalarOp::OP_SUB, VisualShaderNode::PORT_TYPE_SCALAR));
-
- add_options.push_back(AddOption("ScalarConstant", "Scalar", "Variables", "VisualShaderNodeScalarConstant", TTR("Scalar constant."), -1, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("ScalarUniform", "Scalar", "Variables", "VisualShaderNodeScalarUniform", TTR("Scalar uniform."), -1, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Step", "Scalar", "Functions", "VisualShaderNodeFloatOp", TTR("Step function( scalar(edge), scalar(x) ).\n\nReturns 0.0 if 'x' is smaller than 'edge' and otherwise 1.0."), VisualShaderNodeFloatOp::OP_STEP, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Tan", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the tangent of the parameter."), VisualShaderNodeFloatFunc::FUNC_TAN, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("TanH", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the hyperbolic tangent of the parameter."), VisualShaderNodeFloatFunc::FUNC_TANH, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Trunc", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Finds the truncated value of the parameter."), VisualShaderNodeFloatFunc::FUNC_TRUNC, VisualShaderNode::PORT_TYPE_SCALAR));
+
+ add_options.push_back(AddOption("Add", "Scalar", "Operators", "VisualShaderNodeFloatOp", TTR("Sums two floating-point scalars."), VisualShaderNodeFloatOp::OP_ADD, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Add", "Scalar", "Operators", "VisualShaderNodeIntOp", TTR("Sums two integer scalars."), VisualShaderNodeIntOp::OP_ADD, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("Divide", "Scalar", "Operators", "VisualShaderNodeFloatOp", TTR("Divides two floating-point scalars."), VisualShaderNodeFloatOp::OP_DIV, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Divide", "Scalar", "Operators", "VisualShaderNodeIntOp", TTR("Divides two integer scalars."), VisualShaderNodeIntOp::OP_DIV, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("Multiply", "Scalar", "Operators", "VisualShaderNodeFloatOp", TTR("Multiplies two floating-point scalars."), VisualShaderNodeFloatOp::OP_MUL, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Multiply", "Scalar", "Operators", "VisualShaderNodeIntOp", TTR("Multiplies two integer scalars."), VisualShaderNodeIntOp::OP_MUL, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("Remainder", "Scalar", "Operators", "VisualShaderNodeFloatOp", TTR("Returns the remainder of the two floating-point scalars."), VisualShaderNodeFloatOp::OP_MOD, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Remainder", "Scalar", "Operators", "VisualShaderNodeIntOp", TTR("Returns the remainder of the two integer scalars."), VisualShaderNodeIntOp::OP_MOD, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("Subtract", "Scalar", "Operators", "VisualShaderNodeFloatOp", TTR("Subtracts two floating-point scalars."), VisualShaderNodeFloatOp::OP_SUB, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Subtract", "Scalar", "Operators", "VisualShaderNodeIntOp", TTR("Subtracts two integer scalars."), VisualShaderNodeIntOp::OP_SUB, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+
+ add_options.push_back(AddOption("FloatConstant", "Scalar", "Variables", "VisualShaderNodeFloatConstant", TTR("Scalar floating-point constant."), -1, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("IntConstant", "Scalar", "Variables", "VisualShaderNodeIntConstant", TTR("Scalar integer constant."), -1, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("FloatUniform", "Scalar", "Variables", "VisualShaderNodeFloatUniform", TTR("Scalar floating-point uniform."), -1, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("IntUniform", "Scalar", "Variables", "VisualShaderNodeIntUniform", TTR("Scalar integer uniform."), -1, VisualShaderNode::PORT_TYPE_SCALAR_INT));
// TEXTURES
@@ -2881,8 +3000,9 @@ public:
void setup(const Ref<VisualShaderNodeInput> &p_input) {
input = p_input;
- Ref<Texture2D> type_icon[5] = {
+ Ref<Texture2D> type_icon[6] = {
EditorNode::get_singleton()->get_gui_base()->get_icon("float", "EditorIcons"),
+ EditorNode::get_singleton()->get_gui_base()->get_icon("int", "EditorIcons"),
EditorNode::get_singleton()->get_gui_base()->get_icon("Vector3", "EditorIcons"),
EditorNode::get_singleton()->get_gui_base()->get_icon("bool", "EditorIcons"),
EditorNode::get_singleton()->get_gui_base()->get_icon("Transform", "EditorIcons"),
diff --git a/editor/plugins/visual_shader_editor_plugin.h b/editor/plugins/visual_shader_editor_plugin.h
index 8919690ada..8756fe9fe9 100644
--- a/editor/plugins/visual_shader_editor_plugin.h
+++ b/editor/plugins/visual_shader_editor_plugin.h
@@ -81,6 +81,7 @@ class VisualShaderEditor : public VBoxContainer {
bool saved_node_pos_dirty;
ConfirmationDialog *members_dialog;
+ PopupMenu *popup_menu;
MenuButton *tools;
bool preview_showed;
@@ -90,6 +91,15 @@ class VisualShaderEditor : public VBoxContainer {
COLLAPSE_ALL
};
+ enum NodeMenuOptions {
+ ADD,
+ SEPARATOR, // ignore
+ COPY,
+ PASTE,
+ DELETE,
+ DUPLICATE,
+ };
+
Tree *members;
AcceptDialog *alert;
LineEdit *node_filter;
@@ -181,7 +191,7 @@ class VisualShaderEditor : public VBoxContainer {
void _node_selected(Object *p_node);
void _delete_request(int);
- void _on_nodes_delete();
+ void _delete_nodes();
void _removed_from_graph();
@@ -216,7 +226,7 @@ class VisualShaderEditor : public VBoxContainer {
void _clear_buffer();
void _copy_nodes();
- void _paste_nodes();
+ void _paste_nodes(bool p_use_custom_position = false, const Vector2 &p_custom_position = Vector2());
Vector<Ref<VisualShaderNodePlugin> > plugins;
@@ -250,6 +260,9 @@ class VisualShaderEditor : public VBoxContainer {
void _member_create();
void _member_cancel();
+ Vector2 menu_point;
+ void _node_menu_id_pressed(int p_idx);
+
Variant get_drag_data_fw(const Point2 &p_point, Control *p_from);
bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const;
void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from);
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index 72b2eb2885..2bcf2c3b44 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -393,12 +393,12 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
} break;
case Variant::INT:
- case Variant::REAL: {
+ case Variant::FLOAT: {
if (hint == PROPERTY_HINT_RANGE) {
int c = hint_text.get_slice_count(",");
- float min = 0, max = 100, step = type == Variant::REAL ? .01 : 1;
+ float min = 0, max = 100, step = type == Variant::FLOAT ? .01 : 1;
if (c >= 1) {
if (!hint_text.get_slice(",", 0).empty())
@@ -1048,10 +1048,16 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
case Variant::PACKED_BYTE_ARRAY: {
} break;
- case Variant::PACKED_INT_ARRAY: {
+ case Variant::PACKED_INT32_ARRAY: {
} break;
- case Variant::PACKED_REAL_ARRAY: {
+ case Variant::PACKED_FLOAT32_ARRAY: {
+
+ } break;
+ case Variant::PACKED_INT64_ARRAY: {
+
+ } break;
+ case Variant::PACKED_FLOAT64_ARRAY: {
} break;
case Variant::PACKED_STRING_ARRAY: {
@@ -1113,7 +1119,7 @@ void CustomPropertyEditor::_file_selected(String p_file) {
void CustomPropertyEditor::_type_create_selected(int p_idx) {
- if (type == Variant::INT || type == Variant::REAL) {
+ if (type == Variant::INT || type == Variant::FLOAT) {
float newval = 0;
switch (p_idx) {
@@ -1563,7 +1569,7 @@ void CustomPropertyEditor::_modified(String p_string) {
emit_signal("variant_changed");
} break;
- case Variant::REAL: {
+ case Variant::FLOAT: {
if (hint != PROPERTY_HINT_EXP_EASING) {
String text = value_editor[0]->get_text();
@@ -1700,10 +1706,10 @@ void CustomPropertyEditor::_modified(String p_string) {
case Variant::PACKED_BYTE_ARRAY: {
} break;
- case Variant::PACKED_INT_ARRAY: {
+ case Variant::PACKED_INT32_ARRAY: {
} break;
- case Variant::PACKED_REAL_ARRAY: {
+ case Variant::PACKED_FLOAT32_ARRAY: {
} break;
case Variant::PACKED_STRING_ARRAY: {
@@ -1751,7 +1757,7 @@ void CustomPropertyEditor::_range_modified(double p_value) {
void CustomPropertyEditor::_focus_enter() {
switch (type) {
- case Variant::REAL:
+ case Variant::FLOAT:
case Variant::STRING:
case Variant::VECTOR2:
case Variant::RECT2:
@@ -1777,7 +1783,7 @@ void CustomPropertyEditor::_focus_enter() {
void CustomPropertyEditor::_focus_exit() {
switch (type) {
- case Variant::REAL:
+ case Variant::FLOAT:
case Variant::STRING:
case Variant::VECTOR2:
case Variant::RECT2:
diff --git a/editor/property_selector.cpp b/editor/property_selector.cpp
index 3c61e40b58..416ffb3fd0 100644
--- a/editor/property_selector.cpp
+++ b/editor/property_selector.cpp
@@ -142,8 +142,8 @@ void PropertySelector::_update_search() {
Control::get_icon("Dictionary", "EditorIcons"),
Control::get_icon("Array", "EditorIcons"),
Control::get_icon("PackedByteArray", "EditorIcons"),
- Control::get_icon("PackedIntArray", "EditorIcons"),
- Control::get_icon("PackedRealArray", "EditorIcons"),
+ Control::get_icon("PackedInt32Array", "EditorIcons"),
+ Control::get_icon("PackedFloat32Array", "EditorIcons"),
Control::get_icon("PackedStringArray", "EditorIcons"),
Control::get_icon("PackedVector2Array", "EditorIcons"),
Control::get_icon("PackedVector3Array", "EditorIcons"),
diff --git a/editor/quick_open.cpp b/editor/quick_open.cpp
index 965c9abe75..57e3c1da70 100644
--- a/editor/quick_open.cpp
+++ b/editor/quick_open.cpp
@@ -260,7 +260,7 @@ void EditorQuickOpen::_notification(int p_what) {
connect_compat("confirmed", this, "_confirmed");
search_box->set_clear_button_enabled(true);
- FALLTHROUGH;
+ [[fallthrough]];
}
case NOTIFICATION_THEME_CHANGED: {
search_box->set_right_icon(get_icon("Search", "EditorIcons"));
diff --git a/editor/spatial_editor_gizmos.cpp b/editor/spatial_editor_gizmos.cpp
index 36dbf8ba24..40e1be665c 100644
--- a/editor/spatial_editor_gizmos.cpp
+++ b/editor/spatial_editor_gizmos.cpp
@@ -3447,7 +3447,7 @@ void CollisionShapeSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
Vector<Vector3> points;
- Vector3 d(0, 0, height * 0.5);
+ Vector3 d(0, height * 0.5, 0);
for (int i = 0; i < 360; i++) {
float ra = Math::deg2rad((float)i);
@@ -3455,24 +3455,24 @@ void CollisionShapeSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
Point2 a = Vector2(Math::sin(ra), Math::cos(ra)) * radius;
Point2 b = Vector2(Math::sin(rb), Math::cos(rb)) * radius;
- points.push_back(Vector3(a.x, a.y, 0) + d);
- points.push_back(Vector3(b.x, b.y, 0) + d);
+ points.push_back(Vector3(a.x, 0, a.y) + d);
+ points.push_back(Vector3(b.x, 0, b.y) + d);
- points.push_back(Vector3(a.x, a.y, 0) - d);
- points.push_back(Vector3(b.x, b.y, 0) - d);
+ points.push_back(Vector3(a.x, 0, a.y) - d);
+ points.push_back(Vector3(b.x, 0, b.y) - d);
if (i % 90 == 0) {
- points.push_back(Vector3(a.x, a.y, 0) + d);
- points.push_back(Vector3(a.x, a.y, 0) - d);
+ points.push_back(Vector3(a.x, 0, a.y) + d);
+ points.push_back(Vector3(a.x, 0, a.y) - d);
}
Vector3 dud = i < 180 ? d : -d;
- points.push_back(Vector3(0, a.y, a.x) + dud);
- points.push_back(Vector3(0, b.y, b.x) + dud);
- points.push_back(Vector3(a.y, 0, a.x) + dud);
- points.push_back(Vector3(b.y, 0, b.x) + dud);
+ points.push_back(Vector3(0, a.x, a.y) + dud);
+ points.push_back(Vector3(0, b.x, b.y) + dud);
+ points.push_back(Vector3(a.y, a.x, 0) + dud);
+ points.push_back(Vector3(b.y, b.x, 0) + dud);
}
p_gizmo->add_lines(points, material);
@@ -3486,31 +3486,31 @@ void CollisionShapeSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
Point2 a = Vector2(Math::sin(ra), Math::cos(ra)) * radius;
Point2 b = Vector2(Math::sin(rb), Math::cos(rb)) * radius;
- collision_segments.push_back(Vector3(a.x, a.y, 0) + d);
- collision_segments.push_back(Vector3(b.x, b.y, 0) + d);
+ collision_segments.push_back(Vector3(a.x, 0, a.y) + d);
+ collision_segments.push_back(Vector3(b.x, 0, b.y) + d);
- collision_segments.push_back(Vector3(a.x, a.y, 0) - d);
- collision_segments.push_back(Vector3(b.x, b.y, 0) - d);
+ collision_segments.push_back(Vector3(a.x, 0, a.y) - d);
+ collision_segments.push_back(Vector3(b.x, 0, b.y) - d);
if (i % 16 == 0) {
- collision_segments.push_back(Vector3(a.x, a.y, 0) + d);
- collision_segments.push_back(Vector3(a.x, a.y, 0) - d);
+ collision_segments.push_back(Vector3(a.x, 0, a.y) + d);
+ collision_segments.push_back(Vector3(a.x, 0, a.y) - d);
}
Vector3 dud = i < 32 ? d : -d;
- collision_segments.push_back(Vector3(0, a.y, a.x) + dud);
- collision_segments.push_back(Vector3(0, b.y, b.x) + dud);
- collision_segments.push_back(Vector3(a.y, 0, a.x) + dud);
- collision_segments.push_back(Vector3(b.y, 0, b.x) + dud);
+ collision_segments.push_back(Vector3(0, a.x, a.y) + dud);
+ collision_segments.push_back(Vector3(0, b.x, b.y) + dud);
+ collision_segments.push_back(Vector3(a.y, a.x, 0) + dud);
+ collision_segments.push_back(Vector3(b.y, b.x, 0) + dud);
}
p_gizmo->add_collision_segments(collision_segments);
Vector<Vector3> handles;
handles.push_back(Vector3(cs2->get_radius(), 0, 0));
- handles.push_back(Vector3(0, 0, cs2->get_height() * 0.5 + cs2->get_radius()));
+ handles.push_back(Vector3(0, cs2->get_height() * 0.5 + cs2->get_radius(), 0));
p_gizmo->add_handles(handles, handles_material);
}
diff --git a/main/main.cpp b/main/main.cpp
index efcbf04585..d8a9cc87a7 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -203,6 +203,7 @@ void finalize_physics() {
void initialize_navigation_server() {
ERR_FAIL_COND(navigation_server != NULL);
+
navigation_server = NavigationServerManager::new_default_server();
navigation_2d_server = memnew(Navigation2DServer);
}
@@ -210,6 +211,7 @@ void initialize_navigation_server() {
void finalize_navigation_server() {
memdelete(navigation_server);
navigation_server = NULL;
+
memdelete(navigation_2d_server);
navigation_2d_server = NULL;
}
@@ -1817,7 +1819,7 @@ bool Main::start() {
GLOBAL_DEF("display/window/stretch/aspect", "ignore");
ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/aspect", PropertyInfo(Variant::STRING, "display/window/stretch/aspect", PROPERTY_HINT_ENUM, "ignore,keep,keep_width,keep_height,expand"));
GLOBAL_DEF("display/window/stretch/shrink", 1.0);
- ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/shrink", PropertyInfo(Variant::REAL, "display/window/stretch/shrink", PROPERTY_HINT_RANGE, "1.0,8.0,0.1"));
+ ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/shrink", PropertyInfo(Variant::FLOAT, "display/window/stretch/shrink", PROPERTY_HINT_RANGE, "1.0,8.0,0.1"));
sml->set_auto_accept_quit(GLOBAL_DEF("application/config/auto_accept_quit", true));
sml->set_quit_on_go_back(GLOBAL_DEF("application/config/quit_on_go_back", true));
GLOBAL_DEF("gui/common/snap_controls_to_pixels", true);
@@ -2037,9 +2039,9 @@ bool Main::iteration() {
break;
}
- message_queue->flush();
+ NavigationServer::get_singleton_mut()->process(frame_slice * time_scale);
- NavigationServer::get_singleton_mut()->step(frame_slice * time_scale);
+ message_queue->flush();
PhysicsServer::get_singleton()->step(frame_slice * time_scale);
diff --git a/main/tests/test_gdscript.cpp b/main/tests/test_gdscript.cpp
index a2891de8ff..0e7c45f603 100644
--- a/main/tests/test_gdscript.cpp
+++ b/main/tests/test_gdscript.cpp
@@ -128,7 +128,7 @@ static String _parser_expr(const GDScriptParser::Node *p_expr) {
case GDScriptParser::OperatorNode::OP_PARENT_CALL:
txt += ".";
- FALLTHROUGH;
+ [[fallthrough]];
case GDScriptParser::OperatorNode::OP_CALL: {
ERR_FAIL_COND_V(c_node->arguments.size() < 1, "");
diff --git a/methods.py b/methods.py
index f6c9e939c6..3f03e6bbd2 100644
--- a/methods.py
+++ b/methods.py
@@ -549,15 +549,27 @@ def detect_darwin_sdk_path(platform, env):
print("Failed to find SDK path while running xcrun --sdk {} --show-sdk-path.".format(sdk_name))
raise
+def is_vanilla_clang(env):
+ if not using_clang(env):
+ return False
+ version = decode_utf8(subprocess.check_output([env['CXX'], '--version']).strip())
+ return not version.startswith("Apple")
+
+
def get_compiler_version(env):
- # Not using this method on clang because it returns 4.2.1 # https://reviews.llvm.org/D56803
- if using_gcc(env):
- version = decode_utf8(subprocess.check_output([env['CXX'], '-dumpversion']).strip())
- else:
+ """
+ Returns an array of version numbers as ints: [major, minor, patch].
+ The return array should have at least two values (major, minor).
+ """
+ if not env.msvc:
+ # Not using -dumpversion as some GCC distros only return major, and
+ # Clang used to return hardcoded 4.2.1: # https://reviews.llvm.org/D56803
version = decode_utf8(subprocess.check_output([env['CXX'], '--version']).strip())
- match = re.search('[0-9][0-9.]*', version)
+ else: # TODO: Implement for MSVC
+ return None
+ match = re.search('[0-9]+\.[0-9.]+', version)
if match is not None:
- return match.group().split('.')
+ return list(map(int, match.group().split('.')))
else:
return None
diff --git a/modules/assimp/editor_scene_importer_assimp.cpp b/modules/assimp/editor_scene_importer_assimp.cpp
index 01d49e7995..1881d0db33 100644
--- a/modules/assimp/editor_scene_importer_assimp.cpp
+++ b/modules/assimp/editor_scene_importer_assimp.cpp
@@ -1275,7 +1275,7 @@ EditorSceneImporterAssimp::_generate_mesh_from_surface_indices(ImportState &stat
for (size_t l = 0; l < num_vertices; l++) {
AssimpUtils::calc_tangent_from_mesh(ai_mesh, j, l, l, w);
}
- PackedRealArray new_tangents = array_copy[VisualServer::ARRAY_TANGENT].duplicate(true);
+ PackedFloat32Array new_tangents = array_copy[VisualServer::ARRAY_TANGENT].duplicate(true);
ERR_CONTINUE(new_tangents.size() != tangents.size() * 4);
for (int32_t l = 0; l < tangents.size(); l++) {
new_tangents.ptrw()[l + 0] = tangents[l].r;
diff --git a/modules/bullet/shape_bullet.cpp b/modules/bullet/shape_bullet.cpp
index 1690950049..6780f89d9e 100644
--- a/modules/bullet/shape_bullet.cpp
+++ b/modules/bullet/shape_bullet.cpp
@@ -122,8 +122,8 @@ btBoxShape *ShapeBullet::create_shape_box(const btVector3 &boxHalfExtents) {
return bulletnew(btBoxShape(boxHalfExtents));
}
-btCapsuleShapeZ *ShapeBullet::create_shape_capsule(btScalar radius, btScalar height) {
- return bulletnew(btCapsuleShapeZ(radius, height));
+btCapsuleShape *ShapeBullet::create_shape_capsule(btScalar radius, btScalar height) {
+ return bulletnew(btCapsuleShape(radius, height));
}
btCylinderShape *ShapeBullet::create_shape_cylinder(btScalar radius, btScalar height) {
@@ -474,7 +474,7 @@ void HeightMapShapeBullet::set_data(const Variant &p_data) {
Vector<real_t> l_heights;
Variant l_heights_v = d["heights"];
- if (l_heights_v.get_type() == Variant::PACKED_REAL_ARRAY) {
+ if (l_heights_v.get_type() == Variant::PACKED_FLOAT32_ARRAY) {
// Ready-to-use heights can be passed
l_heights = l_heights_v;
@@ -505,7 +505,7 @@ void HeightMapShapeBullet::set_data(const Variant &p_data) {
}
} else {
- ERR_FAIL_MSG("Expected PackedRealArray or float Image.");
+ ERR_FAIL_MSG("Expected PackedFloat32Array or float Image.");
}
ERR_FAIL_COND(l_width <= 0);
diff --git a/modules/bullet/shape_bullet.h b/modules/bullet/shape_bullet.h
index 27bf011ca1..c8b5ca102a 100644
--- a/modules/bullet/shape_bullet.h
+++ b/modules/bullet/shape_bullet.h
@@ -85,7 +85,7 @@ public:
static class btStaticPlaneShape *create_shape_plane(const btVector3 &planeNormal, btScalar planeConstant);
static class btSphereShape *create_shape_sphere(btScalar radius);
static class btBoxShape *create_shape_box(const btVector3 &boxHalfExtents);
- static class btCapsuleShapeZ *create_shape_capsule(btScalar radius, btScalar height);
+ static class btCapsuleShape *create_shape_capsule(btScalar radius, btScalar height);
static class btCylinderShape *create_shape_cylinder(btScalar radius, btScalar height);
/// IMPORTANT: Remember to delete the shape interface by calling: delete my_shape->getMeshInterface();
static class btConvexPointCloudShape *create_shape_convex(btAlignedObjectArray<btVector3> &p_vertices, const btVector3 &p_local_scaling = btVector3(1, 1, 1));
diff --git a/modules/bullet/space_bullet.cpp b/modules/bullet/space_bullet.cpp
index 0e4c4b4731..f6df97f11d 100644
--- a/modules/bullet/space_bullet.cpp
+++ b/modules/bullet/space_bullet.cpp
@@ -726,9 +726,6 @@ void SpaceBullet::check_ghost_overlaps() {
other_body_shape = static_cast<btCollisionShape *>(otherObject->get_bt_shape(z));
- if (other_body_shape->isConcave())
- continue;
-
btTransform other_shape_transform(otherObject->get_bt_shape_transform(z));
other_shape_transform.getOrigin() *= other_body_scale;
diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp
index 7e7f383ea6..d017afd792 100644
--- a/modules/csg/csg_shape.cpp
+++ b/modules/csg/csg_shape.cpp
@@ -621,7 +621,7 @@ void CSGShape::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_meshes"), &CSGShape::get_meshes);
ADD_PROPERTY(PropertyInfo(Variant::INT, "operation", PROPERTY_HINT_ENUM, "Union,Intersection,Subtraction"), "set_operation", "get_operation");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "snap", PROPERTY_HINT_RANGE, "0.0001,1,0.001"), "set_snap", "get_snap");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "snap", PROPERTY_HINT_RANGE, "0.0001,1,0.001"), "set_snap", "get_snap");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "calculate_tangents"), "set_calculate_tangents", "is_calculating_tangents");
ADD_GROUP("Collision", "collision_");
@@ -1049,7 +1049,7 @@ void CSGSphere::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_material", "material"), &CSGSphere::set_material);
ClassDB::bind_method(D_METHOD("get_material"), &CSGSphere::get_material);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001"), "set_radius", "get_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001"), "set_radius", "get_radius");
ADD_PROPERTY(PropertyInfo(Variant::INT, "radial_segments", PROPERTY_HINT_RANGE, "1,100,1"), "set_radial_segments", "get_radial_segments");
ADD_PROPERTY(PropertyInfo(Variant::INT, "rings", PROPERTY_HINT_RANGE, "1,100,1"), "set_rings", "get_rings");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "smooth_faces"), "set_smooth_faces", "get_smooth_faces");
@@ -1236,9 +1236,9 @@ void CSGBox::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_material", "material"), &CSGBox::set_material);
ClassDB::bind_method(D_METHOD("get_material"), &CSGBox::get_material);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "width", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_width", "get_width");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_height", "get_height");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "depth", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_depth", "get_depth");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "width", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_width", "get_width");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_height", "get_height");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "depth", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_depth", "get_depth");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "material", PROPERTY_HINT_RESOURCE_TYPE, "StandardMaterial3D,ShaderMaterial"), "set_material", "get_material");
}
@@ -1451,8 +1451,8 @@ void CSGCylinder::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_smooth_faces", "smooth_faces"), &CSGCylinder::set_smooth_faces);
ClassDB::bind_method(D_METHOD("get_smooth_faces"), &CSGCylinder::get_smooth_faces);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_radius", "get_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_height", "get_height");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_radius", "get_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_height", "get_height");
ADD_PROPERTY(PropertyInfo(Variant::INT, "sides", PROPERTY_HINT_RANGE, "3,64,1"), "set_sides", "get_sides");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "cone"), "set_cone", "is_cone");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "smooth_faces"), "set_smooth_faces", "get_smooth_faces");
@@ -1678,8 +1678,8 @@ void CSGTorus::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_smooth_faces", "smooth_faces"), &CSGTorus::set_smooth_faces);
ClassDB::bind_method(D_METHOD("get_smooth_faces"), &CSGTorus::get_smooth_faces);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "inner_radius", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_inner_radius", "get_inner_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "outer_radius", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_outer_radius", "get_outer_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "inner_radius", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_inner_radius", "get_inner_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "outer_radius", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_outer_radius", "get_outer_radius");
ADD_PROPERTY(PropertyInfo(Variant::INT, "sides", PROPERTY_HINT_RANGE, "3,64,1"), "set_sides", "get_sides");
ADD_PROPERTY(PropertyInfo(Variant::INT, "ring_sides", PROPERTY_HINT_RANGE, "3,64,1"), "set_ring_sides", "get_ring_sides");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "smooth_faces"), "set_smooth_faces", "get_smooth_faces");
@@ -2314,11 +2314,11 @@ void CSGPolygon::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "polygon"), "set_polygon", "get_polygon");
ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Depth,Spin,Path"), "set_mode", "get_mode");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "depth", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_depth", "get_depth");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "spin_degrees", PROPERTY_HINT_RANGE, "1,360,0.1"), "set_spin_degrees", "get_spin_degrees");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "depth", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_depth", "get_depth");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "spin_degrees", PROPERTY_HINT_RANGE, "1,360,0.1"), "set_spin_degrees", "get_spin_degrees");
ADD_PROPERTY(PropertyInfo(Variant::INT, "spin_sides", PROPERTY_HINT_RANGE, "3,64,1"), "set_spin_sides", "get_spin_sides");
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "path_node", PROPERTY_HINT_NODE_PATH_VALID_TYPES, "Path"), "set_path_node", "get_path_node");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "path_interval", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_path_interval", "get_path_interval");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "path_interval", PROPERTY_HINT_EXP_RANGE, "0.001,1000.0,0.001,or_greater"), "set_path_interval", "get_path_interval");
ADD_PROPERTY(PropertyInfo(Variant::INT, "path_rotation", PROPERTY_HINT_ENUM, "Polygon,Path,PathFollow"), "set_path_rotation", "get_path_rotation");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "path_local"), "set_path_local", "is_path_local");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "path_continuous_u"), "set_path_continuous_u", "is_path_continuous_u");
diff --git a/modules/gdnative/gdnative/variant.cpp b/modules/gdnative/gdnative/variant.cpp
index 1d8ba6087f..f0fc44ae8a 100644
--- a/modules/gdnative/gdnative/variant.cpp
+++ b/modules/gdnative/gdnative/variant.cpp
@@ -209,13 +209,13 @@ void GDAPI godot_variant_new_packed_byte_array(godot_variant *r_dest, const godo
void GDAPI godot_variant_new_packed_int_array(godot_variant *r_dest, const godot_packed_int_array *p_pia) {
Variant *dest = (Variant *)r_dest;
- PackedIntArray *pia = (PackedIntArray *)p_pia;
+ PackedInt32Array *pia = (PackedInt32Array *)p_pia;
memnew_placement_custom(dest, Variant, Variant(*pia));
}
void GDAPI godot_variant_new_packed_real_array(godot_variant *r_dest, const godot_packed_real_array *p_pra) {
Variant *dest = (Variant *)r_dest;
- PackedRealArray *pra = (PackedRealArray *)p_pra;
+ PackedFloat32Array *pra = (PackedFloat32Array *)p_pra;
memnew_placement_custom(dest, Variant, Variant(*pra));
}
@@ -402,8 +402,8 @@ godot_packed_byte_array GDAPI godot_variant_as_packed_byte_array(const godot_var
godot_packed_int_array GDAPI godot_variant_as_packed_int_array(const godot_variant *p_self) {
godot_packed_int_array raw_dest;
const Variant *self = (const Variant *)p_self;
- PackedIntArray *dest = (PackedIntArray *)&raw_dest;
- memnew_placement(dest, PackedIntArray(self->operator PackedIntArray())); // operator = is overloaded by PackedIntArray
+ PackedInt32Array *dest = (PackedInt32Array *)&raw_dest;
+ memnew_placement(dest, PackedInt32Array(self->operator PackedInt32Array())); // operator = is overloaded by PackedInt32Array
*dest = *self;
return raw_dest;
}
@@ -411,8 +411,8 @@ godot_packed_int_array GDAPI godot_variant_as_packed_int_array(const godot_varia
godot_packed_real_array GDAPI godot_variant_as_packed_real_array(const godot_variant *p_self) {
godot_packed_real_array raw_dest;
const Variant *self = (const Variant *)p_self;
- PackedRealArray *dest = (PackedRealArray *)&raw_dest;
- memnew_placement(dest, PackedRealArray(self->operator PackedRealArray())); // operator = is overloaded by PackedRealArray
+ PackedFloat32Array *dest = (PackedFloat32Array *)&raw_dest;
+ memnew_placement(dest, PackedFloat32Array(self->operator PackedFloat32Array())); // operator = is overloaded by PackedFloat32Array
*dest = *self;
return raw_dest;
}
diff --git a/modules/gdnative/include/gdnative/pool_arrays.h b/modules/gdnative/include/gdnative/pool_arrays.h
index 315fb7ada2..c610377f54 100644
--- a/modules/gdnative/include/gdnative/pool_arrays.h
+++ b/modules/gdnative/include/gdnative/pool_arrays.h
@@ -48,7 +48,7 @@ typedef struct {
} godot_packed_byte_array;
#endif
-/////// PackedIntArray
+/////// PackedInt32Array
#define GODOT_PACKED_INT_ARRAY_SIZE sizeof(void *)
@@ -59,7 +59,7 @@ typedef struct {
} godot_packed_int_array;
#endif
-/////// PackedRealArray
+/////// PackedFloat32Array
#define GODOT_PACKED_REAL_ARRAY_SIZE sizeof(void *)
diff --git a/modules/gdnative/include/gdnative/variant.h b/modules/gdnative/include/gdnative/variant.h
index 4d70f1143c..934e856fbf 100644
--- a/modules/gdnative/include/gdnative/variant.h
+++ b/modules/gdnative/include/gdnative/variant.h
@@ -56,31 +56,33 @@ typedef enum godot_variant_type {
GODOT_VARIANT_TYPE_STRING,
// math types
-
- GODOT_VARIANT_TYPE_VECTOR2, // 5
+ GODOT_VARIANT_TYPE_VECTOR2,
+ GODOT_VARIANT_TYPE_VECTOR2I,
GODOT_VARIANT_TYPE_RECT2,
+ GODOT_VARIANT_TYPE_RECT2I,
GODOT_VARIANT_TYPE_VECTOR3,
+ GODOT_VARIANT_TYPE_VECTOR3I,
GODOT_VARIANT_TYPE_TRANSFORM2D,
GODOT_VARIANT_TYPE_PLANE,
- GODOT_VARIANT_TYPE_QUAT, // 10
+ GODOT_VARIANT_TYPE_QUAT,
GODOT_VARIANT_TYPE_AABB,
GODOT_VARIANT_TYPE_BASIS,
GODOT_VARIANT_TYPE_TRANSFORM,
// misc types
GODOT_VARIANT_TYPE_COLOR,
- GODOT_VARIANT_TYPE_NODE_PATH, // 15
+ GODOT_VARIANT_TYPE_NODE_PATH,
GODOT_VARIANT_TYPE_RID,
GODOT_VARIANT_TYPE_OBJECT,
GODOT_VARIANT_TYPE_DICTIONARY,
- GODOT_VARIANT_TYPE_ARRAY, // 20
+ GODOT_VARIANT_TYPE_ARRAY,
// arrays
GODOT_VARIANT_TYPE_PACKED_BYTE_ARRAY,
GODOT_VARIANT_TYPE_PACKED_INT_ARRAY,
GODOT_VARIANT_TYPE_PACKED_REAL_ARRAY,
GODOT_VARIANT_TYPE_PACKED_STRING_ARRAY,
- GODOT_VARIANT_TYPE_PACKED_VECTOR2_ARRAY, // 25
+ GODOT_VARIANT_TYPE_PACKED_VECTOR2_ARRAY,
GODOT_VARIANT_TYPE_PACKED_VECTOR3_ARRAY,
GODOT_VARIANT_TYPE_PACKED_COLOR_ARRAY,
} godot_variant_type;
diff --git a/modules/gdnavigation/gd_navigation_server.cpp b/modules/gdnavigation/gd_navigation_server.cpp
index 1f1783802d..4129d1f65a 100644
--- a/modules/gdnavigation/gd_navigation_server.cpp
+++ b/modules/gdnavigation/gd_navigation_server.cpp
@@ -121,6 +121,7 @@ GdNavigationServer::GdNavigationServer() :
}
GdNavigationServer::~GdNavigationServer() {
+ flush_queries();
memdelete(operations_mutex);
memdelete(commands_mutex);
}
@@ -474,12 +475,9 @@ void GdNavigationServer::set_active(bool p_active) const {
mut_this->operations_mutex->unlock();
}
-void GdNavigationServer::step(real_t p_delta_time) {
- if (!active) {
- return;
- }
-
- // With c++ we can't be 100% sure this is called in single thread so use the mutex.
+void GdNavigationServer::flush_queries() {
+ // In c++ we can't be sure that this is performed in the main thread
+ // even with mutable functions.
commands_mutex->lock();
operations_mutex->lock();
for (size_t i(0); i < commands.size(); i++) {
@@ -489,13 +487,24 @@ void GdNavigationServer::step(real_t p_delta_time) {
commands.clear();
operations_mutex->unlock();
commands_mutex->unlock();
+}
+
+void GdNavigationServer::process(real_t p_delta_time) {
+ flush_queries();
- // These are internal operations so don't need to be shielded.
+ if (!active) {
+ return;
+ }
+
+ // In c++ we can't be sure that this is performed in the main thread
+ // even with mutable functions.
+ operations_mutex->lock();
for (int i(0); i < active_maps.size(); i++) {
active_maps[i]->sync();
active_maps[i]->step(p_delta_time);
active_maps[i]->dispatch_callbacks();
}
+ operations_mutex->unlock();
}
#undef COMMAND_1
diff --git a/modules/gdnavigation/gd_navigation_server.h b/modules/gdnavigation/gd_navigation_server.h
index 7fa5979c31..0400acf1a3 100644
--- a/modules/gdnavigation/gd_navigation_server.h
+++ b/modules/gdnavigation/gd_navigation_server.h
@@ -131,7 +131,9 @@ public:
COMMAND_1(free, RID, p_object);
virtual void set_active(bool p_active) const;
- virtual void step(real_t p_delta_time);
+
+ void flush_queries();
+ virtual void process(real_t p_delta_time);
};
#undef COMMAND_1
diff --git a/modules/gdnavigation/nav_map.cpp b/modules/gdnavigation/nav_map.cpp
index d3e2f8f388..c3880f89b6 100644
--- a/modules/gdnavigation/nav_map.cpp
+++ b/modules/gdnavigation/nav_map.cpp
@@ -545,8 +545,11 @@ void NavMap::add_region(NavRegion *p_region) {
}
void NavMap::remove_region(NavRegion *p_region) {
- regions.push_back(p_region);
- regenerate_links = true;
+ std::vector<NavRegion *>::iterator it = std::find(regions.begin(), regions.end(), p_region);
+ if (it != regions.end()) {
+ regions.erase(it);
+ regenerate_links = true;
+ }
}
bool NavMap::has_agent(RvoAgent *agent) const {
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp
index eac879f3d9..85265a1fe5 100644
--- a/modules/gdscript/gdscript_editor.cpp
+++ b/modules/gdscript/gdscript_editor.cpp
@@ -1124,7 +1124,7 @@ static bool _guess_expression_type(GDScriptCompletionContext &p_context, const G
v2 = 1;
v2_use_value = false;
}
- if (vop == Variant::OP_DIVIDE && v2.get_type() == Variant::REAL) {
+ if (vop == Variant::OP_DIVIDE && v2.get_type() == Variant::FLOAT) {
v2 = 1.0;
v2_use_value = false;
}
@@ -2173,7 +2173,7 @@ static void _find_identifiers(const GDScriptCompletionContext &p_context, bool p
static const char *_type_names[Variant::VARIANT_MAX] = {
"null", "bool", "int", "float", "String", "Vector2", "Rect2", "Vector3", "Transform2D", "Plane", "Quat", "AABB", "Basis", "Transform",
- "Color", "NodePath", "RID", "Object", "Dictionary", "Array", "PackedByteArray", "PackedIntArray", "PackedRealArray", "PackedStringArray",
+ "Color", "NodePath", "RID", "Object", "Callable", "Signal", "Dictionary", "Array", "PackedByteArray", "PackedInt32Array", "PackedInt64Array", "PackedFloat32Array", "PackedFloat64Array", "PackedStringArray",
"PackedVector2Array", "PackedVector3Array", "PackedColorArray"
};
@@ -2565,7 +2565,7 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_path
} break;
case GDScriptParser::COMPLETION_FUNCTION: {
is_function = true;
- FALLTHROUGH;
+ [[fallthrough]];
}
case GDScriptParser::COMPLETION_IDENTIFIER: {
_find_identifiers(context, is_function, options);
@@ -2608,7 +2608,7 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_path
} break;
case GDScriptParser::COMPLETION_METHOD: {
is_function = true;
- FALLTHROUGH;
+ [[fallthrough]];
}
case GDScriptParser::COMPLETION_INDEX: {
const GDScriptParser::Node *node = parser.get_completion_node();
@@ -3330,7 +3330,7 @@ Error GDScriptLanguage::lookup_code(const String &p_code, const String &p_symbol
case GDScriptParser::COMPLETION_PARENT_FUNCTION:
case GDScriptParser::COMPLETION_FUNCTION: {
is_function = true;
- FALLTHROUGH;
+ [[fallthrough]];
}
case GDScriptParser::COMPLETION_IDENTIFIER: {
@@ -3462,7 +3462,7 @@ Error GDScriptLanguage::lookup_code(const String &p_code, const String &p_symbol
} break;
case GDScriptParser::COMPLETION_METHOD: {
is_function = true;
- FALLTHROUGH;
+ [[fallthrough]];
}
case GDScriptParser::COMPLETION_INDEX: {
const GDScriptParser::Node *node = parser.get_completion_node();
diff --git a/modules/gdscript/gdscript_functions.cpp b/modules/gdscript/gdscript_functions.cpp
index 426b5b58cb..aaa308f40f 100644
--- a/modules/gdscript/gdscript_functions.cpp
+++ b/modules/gdscript/gdscript_functions.cpp
@@ -162,7 +162,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
if (!p_args[m_arg]->is_num()) { \
r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; \
r_error.argument = m_arg; \
- r_error.expected = Variant::REAL; \
+ r_error.expected = Variant::FLOAT; \
r_ret = Variant(); \
return; \
}
@@ -272,7 +272,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
int64_t i = *p_args[0];
r_ret = ABS(i);
- } else if (p_args[0]->get_type() == Variant::REAL) {
+ } else if (p_args[0]->get_type() == Variant::FLOAT) {
double r = *p_args[0];
r_ret = Math::abs(r);
@@ -280,7 +280,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
- r_error.expected = Variant::REAL;
+ r_error.expected = Variant::FLOAT;
r_ret = Variant();
}
} break;
@@ -290,7 +290,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
int64_t i = *p_args[0];
r_ret = i < 0 ? -1 : (i > 0 ? +1 : 0);
- } else if (p_args[0]->get_type() == Variant::REAL) {
+ } else if (p_args[0]->get_type() == Variant::FLOAT) {
real_t r = *p_args[0];
r_ret = r < 0.0 ? -1.0 : (r > 0.0 ? +1.0 : 0.0);
@@ -298,7 +298,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
- r_error.expected = Variant::REAL;
+ r_error.expected = Variant::FLOAT;
r_ret = Variant();
}
} break;
@@ -360,7 +360,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
VALIDATE_ARG_COUNT(3);
VALIDATE_ARG_NUM(2);
const double t = (double)*p_args[2];
- switch (p_args[0]->get_type() == p_args[1]->get_type() ? p_args[0]->get_type() : Variant::REAL) {
+ switch (p_args[0]->get_type() == p_args[1]->get_type() ? p_args[0]->get_type() : Variant::FLOAT) {
case Variant::VECTOR2: {
r_ret = ((Vector2)*p_args[0]).linear_interpolate((Vector2)*p_args[1], t);
} break;
@@ -1359,7 +1359,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
case INSTANCE_FROM_ID: {
VALIDATE_ARG_COUNT(1);
- if (p_args[0]->get_type() != Variant::INT && p_args[0]->get_type() != Variant::REAL) {
+ if (p_args[0]->get_type() != Variant::INT && p_args[0]->get_type() != Variant::FLOAT) {
r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::INT;
@@ -1395,14 +1395,24 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
Vector<uint8_t> d = *p_args[0];
r_ret = d.size();
} break;
- case Variant::PACKED_INT_ARRAY: {
+ case Variant::PACKED_INT32_ARRAY: {
- Vector<int> d = *p_args[0];
+ Vector<int32_t> d = *p_args[0];
r_ret = d.size();
} break;
- case Variant::PACKED_REAL_ARRAY: {
+ case Variant::PACKED_INT64_ARRAY: {
- Vector<real_t> d = *p_args[0];
+ Vector<int64_t> d = *p_args[0];
+ r_ret = d.size();
+ } break;
+ case Variant::PACKED_FLOAT32_ARRAY: {
+
+ Vector<float> d = *p_args[0];
+ r_ret = d.size();
+ } break;
+ case Variant::PACKED_FLOAT64_ARRAY: {
+
+ Vector<double> d = *p_args[0];
r_ret = d.size();
} break;
case Variant::PACKED_STRING_ARRAY: {
@@ -1530,69 +1540,69 @@ MethodInfo GDScriptFunctions::get_info(Function p_func) {
switch (p_func) {
case MATH_SIN: {
- MethodInfo mi("sin", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("sin", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_COS: {
- MethodInfo mi("cos", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("cos", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_TAN: {
- MethodInfo mi("tan", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("tan", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_SINH: {
- MethodInfo mi("sinh", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("sinh", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_COSH: {
- MethodInfo mi("cosh", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("cosh", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_TANH: {
- MethodInfo mi("tanh", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("tanh", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_ASIN: {
- MethodInfo mi("asin", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("asin", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_ACOS: {
- MethodInfo mi("acos", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("acos", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_ATAN: {
- MethodInfo mi("atan", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("atan", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_ATAN2: {
- MethodInfo mi("atan2", PropertyInfo(Variant::REAL, "y"), PropertyInfo(Variant::REAL, "x"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("atan2", PropertyInfo(Variant::FLOAT, "y"), PropertyInfo(Variant::FLOAT, "x"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_SQRT: {
- MethodInfo mi("sqrt", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("sqrt", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_FMOD: {
- MethodInfo mi("fmod", PropertyInfo(Variant::REAL, "a"), PropertyInfo(Variant::REAL, "b"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("fmod", PropertyInfo(Variant::FLOAT, "a"), PropertyInfo(Variant::FLOAT, "b"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_FPOSMOD: {
- MethodInfo mi("fposmod", PropertyInfo(Variant::REAL, "a"), PropertyInfo(Variant::REAL, "b"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("fposmod", PropertyInfo(Variant::FLOAT, "a"), PropertyInfo(Variant::FLOAT, "b"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_POSMOD: {
@@ -1601,114 +1611,114 @@ MethodInfo GDScriptFunctions::get_info(Function p_func) {
return mi;
} break;
case MATH_FLOOR: {
- MethodInfo mi("floor", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("floor", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_CEIL: {
- MethodInfo mi("ceil", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("ceil", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_ROUND: {
- MethodInfo mi("round", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("round", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_ABS: {
- MethodInfo mi("abs", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("abs", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_SIGN: {
- MethodInfo mi("sign", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("sign", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_POW: {
- MethodInfo mi("pow", PropertyInfo(Variant::REAL, "base"), PropertyInfo(Variant::REAL, "exp"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("pow", PropertyInfo(Variant::FLOAT, "base"), PropertyInfo(Variant::FLOAT, "exp"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_LOG: {
- MethodInfo mi("log", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("log", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_EXP: {
- MethodInfo mi("exp", PropertyInfo(Variant::REAL, "s"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("exp", PropertyInfo(Variant::FLOAT, "s"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_ISNAN: {
- MethodInfo mi("is_nan", PropertyInfo(Variant::REAL, "s"));
+ MethodInfo mi("is_nan", PropertyInfo(Variant::FLOAT, "s"));
mi.return_val.type = Variant::BOOL;
return mi;
} break;
case MATH_ISINF: {
- MethodInfo mi("is_inf", PropertyInfo(Variant::REAL, "s"));
+ MethodInfo mi("is_inf", PropertyInfo(Variant::FLOAT, "s"));
mi.return_val.type = Variant::BOOL;
return mi;
} break;
case MATH_ISEQUALAPPROX: {
- MethodInfo mi("is_equal_approx", PropertyInfo(Variant::REAL, "a"), PropertyInfo(Variant::REAL, "b"));
+ MethodInfo mi("is_equal_approx", PropertyInfo(Variant::FLOAT, "a"), PropertyInfo(Variant::FLOAT, "b"));
mi.return_val.type = Variant::BOOL;
return mi;
} break;
case MATH_ISZEROAPPROX: {
- MethodInfo mi("is_zero_approx", PropertyInfo(Variant::REAL, "s"));
+ MethodInfo mi("is_zero_approx", PropertyInfo(Variant::FLOAT, "s"));
mi.return_val.type = Variant::BOOL;
return mi;
} break;
case MATH_EASE: {
- MethodInfo mi("ease", PropertyInfo(Variant::REAL, "s"), PropertyInfo(Variant::REAL, "curve"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("ease", PropertyInfo(Variant::FLOAT, "s"), PropertyInfo(Variant::FLOAT, "curve"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_STEP_DECIMALS: {
- MethodInfo mi("step_decimals", PropertyInfo(Variant::REAL, "step"));
+ MethodInfo mi("step_decimals", PropertyInfo(Variant::FLOAT, "step"));
mi.return_val.type = Variant::INT;
return mi;
} break;
case MATH_STEPIFY: {
- MethodInfo mi("stepify", PropertyInfo(Variant::REAL, "s"), PropertyInfo(Variant::REAL, "step"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("stepify", PropertyInfo(Variant::FLOAT, "s"), PropertyInfo(Variant::FLOAT, "step"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_LERP: {
- MethodInfo mi("lerp", PropertyInfo(Variant::NIL, "from"), PropertyInfo(Variant::NIL, "to"), PropertyInfo(Variant::REAL, "weight"));
+ MethodInfo mi("lerp", PropertyInfo(Variant::NIL, "from"), PropertyInfo(Variant::NIL, "to"), PropertyInfo(Variant::FLOAT, "weight"));
mi.return_val.type = Variant::NIL;
mi.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT;
return mi;
} break;
case MATH_LERP_ANGLE: {
- MethodInfo mi("lerp_angle", PropertyInfo(Variant::REAL, "from"), PropertyInfo(Variant::REAL, "to"), PropertyInfo(Variant::REAL, "weight"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("lerp_angle", PropertyInfo(Variant::FLOAT, "from"), PropertyInfo(Variant::FLOAT, "to"), PropertyInfo(Variant::FLOAT, "weight"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_INVERSE_LERP: {
- MethodInfo mi("inverse_lerp", PropertyInfo(Variant::REAL, "from"), PropertyInfo(Variant::REAL, "to"), PropertyInfo(Variant::REAL, "weight"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("inverse_lerp", PropertyInfo(Variant::FLOAT, "from"), PropertyInfo(Variant::FLOAT, "to"), PropertyInfo(Variant::FLOAT, "weight"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_RANGE_LERP: {
- MethodInfo mi("range_lerp", PropertyInfo(Variant::REAL, "value"), PropertyInfo(Variant::REAL, "istart"), PropertyInfo(Variant::REAL, "istop"), PropertyInfo(Variant::REAL, "ostart"), PropertyInfo(Variant::REAL, "ostop"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("range_lerp", PropertyInfo(Variant::FLOAT, "value"), PropertyInfo(Variant::FLOAT, "istart"), PropertyInfo(Variant::FLOAT, "istop"), PropertyInfo(Variant::FLOAT, "ostart"), PropertyInfo(Variant::FLOAT, "ostop"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_SMOOTHSTEP: {
- MethodInfo mi("smoothstep", PropertyInfo(Variant::REAL, "from"), PropertyInfo(Variant::REAL, "to"), PropertyInfo(Variant::REAL, "weight"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("smoothstep", PropertyInfo(Variant::FLOAT, "from"), PropertyInfo(Variant::FLOAT, "to"), PropertyInfo(Variant::FLOAT, "weight"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_MOVE_TOWARD: {
- MethodInfo mi("move_toward", PropertyInfo(Variant::REAL, "from"), PropertyInfo(Variant::REAL, "to"), PropertyInfo(Variant::REAL, "delta"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("move_toward", PropertyInfo(Variant::FLOAT, "from"), PropertyInfo(Variant::FLOAT, "to"), PropertyInfo(Variant::FLOAT, "delta"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_DECTIME: {
- MethodInfo mi("dectime", PropertyInfo(Variant::REAL, "value"), PropertyInfo(Variant::REAL, "amount"), PropertyInfo(Variant::REAL, "step"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("dectime", PropertyInfo(Variant::FLOAT, "value"), PropertyInfo(Variant::FLOAT, "amount"), PropertyInfo(Variant::FLOAT, "step"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_RANDOMIZE: {
@@ -1723,12 +1733,12 @@ MethodInfo GDScriptFunctions::get_info(Function p_func) {
} break;
case MATH_RANDF: {
MethodInfo mi("randf");
- mi.return_val.type = Variant::REAL;
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_RANDOM: {
- MethodInfo mi("rand_range", PropertyInfo(Variant::REAL, "from"), PropertyInfo(Variant::REAL, "to"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("rand_range", PropertyInfo(Variant::FLOAT, "from"), PropertyInfo(Variant::FLOAT, "to"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_SEED: {
@@ -1742,32 +1752,32 @@ MethodInfo GDScriptFunctions::get_info(Function p_func) {
return mi;
} break;
case MATH_DEG2RAD: {
- MethodInfo mi("deg2rad", PropertyInfo(Variant::REAL, "deg"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("deg2rad", PropertyInfo(Variant::FLOAT, "deg"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_RAD2DEG: {
- MethodInfo mi("rad2deg", PropertyInfo(Variant::REAL, "rad"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("rad2deg", PropertyInfo(Variant::FLOAT, "rad"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_LINEAR2DB: {
- MethodInfo mi("linear2db", PropertyInfo(Variant::REAL, "nrg"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("linear2db", PropertyInfo(Variant::FLOAT, "nrg"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_DB2LINEAR: {
- MethodInfo mi("db2linear", PropertyInfo(Variant::REAL, "db"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("db2linear", PropertyInfo(Variant::FLOAT, "db"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case MATH_POLAR2CARTESIAN: {
- MethodInfo mi("polar2cartesian", PropertyInfo(Variant::REAL, "r"), PropertyInfo(Variant::REAL, "th"));
+ MethodInfo mi("polar2cartesian", PropertyInfo(Variant::FLOAT, "r"), PropertyInfo(Variant::FLOAT, "th"));
mi.return_val.type = Variant::VECTOR2;
return mi;
} break;
case MATH_CARTESIAN2POLAR: {
- MethodInfo mi("cartesian2polar", PropertyInfo(Variant::REAL, "x"), PropertyInfo(Variant::REAL, "y"));
+ MethodInfo mi("cartesian2polar", PropertyInfo(Variant::FLOAT, "x"), PropertyInfo(Variant::FLOAT, "y"));
mi.return_val.type = Variant::VECTOR2;
return mi;
} break;
@@ -1777,24 +1787,24 @@ MethodInfo GDScriptFunctions::get_info(Function p_func) {
return mi;
} break;
case MATH_WRAPF: {
- MethodInfo mi("wrapf", PropertyInfo(Variant::REAL, "value"), PropertyInfo(Variant::REAL, "min"), PropertyInfo(Variant::REAL, "max"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("wrapf", PropertyInfo(Variant::FLOAT, "value"), PropertyInfo(Variant::FLOAT, "min"), PropertyInfo(Variant::FLOAT, "max"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case LOGIC_MAX: {
- MethodInfo mi("max", PropertyInfo(Variant::REAL, "a"), PropertyInfo(Variant::REAL, "b"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("max", PropertyInfo(Variant::FLOAT, "a"), PropertyInfo(Variant::FLOAT, "b"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case LOGIC_MIN: {
- MethodInfo mi("min", PropertyInfo(Variant::REAL, "a"), PropertyInfo(Variant::REAL, "b"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("min", PropertyInfo(Variant::FLOAT, "a"), PropertyInfo(Variant::FLOAT, "b"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case LOGIC_CLAMP: {
- MethodInfo mi("clamp", PropertyInfo(Variant::REAL, "value"), PropertyInfo(Variant::REAL, "min"), PropertyInfo(Variant::REAL, "max"));
- mi.return_val.type = Variant::REAL;
+ MethodInfo mi("clamp", PropertyInfo(Variant::FLOAT, "value"), PropertyInfo(Variant::FLOAT, "min"), PropertyInfo(Variant::FLOAT, "max"));
+ mi.return_val.type = Variant::FLOAT;
return mi;
} break;
case LOGIC_NEAREST_PO2: {
@@ -2012,7 +2022,7 @@ MethodInfo GDScriptFunctions::get_info(Function p_func) {
} break;
case COLORN: {
- MethodInfo mi("ColorN", PropertyInfo(Variant::STRING, "name"), PropertyInfo(Variant::REAL, "alpha"));
+ MethodInfo mi("ColorN", PropertyInfo(Variant::STRING, "name"), PropertyInfo(Variant::FLOAT, "alpha"));
mi.default_arguments.push_back(1.0f);
mi.return_val.type = Variant::COLOR;
return mi;
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index ce6226d757..0382944efd 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/modules/gdscript/gdscript_parser.cpp
@@ -793,7 +793,7 @@ GDScriptParser::Node *GDScriptParser::_parse_expression(Node *p_parent, bool p_s
}
_add_warning(GDScriptWarning::UNASSIGNED_VARIABLE_OP_ASSIGN, -1, identifier.operator String());
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case GDScriptTokenizer::TK_OP_ASSIGN: {
lv->assignments += 1;
@@ -2766,13 +2766,12 @@ void GDScriptParser::_parse_block(BlockNode *p_block, bool p_static) {
}
#endif // DEBUG_ENABLED
switch (token) {
- case GDScriptTokenizer::TK_EOF:
+ case GDScriptTokenizer::TK_EOF: {
p_block->end_line = tokenizer->get_token_line();
+ return; // End of file!
+ } break;
case GDScriptTokenizer::TK_ERROR: {
- return; //go back
-
- //end of file!
-
+ return;
} break;
case GDScriptTokenizer::TK_NEWLINE: {
@@ -3109,7 +3108,7 @@ void GDScriptParser::_parse_block(BlockNode *p_block, bool p_static) {
args.push_back(op->arguments[i]);
if (constant && op->arguments[i]->type == Node::TYPE_CONSTANT) {
ConstantNode *c = static_cast<ConstantNode *>(op->arguments[i]);
- if (c->value.get_type() == Variant::REAL || c->value.get_type() == Variant::INT) {
+ if (c->value.get_type() == Variant::FLOAT || c->value.get_type() == Variant::INT) {
constants.push_back(c->value);
constant = true;
}
@@ -3525,11 +3524,12 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
case GDScriptTokenizer::TK_CURSOR: {
tokenizer->advance();
} break;
- case GDScriptTokenizer::TK_EOF:
+ case GDScriptTokenizer::TK_EOF: {
p_class->end_line = tokenizer->get_token_line();
+ return; // End of file!
+ } break;
case GDScriptTokenizer::TK_ERROR: {
- return; //go back
- //end of file!
+ return; // Go back.
} break;
case GDScriptTokenizer::TK_NEWLINE: {
if (!_parse_newline()) {
@@ -3719,7 +3719,7 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
return;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case GDScriptTokenizer::TK_PR_FUNCTION: {
@@ -4220,9 +4220,9 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
- case Variant::REAL: {
+ case Variant::FLOAT: {
if (tokenizer->get_token() == GDScriptTokenizer::TK_IDENTIFIER && tokenizer->get_token_identifier() == "EASE") {
current_export.hint = PROPERTY_HINT_EXP_EASING;
@@ -5489,7 +5489,7 @@ String GDScriptParser::DataType::to_string() const {
if (!gds_class.empty()) {
return gds_class;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case SCRIPT: {
if (is_meta_type) {
@@ -5955,10 +5955,10 @@ GDScriptParser::DataType GDScriptParser::_get_operation_type(const Variant::Oper
}
// Avoid division by zero
- if (a_type == Variant::INT || a_type == Variant::REAL) {
+ if (a_type == Variant::INT || a_type == Variant::FLOAT) {
Variant::evaluate(Variant::OP_ADD, a, 1, a, r_valid);
}
- if (b_type == Variant::INT || b_type == Variant::REAL) {
+ if (b_type == Variant::INT || b_type == Variant::FLOAT) {
Variant::evaluate(Variant::OP_ADD, b, 1, b, r_valid);
}
if (a_type == Variant::STRING && b_type != Variant::ARRAY) {
@@ -6598,14 +6598,16 @@ GDScriptParser::DataType GDScriptParser::_reduce_node_type(Node *p_node) {
// Expect int or real as index
case Variant::PACKED_BYTE_ARRAY:
case Variant::PACKED_COLOR_ARRAY:
- case Variant::PACKED_INT_ARRAY:
- case Variant::PACKED_REAL_ARRAY:
+ case Variant::PACKED_INT32_ARRAY:
+ case Variant::PACKED_INT64_ARRAY:
+ case Variant::PACKED_FLOAT32_ARRAY:
+ case Variant::PACKED_FLOAT64_ARRAY:
case Variant::PACKED_STRING_ARRAY:
case Variant::PACKED_VECTOR2_ARRAY:
case Variant::PACKED_VECTOR3_ARRAY:
case Variant::ARRAY:
case Variant::STRING: {
- error = index_type.builtin_type != Variant::INT && index_type.builtin_type != Variant::REAL;
+ error = index_type.builtin_type != Variant::INT && index_type.builtin_type != Variant::FLOAT;
} break;
// Expect String only
case Variant::RECT2:
@@ -6621,7 +6623,7 @@ GDScriptParser::DataType GDScriptParser::_reduce_node_type(Node *p_node) {
case Variant::TRANSFORM2D:
case Variant::BASIS:
case Variant::TRANSFORM: {
- error = index_type.builtin_type != Variant::INT && index_type.builtin_type != Variant::REAL &&
+ error = index_type.builtin_type != Variant::INT && index_type.builtin_type != Variant::FLOAT &&
index_type.builtin_type != Variant::STRING;
} break;
// Expect String or int
@@ -6648,8 +6650,10 @@ GDScriptParser::DataType GDScriptParser::_reduce_node_type(Node *p_node) {
case Variant::DICTIONARY:
case Variant::PACKED_BYTE_ARRAY:
case Variant::PACKED_COLOR_ARRAY:
- case Variant::PACKED_INT_ARRAY:
- case Variant::PACKED_REAL_ARRAY:
+ case Variant::PACKED_INT32_ARRAY:
+ case Variant::PACKED_INT64_ARRAY:
+ case Variant::PACKED_FLOAT32_ARRAY:
+ case Variant::PACKED_FLOAT64_ARRAY:
case Variant::PACKED_STRING_ARRAY:
case Variant::PACKED_VECTOR2_ARRAY:
case Variant::PACKED_VECTOR3_ARRAY: {
@@ -6691,7 +6695,7 @@ GDScriptParser::DataType GDScriptParser::_reduce_node_type(Node *p_node) {
case Variant::NIL:
case Variant::BOOL:
case Variant::INT:
- case Variant::REAL:
+ case Variant::FLOAT:
case Variant::NODE_PATH:
case Variant::_RID: {
_set_error("Can't index on a value of type \"" + base_type.to_string() + "\".", op->line);
@@ -6699,15 +6703,17 @@ GDScriptParser::DataType GDScriptParser::_reduce_node_type(Node *p_node) {
} break;
// Return int
case Variant::PACKED_BYTE_ARRAY:
- case Variant::PACKED_INT_ARRAY: {
+ case Variant::PACKED_INT32_ARRAY:
+ case Variant::PACKED_INT64_ARRAY: {
result.builtin_type = Variant::INT;
} break;
// Return real
- case Variant::PACKED_REAL_ARRAY:
+ case Variant::PACKED_FLOAT32_ARRAY:
+ case Variant::PACKED_FLOAT64_ARRAY:
case Variant::VECTOR2:
case Variant::VECTOR3:
case Variant::QUAT: {
- result.builtin_type = Variant::REAL;
+ result.builtin_type = Variant::FLOAT;
} break;
// Return color
case Variant::PACKED_COLOR_ARRAY: {
@@ -7002,7 +7008,7 @@ GDScriptParser::DataType GDScriptParser::_reduce_function_call_type(const Operat
break;
} else {
#ifdef DEBUG_ENABLED
- if (arg_type.kind == DataType::BUILTIN && arg_type.builtin_type == Variant::INT && par_types[i].kind == DataType::BUILTIN && par_types[i].builtin_type == Variant::REAL) {
+ if (arg_type.kind == DataType::BUILTIN && arg_type.builtin_type == Variant::INT && par_types[i].kind == DataType::BUILTIN && par_types[i].builtin_type == Variant::FLOAT) {
_add_warning(GDScriptWarning::NARROWING_CONVERSION, p_call->line, Variant::get_type_name(tn->vtype));
}
if (par_types[i].may_yield && p_call->arguments[i + 1]->type == Node::TYPE_OPERATOR) {
@@ -7245,7 +7251,7 @@ GDScriptParser::DataType GDScriptParser::_reduce_function_call_type(const Operat
_mark_line_as_unsafe(p_call->line);
}
} else {
- if (arg_type.kind == DataType::BUILTIN && arg_type.builtin_type == Variant::INT && par_type.kind == DataType::BUILTIN && par_type.builtin_type == Variant::REAL) {
+ if (arg_type.kind == DataType::BUILTIN && arg_type.builtin_type == Variant::INT && par_type.kind == DataType::BUILTIN && par_type.builtin_type == Variant::FLOAT) {
_add_warning(GDScriptWarning::NARROWING_CONVERSION, p_call->line, callee_name);
}
}
@@ -8103,7 +8109,7 @@ void GDScriptParser::_check_block_types(BlockNode *p_block) {
lv->assign = convert_call;
lv->assign_op->arguments.write[1] = convert_call;
#ifdef DEBUG_ENABLED
- if (lv->datatype.builtin_type == Variant::INT && assign_type.builtin_type == Variant::REAL) {
+ if (lv->datatype.builtin_type == Variant::INT && assign_type.builtin_type == Variant::FLOAT) {
_add_warning(GDScriptWarning::NARROWING_CONVERSION, lv->line);
}
#endif // DEBUG_ENABLED
@@ -8240,7 +8246,7 @@ void GDScriptParser::_check_block_types(BlockNode *p_block) {
type_match = true; // Since we are converting, the type is matching
}
#ifdef DEBUG_ENABLED
- if (lh_type.builtin_type == Variant::INT && rh_type.builtin_type == Variant::REAL) {
+ if (lh_type.builtin_type == Variant::INT && rh_type.builtin_type == Variant::FLOAT) {
_add_warning(GDScriptWarning::NARROWING_CONVERSION, op->line);
}
#endif // DEBUG_ENABLED
@@ -8345,7 +8351,7 @@ void GDScriptParser::_check_block_types(BlockNode *p_block) {
if (cn->value.get_type() == Variant::STRING) {
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
default: {
_mark_line_as_safe(statement->line);
diff --git a/modules/gdscript/gdscript_tokenizer.cpp b/modules/gdscript/gdscript_tokenizer.cpp
index adcdbdc4a4..9064998d32 100644
--- a/modules/gdscript/gdscript_tokenizer.cpp
+++ b/modules/gdscript/gdscript_tokenizer.cpp
@@ -146,7 +146,7 @@ static const _bit _type_list[] = {
//types
{ Variant::BOOL, "bool" },
{ Variant::INT, "int" },
- { Variant::REAL, "float" },
+ { Variant::FLOAT, "float" },
{ Variant::STRING, "String" },
{ Variant::VECTOR2, "Vector2" },
{ Variant::VECTOR2I, "Vector2i" },
@@ -170,8 +170,10 @@ static const _bit _type_list[] = {
{ Variant::SIGNAL, "Signal" },
{ Variant::ARRAY, "Array" },
{ Variant::PACKED_BYTE_ARRAY, "PackedByteArray" },
- { Variant::PACKED_INT_ARRAY, "PackedIntArray" },
- { Variant::PACKED_REAL_ARRAY, "PackedRealArray" },
+ { Variant::PACKED_INT32_ARRAY, "PackedInt32Array" },
+ { Variant::PACKED_INT64_ARRAY, "PackedInt64Array" },
+ { Variant::PACKED_FLOAT32_ARRAY, "PackedFloat32Array" },
+ { Variant::PACKED_FLOAT64_ARRAY, "PackedFloat64Array" },
{ Variant::PACKED_STRING_ARRAY, "PackedStringArray" },
{ Variant::PACKED_VECTOR2_ARRAY, "PackedVector2Array" },
{ Variant::PACKED_VECTOR3_ARRAY, "PackedVector3Array" },
@@ -343,7 +345,7 @@ StringName GDScriptTokenizer::get_token_literal(int p_offset) const {
default: {
}
}
- }
+ } break;
case TK_OP_AND:
case TK_OP_OR:
break; // Don't get into default, since they can be non-literal
@@ -539,7 +541,7 @@ void GDScriptTokenizerText::_advance() {
ignore_warnings = true;
}
#endif // DEBUG_ENABLED
- FALLTHROUGH;
+ [[fallthrough]];
}
case '\n': {
line++;
@@ -756,7 +758,7 @@ void GDScriptTokenizerText::_advance() {
}
INCPOS(1);
is_string_name = true;
- FALLTHROUGH;
+ [[fallthrough]];
case '\'':
case '"': {
diff --git a/modules/gdscript/language_server/gdscript_language_protocol.cpp b/modules/gdscript/language_server/gdscript_language_protocol.cpp
index 2eb1bb441e..2243a7b81d 100644
--- a/modules/gdscript/language_server/gdscript_language_protocol.cpp
+++ b/modules/gdscript/language_server/gdscript_language_protocol.cpp
@@ -122,7 +122,7 @@ Error GDScriptLanguageProtocol::LSPeer::send_data() {
Error GDScriptLanguageProtocol::on_client_connected() {
Ref<StreamPeerTCP> tcp_peer = server->take_connection();
ERR_FAIL_COND_V_MSG(clients.size() >= LSP_MAX_CLIENTS, FAILED, "Max client limits reached");
- Ref<LSPeer> peer = new LSPeer;
+ Ref<LSPeer> peer = memnew(LSPeer);
peer->connection = tcp_peer;
clients.set(next_client_id, peer);
next_client_id++;
@@ -130,7 +130,7 @@ Error GDScriptLanguageProtocol::on_client_connected() {
return OK;
}
-void GDScriptLanguageProtocol::on_client_disconnected(int p_client_id) {
+void GDScriptLanguageProtocol::on_client_disconnected(const int &p_client_id) {
clients.erase(p_client_id);
EditorNode::get_log()->add_message("Disconnected", EditorLog::MSG_TYPE_EDITOR);
}
diff --git a/modules/gdscript/language_server/gdscript_language_protocol.h b/modules/gdscript/language_server/gdscript_language_protocol.h
index 8596e0300e..3f0ae36af2 100644
--- a/modules/gdscript/language_server/gdscript_language_protocol.h
+++ b/modules/gdscript/language_server/gdscript_language_protocol.h
@@ -77,7 +77,7 @@ private:
Ref<GDScriptWorkspace> workspace;
Error on_client_connected();
- void on_client_disconnected(int p_client_id);
+ void on_client_disconnected(const int &p_client_id);
String process_message(const String &p_text);
String format_output(const String &p_text);
diff --git a/modules/gdscript/language_server/gdscript_workspace.cpp b/modules/gdscript/language_server/gdscript_workspace.cpp
index 1c0590cff1..ea54784f96 100644
--- a/modules/gdscript/language_server/gdscript_workspace.cpp
+++ b/modules/gdscript/language_server/gdscript_workspace.cpp
@@ -33,8 +33,11 @@
#include "../gdscript_parser.h"
#include "core/project_settings.h"
#include "core/script_language.h"
+#include "editor/editor_file_system.h"
#include "editor/editor_help.h"
+#include "editor/editor_node.h"
#include "gdscript_language_protocol.h"
+#include "scene/resources/packed_scene.h"
void GDScriptWorkspace::_bind_methods() {
ClassDB::bind_method(D_METHOD("symbol"), &GDScriptWorkspace::symbol);
@@ -373,6 +376,46 @@ void GDScriptWorkspace::publish_diagnostics(const String &p_path) {
GDScriptLanguageProtocol::get_singleton()->notify_client("textDocument/publishDiagnostics", params);
}
+void GDScriptWorkspace::_get_owners(EditorFileSystemDirectory *efsd, String p_path, List<String> &owners) {
+ if (!efsd)
+ return;
+
+ for (int i = 0; i < efsd->get_subdir_count(); i++) {
+ _get_owners(efsd->get_subdir(i), p_path, owners);
+ }
+
+ for (int i = 0; i < efsd->get_file_count(); i++) {
+
+ Vector<String> deps = efsd->get_file_deps(i);
+ bool found = false;
+ for (int j = 0; j < deps.size(); j++) {
+ if (deps[j] == p_path) {
+ found = true;
+ break;
+ }
+ }
+ if (!found)
+ continue;
+
+ owners.push_back(efsd->get_file_path(i));
+ }
+}
+
+Node *GDScriptWorkspace::_get_owner_node(String p_path) {
+ Node *owner_node = NULL;
+ List<String> owners;
+
+ _get_owners(EditorFileSystem::get_singleton()->get_filesystem(), p_path, owners);
+
+ if (owners.size() > 0) {
+ NodePath owner_path = owners[0];
+ Ref<PackedScene> owner_res = ResourceLoader::load(owner_path);
+ owner_node = owner_res->instance(PackedScene::GEN_EDIT_STATE_DISABLED);
+ }
+
+ return owner_node;
+}
+
void GDScriptWorkspace::completion(const lsp::CompletionParams &p_params, List<ScriptCodeCompletionOption> *r_options) {
String path = get_file_path(p_params.textDocument.uri);
@@ -380,8 +423,12 @@ void GDScriptWorkspace::completion(const lsp::CompletionParams &p_params, List<S
bool forced = false;
if (const ExtendGDScriptParser *parser = get_parse_result(path)) {
+ Node *owner_node = _get_owner_node(path);
String code = parser->get_text_for_completion(p_params.position);
- GDScriptLanguage::get_singleton()->complete_code(code, path, NULL, r_options, forced, call_hint);
+ GDScriptLanguage::get_singleton()->complete_code(code, path, owner_node, r_options, forced, call_hint);
+ if (owner_node) {
+ memdelete(owner_node);
+ }
}
}
diff --git a/modules/gdscript/language_server/gdscript_workspace.h b/modules/gdscript/language_server/gdscript_workspace.h
index 146a5cb7c9..8b46d345d9 100644
--- a/modules/gdscript/language_server/gdscript_workspace.h
+++ b/modules/gdscript/language_server/gdscript_workspace.h
@@ -33,12 +33,17 @@
#include "../gdscript_parser.h"
#include "core/variant.h"
+#include "editor/editor_file_system.h"
#include "gdscript_extend_parser.h"
#include "lsp.hpp"
class GDScriptWorkspace : public Reference {
GDCLASS(GDScriptWorkspace, Reference);
+private:
+ void _get_owners(EditorFileSystemDirectory *efsd, String p_path, List<String> &owners);
+ Node *_get_owner_node(String p_path);
+
protected:
static void _bind_methods();
void remove_cache_parser(const String &p_path);
diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp
index ba0449c046..84075f76fd 100644
--- a/modules/gridmap/grid_map.cpp
+++ b/modules/gridmap/grid_map.cpp
@@ -874,7 +874,7 @@ void GridMap::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "cell_center_x"), "set_center_x", "get_center_x");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "cell_center_y"), "set_center_y", "get_center_y");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "cell_center_z"), "set_center_z", "get_center_z");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "cell_scale"), "set_cell_scale", "get_cell_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "cell_scale"), "set_cell_scale", "get_cell_scale");
ADD_GROUP("Collision", "collision_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_layer", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_collision_layer", "get_collision_layer");
ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_mask", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_collision_mask", "get_collision_mask");
diff --git a/modules/mobile_vr/mobile_vr_interface.cpp b/modules/mobile_vr/mobile_vr_interface.cpp
index afa8766bce..2f1d95cd42 100644
--- a/modules/mobile_vr/mobile_vr_interface.cpp
+++ b/modules/mobile_vr/mobile_vr_interface.cpp
@@ -221,13 +221,13 @@ void MobileVRInterface::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_k2", "k"), &MobileVRInterface::set_k2);
ClassDB::bind_method(D_METHOD("get_k2"), &MobileVRInterface::get_k2);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "eye_height", PROPERTY_HINT_RANGE, "0.0,3.0,0.1"), "set_eye_height", "get_eye_height");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "iod", PROPERTY_HINT_RANGE, "4.0,10.0,0.1"), "set_iod", "get_iod");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "display_width", PROPERTY_HINT_RANGE, "5.0,25.0,0.1"), "set_display_width", "get_display_width");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "display_to_lens", PROPERTY_HINT_RANGE, "5.0,25.0,0.1"), "set_display_to_lens", "get_display_to_lens");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "oversample", PROPERTY_HINT_RANGE, "1.0,2.0,0.1"), "set_oversample", "get_oversample");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "k1", PROPERTY_HINT_RANGE, "0.1,10.0,0.0001"), "set_k1", "get_k1");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "k2", PROPERTY_HINT_RANGE, "0.1,10.0,0.0001"), "set_k2", "get_k2");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "eye_height", PROPERTY_HINT_RANGE, "0.0,3.0,0.1"), "set_eye_height", "get_eye_height");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "iod", PROPERTY_HINT_RANGE, "4.0,10.0,0.1"), "set_iod", "get_iod");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "display_width", PROPERTY_HINT_RANGE, "5.0,25.0,0.1"), "set_display_width", "get_display_width");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "display_to_lens", PROPERTY_HINT_RANGE, "5.0,25.0,0.1"), "set_display_to_lens", "get_display_to_lens");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "oversample", PROPERTY_HINT_RANGE, "1.0,2.0,0.1"), "set_oversample", "get_oversample");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "k1", PROPERTY_HINT_RANGE, "0.1,10.0,0.0001"), "set_k1", "get_k1");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "k2", PROPERTY_HINT_RANGE, "0.1,10.0,0.0001"), "set_k2", "get_k2");
}
void MobileVRInterface::set_eye_height(const real_t p_eye_height) {
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index 2b3b6aa98a..5c1c098e3e 100644
--- a/modules/mono/csharp_script.cpp
+++ b/modules/mono/csharp_script.cpp
@@ -411,7 +411,7 @@ static String variant_type_to_managed_name(const String &p_var_type_name) {
if (p_var_type_name == Variant::get_type_name(Variant::OBJECT))
return "Godot.Object";
- if (p_var_type_name == Variant::get_type_name(Variant::REAL)) {
+ if (p_var_type_name == Variant::get_type_name(Variant::FLOAT)) {
#ifdef REAL_T_IS_DOUBLE
return "double";
#else
@@ -430,9 +430,9 @@ static String variant_type_to_managed_name(const String &p_var_type_name) {
if (p_var_type_name == Variant::get_type_name(Variant::PACKED_BYTE_ARRAY))
return "byte[]";
- if (p_var_type_name == Variant::get_type_name(Variant::PACKED_INT_ARRAY))
+ if (p_var_type_name == Variant::get_type_name(Variant::PACKED_INT32_ARRAY))
return "int[]";
- if (p_var_type_name == Variant::get_type_name(Variant::PACKED_REAL_ARRAY)) {
+ if (p_var_type_name == Variant::get_type_name(Variant::PACKED_FLOAT32_ARRAY)) {
#ifdef REAL_T_IS_DOUBLE
return "double[]";
#else
diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp
index 10595b4fcc..908c72c591 100644
--- a/modules/mono/editor/bindings_generator.cpp
+++ b/modules/mono/editor/bindings_generator.cpp
@@ -505,9 +505,9 @@ String BindingsGenerator::bbcode_to_xml(const String &p_bbcode, const TypeInterf
xml_output.append("</c>");
} else if (tag == "PackedByteArray") {
xml_output.append("<see cref=\"byte\"/>");
- } else if (tag == "PackedIntArray") {
+ } else if (tag == "PackedInt32Array") {
xml_output.append("<see cref=\"int\"/>");
- } else if (tag == "PackedRealArray") {
+ } else if (tag == "PackedFloat32Array") {
#ifdef REAL_T_IS_DOUBLE
xml_output.append("<see cref=\"double\"/>");
#else
@@ -2383,7 +2383,7 @@ bool BindingsGenerator::_populate_object_type_interfaces() {
} else {
if (return_info.type == Variant::INT) {
imethod.return_type.cname = _get_int_type_name_from_meta(m ? m->get_argument_meta(-1) : GodotTypeInfo::METADATA_NONE);
- } else if (return_info.type == Variant::REAL) {
+ } else if (return_info.type == Variant::FLOAT) {
imethod.return_type.cname = _get_float_type_name_from_meta(m ? m->get_argument_meta(-1) : GodotTypeInfo::METADATA_NONE);
} else {
imethod.return_type.cname = Variant::get_type_name(return_info.type);
@@ -2410,7 +2410,7 @@ bool BindingsGenerator::_populate_object_type_interfaces() {
} else {
if (arginfo.type == Variant::INT) {
iarg.type.cname = _get_int_type_name_from_meta(m ? m->get_argument_meta(i) : GodotTypeInfo::METADATA_NONE);
- } else if (arginfo.type == Variant::REAL) {
+ } else if (arginfo.type == Variant::FLOAT) {
iarg.type.cname = _get_float_type_name_from_meta(m ? m->get_argument_meta(i) : GodotTypeInfo::METADATA_NONE);
} else {
iarg.type.cname = Variant::get_type_name(arginfo.type);
@@ -2581,7 +2581,7 @@ bool BindingsGenerator::_arg_default_value_from_variant(const Variant &p_val, Ar
r_iarg.default_argument = "(%s)" + r_iarg.default_argument;
}
break;
- case Variant::REAL:
+ case Variant::FLOAT:
#ifndef REAL_T_IS_DOUBLE
r_iarg.default_argument += "f";
#endif
@@ -2629,8 +2629,10 @@ bool BindingsGenerator::_arg_default_value_from_variant(const Variant &p_val, Ar
break;
case Variant::ARRAY:
case Variant::PACKED_BYTE_ARRAY:
- case Variant::PACKED_INT_ARRAY:
- case Variant::PACKED_REAL_ARRAY:
+ case Variant::PACKED_INT32_ARRAY:
+ case Variant::PACKED_FLOAT32_ARRAY:
+ case Variant::PACKED_INT64_ARRAY:
+ case Variant::PACKED_FLOAT64_ARRAY:
case Variant::PACKED_STRING_ARRAY:
case Variant::PACKED_VECTOR2_ARRAY:
case Variant::PACKED_VECTOR3_ARRAY:
@@ -2914,13 +2916,13 @@ void BindingsGenerator::_populate_builtin_type_interfaces() {
#define INSERT_ARRAY(m_type, m_proxy_t) INSERT_ARRAY_FULL(m_type, m_type, m_proxy_t)
- INSERT_ARRAY(PackedIntArray, int);
+ INSERT_ARRAY(PackedInt32Array, int);
INSERT_ARRAY_FULL(PackedByteArray, PackedByteArray, byte);
#ifdef REAL_T_IS_DOUBLE
- INSERT_ARRAY(PackedRealArray, double);
+ INSERT_ARRAY(PackedFloat32Array, double);
#else
- INSERT_ARRAY(PackedRealArray, float);
+ INSERT_ARRAY(PackedFloat32Array, float);
#endif
INSERT_ARRAY(PackedStringArray, string);
diff --git a/modules/mono/mono_gd/gd_mono_field.cpp b/modules/mono/mono_gd/gd_mono_field.cpp
index 21d78483ee..03b56c9949 100644
--- a/modules/mono/mono_gd/gd_mono_field.cpp
+++ b/modules/mono/mono_gd/gd_mono_field.cpp
@@ -252,12 +252,12 @@ void GDMonoField::set_value_from_variant(MonoObject *p_object, const Variant &p_
}
if (array_type->eklass == CACHED_CLASS_RAW(int32_t)) {
- SET_FROM_ARRAY(PackedIntArray);
+ SET_FROM_ARRAY(PackedInt32Array);
break;
}
if (array_type->eklass == REAL_T_MONOCLASS) {
- SET_FROM_ARRAY(PackedRealArray);
+ SET_FROM_ARRAY(PackedFloat32Array);
break;
}
@@ -370,7 +370,7 @@ void GDMonoField::set_value_from_variant(MonoObject *p_object, const Variant &p_
int32_t val = p_value.operator signed int();
mono_field_set_value(p_object, mono_field, &val);
} break;
- case Variant::REAL: {
+ case Variant::FLOAT: {
#ifdef REAL_T_IS_DOUBLE
double val = p_value.operator double();
mono_field_set_value(p_object, mono_field, &val);
@@ -437,11 +437,11 @@ void GDMonoField::set_value_from_variant(MonoObject *p_object, const Variant &p_
case Variant::PACKED_BYTE_ARRAY: {
SET_FROM_ARRAY(PackedByteArray);
} break;
- case Variant::PACKED_INT_ARRAY: {
- SET_FROM_ARRAY(PackedIntArray);
+ case Variant::PACKED_INT32_ARRAY: {
+ SET_FROM_ARRAY(PackedInt32Array);
} break;
- case Variant::PACKED_REAL_ARRAY: {
- SET_FROM_ARRAY(PackedRealArray);
+ case Variant::PACKED_FLOAT32_ARRAY: {
+ SET_FROM_ARRAY(PackedFloat32Array);
} break;
case Variant::PACKED_STRING_ARRAY: {
SET_FROM_ARRAY(PackedStringArray);
diff --git a/modules/mono/mono_gd/gd_mono_marshal.cpp b/modules/mono/mono_gd/gd_mono_marshal.cpp
index 63890f6066..695be64d6e 100644
--- a/modules/mono/mono_gd/gd_mono_marshal.cpp
+++ b/modules/mono/mono_gd/gd_mono_marshal.cpp
@@ -60,9 +60,9 @@ Variant::Type managed_to_variant_type(const ManagedType &p_type) {
return Variant::INT;
case MONO_TYPE_R4:
- return Variant::REAL;
+ return Variant::FLOAT;
case MONO_TYPE_R8:
- return Variant::REAL;
+ return Variant::FLOAT;
case MONO_TYPE_STRING: {
return Variant::STRING;
@@ -116,10 +116,10 @@ Variant::Type managed_to_variant_type(const ManagedType &p_type) {
return Variant::PACKED_BYTE_ARRAY;
if (array_type->eklass == CACHED_CLASS_RAW(int32_t))
- return Variant::PACKED_INT_ARRAY;
+ return Variant::PACKED_INT32_ARRAY;
if (array_type->eklass == REAL_T_MONOCLASS)
- return Variant::PACKED_REAL_ARRAY;
+ return Variant::PACKED_FLOAT32_ARRAY;
if (array_type->eklass == CACHED_CLASS_RAW(String))
return Variant::PACKED_STRING_ARRAY;
@@ -494,10 +494,10 @@ MonoObject *variant_to_mono_object(const Variant *p_var, const ManagedType &p_ty
return (MonoObject *)PackedByteArray_to_mono_array(p_var->operator PackedByteArray());
if (array_type->eklass == CACHED_CLASS_RAW(int32_t))
- return (MonoObject *)PackedIntArray_to_mono_array(p_var->operator PackedIntArray());
+ return (MonoObject *)PackedInt32Array_to_mono_array(p_var->operator PackedInt32Array());
if (array_type->eklass == REAL_T_MONOCLASS)
- return (MonoObject *)PackedRealArray_to_mono_array(p_var->operator PackedRealArray());
+ return (MonoObject *)PackedFloat32Array_to_mono_array(p_var->operator PackedFloat32Array());
if (array_type->eklass == CACHED_CLASS_RAW(String))
return (MonoObject *)PackedStringArray_to_mono_array(p_var->operator PackedStringArray());
@@ -577,7 +577,7 @@ MonoObject *variant_to_mono_object(const Variant *p_var, const ManagedType &p_ty
int32_t val = p_var->operator signed int();
return BOX_INT32(val);
}
- case Variant::REAL: {
+ case Variant::FLOAT: {
#ifdef REAL_T_IS_DOUBLE
double val = p_var->operator double();
return BOX_DOUBLE(val);
@@ -640,10 +640,10 @@ MonoObject *variant_to_mono_object(const Variant *p_var, const ManagedType &p_ty
return GDMonoUtils::create_managed_from(p_var->operator Array(), CACHED_CLASS(Array));
case Variant::PACKED_BYTE_ARRAY:
return (MonoObject *)PackedByteArray_to_mono_array(p_var->operator PackedByteArray());
- case Variant::PACKED_INT_ARRAY:
- return (MonoObject *)PackedIntArray_to_mono_array(p_var->operator PackedIntArray());
- case Variant::PACKED_REAL_ARRAY:
- return (MonoObject *)PackedRealArray_to_mono_array(p_var->operator PackedRealArray());
+ case Variant::PACKED_INT32_ARRAY:
+ return (MonoObject *)PackedInt32Array_to_mono_array(p_var->operator PackedInt32Array());
+ case Variant::PACKED_FLOAT32_ARRAY:
+ return (MonoObject *)PackedFloat32Array_to_mono_array(p_var->operator PackedFloat32Array());
case Variant::PACKED_STRING_ARRAY:
return (MonoObject *)PackedStringArray_to_mono_array(p_var->operator PackedStringArray());
case Variant::PACKED_VECTOR2_ARRAY:
@@ -788,10 +788,10 @@ Variant mono_object_to_variant_impl(MonoObject *p_obj, const ManagedType &p_type
return mono_array_to_PackedByteArray((MonoArray *)p_obj);
if (array_type->eklass == CACHED_CLASS_RAW(int32_t))
- return mono_array_to_PackedIntArray((MonoArray *)p_obj);
+ return mono_array_to_PackedInt32Array((MonoArray *)p_obj);
if (array_type->eklass == REAL_T_MONOCLASS)
- return mono_array_to_PackedRealArray((MonoArray *)p_obj);
+ return mono_array_to_PackedFloat32Array((MonoArray *)p_obj);
if (array_type->eklass == CACHED_CLASS_RAW(String))
return mono_array_to_PackedStringArray((MonoArray *)p_obj);
@@ -987,7 +987,7 @@ Array mono_array_to_Array(MonoArray *p_array) {
// TODO: Use memcpy where possible
-MonoArray *PackedIntArray_to_mono_array(const PackedIntArray &p_array) {
+MonoArray *PackedInt32Array_to_mono_array(const PackedInt32Array &p_array) {
const int *r = p_array.ptr();
MonoArray *ret = mono_array_new(mono_domain_get(), CACHED_CLASS_RAW(int32_t), p_array.size());
@@ -999,8 +999,8 @@ MonoArray *PackedIntArray_to_mono_array(const PackedIntArray &p_array) {
return ret;
}
-PackedIntArray mono_array_to_PackedIntArray(MonoArray *p_array) {
- PackedIntArray ret;
+PackedInt32Array mono_array_to_PackedInt32Array(MonoArray *p_array) {
+ PackedInt32Array ret;
if (!p_array)
return ret;
int length = mono_array_length(p_array);
@@ -1041,7 +1041,7 @@ PackedByteArray mono_array_to_PackedByteArray(MonoArray *p_array) {
return ret;
}
-MonoArray *PackedRealArray_to_mono_array(const PackedRealArray &p_array) {
+MonoArray *PackedFloat32Array_to_mono_array(const PackedFloat32Array &p_array) {
const real_t *r = p_array.ptr();
MonoArray *ret = mono_array_new(mono_domain_get(), REAL_T_MONOCLASS, p_array.size());
@@ -1053,8 +1053,8 @@ MonoArray *PackedRealArray_to_mono_array(const PackedRealArray &p_array) {
return ret;
}
-PackedRealArray mono_array_to_PackedRealArray(MonoArray *p_array) {
- PackedRealArray ret;
+PackedFloat32Array mono_array_to_PackedFloat32Array(MonoArray *p_array) {
+ PackedFloat32Array ret;
if (!p_array)
return ret;
int length = mono_array_length(p_array);
diff --git a/modules/mono/mono_gd/gd_mono_marshal.h b/modules/mono/mono_gd/gd_mono_marshal.h
index d3527109ff..5db59522ce 100644
--- a/modules/mono/mono_gd/gd_mono_marshal.h
+++ b/modules/mono/mono_gd/gd_mono_marshal.h
@@ -127,20 +127,20 @@ String mono_object_to_variant_string(MonoObject *p_obj, MonoException **r_exc);
MonoArray *Array_to_mono_array(const Array &p_array);
Array mono_array_to_Array(MonoArray *p_array);
-// PackedIntArray
+// PackedInt32Array
-MonoArray *PackedIntArray_to_mono_array(const PackedIntArray &p_array);
-PackedIntArray mono_array_to_PackedIntArray(MonoArray *p_array);
+MonoArray *PackedInt32Array_to_mono_array(const PackedInt32Array &p_array);
+PackedInt32Array mono_array_to_PackedInt32Array(MonoArray *p_array);
// PackedByteArray
MonoArray *PackedByteArray_to_mono_array(const PackedByteArray &p_array);
PackedByteArray mono_array_to_PackedByteArray(MonoArray *p_array);
-// PackedRealArray
+// PackedFloat32Array
-MonoArray *PackedRealArray_to_mono_array(const PackedRealArray &p_array);
-PackedRealArray mono_array_to_PackedRealArray(MonoArray *p_array);
+MonoArray *PackedFloat32Array_to_mono_array(const PackedFloat32Array &p_array);
+PackedFloat32Array mono_array_to_PackedFloat32Array(MonoArray *p_array);
// PackedStringArray
diff --git a/modules/opensimplex/noise_texture.cpp b/modules/opensimplex/noise_texture.cpp
index 35f0fb7ac0..d60099e676 100644
--- a/modules/opensimplex/noise_texture.cpp
+++ b/modules/opensimplex/noise_texture.cpp
@@ -84,7 +84,7 @@ void NoiseTexture::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "height", PROPERTY_HINT_RANGE, "1,2048,1,or_greater"), "set_height", "get_height");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "seamless"), "set_seamless", "get_seamless");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "as_normalmap"), "set_as_normalmap", "is_normalmap");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "bump_strength", PROPERTY_HINT_RANGE, "0,32,0.1,or_greater"), "set_bump_strength", "get_bump_strength");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bump_strength", PROPERTY_HINT_RANGE, "0,32,0.1,or_greater"), "set_bump_strength", "get_bump_strength");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "noise", PROPERTY_HINT_RESOURCE_TYPE, "OpenSimplexNoise"), "set_noise", "get_noise");
}
diff --git a/modules/opensimplex/open_simplex_noise.cpp b/modules/opensimplex/open_simplex_noise.cpp
index bd2dbd74a8..238faa4130 100644
--- a/modules/opensimplex/open_simplex_noise.cpp
+++ b/modules/opensimplex/open_simplex_noise.cpp
@@ -186,9 +186,9 @@ void OpenSimplexNoise::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "seed"), "set_seed", "get_seed");
ADD_PROPERTY(PropertyInfo(Variant::INT, "octaves", PROPERTY_HINT_RANGE, vformat("1,%d,1", MAX_OCTAVES)), "set_octaves", "get_octaves");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "period", PROPERTY_HINT_RANGE, "0.1,256.0,0.1"), "set_period", "get_period");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "persistence", PROPERTY_HINT_RANGE, "0.0,1.0,0.001"), "set_persistence", "get_persistence");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "lacunarity", PROPERTY_HINT_RANGE, "0.1,4.0,0.01"), "set_lacunarity", "get_lacunarity");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "period", PROPERTY_HINT_RANGE, "0.1,256.0,0.1"), "set_period", "get_period");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "persistence", PROPERTY_HINT_RANGE, "0.0,1.0,0.001"), "set_persistence", "get_persistence");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lacunarity", PROPERTY_HINT_RANGE, "0.1,4.0,0.01"), "set_lacunarity", "get_lacunarity");
}
float OpenSimplexNoise::get_noise_1d(float x) {
diff --git a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
index 6224db90e7..054ed088df 100644
--- a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
+++ b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
@@ -267,7 +267,7 @@ void AudioStreamOGGVorbis::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::PACKED_BYTE_ARRAY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_data", "get_data");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "loop"), "set_loop", "has_loop");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "loop_offset"), "set_loop_offset", "get_loop_offset");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "loop_offset"), "set_loop_offset", "get_loop_offset");
}
AudioStreamOGGVorbis::AudioStreamOGGVorbis() {
diff --git a/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp b/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp
index ec89f2ac76..13d96541e3 100644
--- a/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp
+++ b/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp
@@ -73,7 +73,7 @@ String ResourceImporterOGGVorbis::get_preset_name(int p_idx) const {
void ResourceImporterOGGVorbis::get_import_options(List<ImportOption> *r_options, int p_preset) const {
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "loop"), true));
- r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "loop_offset"), 0));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "loop_offset"), 0));
}
Error ResourceImporterOGGVorbis::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
diff --git a/modules/visual_script/visual_script_builtin_funcs.cpp b/modules/visual_script/visual_script_builtin_funcs.cpp
index 3fd2b474bb..07f152efd4 100644
--- a/modules/visual_script/visual_script_builtin_funcs.cpp
+++ b/modules/visual_script/visual_script_builtin_funcs.cpp
@@ -277,22 +277,22 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const
case MATH_EXP:
case MATH_ISNAN:
case MATH_ISINF: {
- return PropertyInfo(Variant::REAL, "s");
+ return PropertyInfo(Variant::FLOAT, "s");
} break;
case MATH_ATAN2: {
if (p_idx == 0)
- return PropertyInfo(Variant::REAL, "y");
+ return PropertyInfo(Variant::FLOAT, "y");
else
- return PropertyInfo(Variant::REAL, "x");
+ return PropertyInfo(Variant::FLOAT, "x");
} break;
case MATH_FMOD:
case MATH_FPOSMOD:
case LOGIC_MAX:
case LOGIC_MIN: {
if (p_idx == 0)
- return PropertyInfo(Variant::REAL, "a");
+ return PropertyInfo(Variant::FLOAT, "a");
else
- return PropertyInfo(Variant::REAL, "b");
+ return PropertyInfo(Variant::FLOAT, "b");
} break;
case MATH_POSMOD: {
if (p_idx == 0)
@@ -302,63 +302,63 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const
} break;
case MATH_POW: {
if (p_idx == 0)
- return PropertyInfo(Variant::REAL, "base");
+ return PropertyInfo(Variant::FLOAT, "base");
else
- return PropertyInfo(Variant::REAL, "exp");
+ return PropertyInfo(Variant::FLOAT, "exp");
} break;
case MATH_EASE: {
if (p_idx == 0)
- return PropertyInfo(Variant::REAL, "s");
+ return PropertyInfo(Variant::FLOAT, "s");
else
- return PropertyInfo(Variant::REAL, "curve");
+ return PropertyInfo(Variant::FLOAT, "curve");
} break;
case MATH_STEP_DECIMALS: {
- return PropertyInfo(Variant::REAL, "step");
+ return PropertyInfo(Variant::FLOAT, "step");
} break;
case MATH_STEPIFY: {
if (p_idx == 0)
- return PropertyInfo(Variant::REAL, "s");
+ return PropertyInfo(Variant::FLOAT, "s");
else
- return PropertyInfo(Variant::REAL, "steps");
+ return PropertyInfo(Variant::FLOAT, "steps");
} break;
case MATH_LERP:
case MATH_LERP_ANGLE:
case MATH_INVERSE_LERP:
case MATH_SMOOTHSTEP: {
if (p_idx == 0)
- return PropertyInfo(Variant::REAL, "from");
+ return PropertyInfo(Variant::FLOAT, "from");
else if (p_idx == 1)
- return PropertyInfo(Variant::REAL, "to");
+ return PropertyInfo(Variant::FLOAT, "to");
else
- return PropertyInfo(Variant::REAL, "weight");
+ return PropertyInfo(Variant::FLOAT, "weight");
} break;
case MATH_RANGE_LERP: {
if (p_idx == 0)
- return PropertyInfo(Variant::REAL, "value");
+ return PropertyInfo(Variant::FLOAT, "value");
else if (p_idx == 1)
- return PropertyInfo(Variant::REAL, "istart");
+ return PropertyInfo(Variant::FLOAT, "istart");
else if (p_idx == 2)
- return PropertyInfo(Variant::REAL, "istop");
+ return PropertyInfo(Variant::FLOAT, "istop");
else if (p_idx == 3)
- return PropertyInfo(Variant::REAL, "ostart");
+ return PropertyInfo(Variant::FLOAT, "ostart");
else
- return PropertyInfo(Variant::REAL, "ostop");
+ return PropertyInfo(Variant::FLOAT, "ostop");
} break;
case MATH_MOVE_TOWARD: {
if (p_idx == 0)
- return PropertyInfo(Variant::REAL, "from");
+ return PropertyInfo(Variant::FLOAT, "from");
else if (p_idx == 1)
- return PropertyInfo(Variant::REAL, "to");
+ return PropertyInfo(Variant::FLOAT, "to");
else
- return PropertyInfo(Variant::REAL, "delta");
+ return PropertyInfo(Variant::FLOAT, "delta");
} break;
case MATH_DECTIME: {
if (p_idx == 0)
- return PropertyInfo(Variant::REAL, "value");
+ return PropertyInfo(Variant::FLOAT, "value");
else if (p_idx == 1)
- return PropertyInfo(Variant::REAL, "amount");
+ return PropertyInfo(Variant::FLOAT, "amount");
else
- return PropertyInfo(Variant::REAL, "step");
+ return PropertyInfo(Variant::FLOAT, "step");
} break;
case MATH_RANDOMIZE:
case MATH_RAND:
@@ -367,37 +367,37 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const
} break;
case MATH_RANDOM: {
if (p_idx == 0)
- return PropertyInfo(Variant::REAL, "from");
+ return PropertyInfo(Variant::FLOAT, "from");
else
- return PropertyInfo(Variant::REAL, "to");
+ return PropertyInfo(Variant::FLOAT, "to");
} break;
case MATH_SEED:
case MATH_RANDSEED: {
return PropertyInfo(Variant::INT, "seed");
} break;
case MATH_DEG2RAD: {
- return PropertyInfo(Variant::REAL, "deg");
+ return PropertyInfo(Variant::FLOAT, "deg");
} break;
case MATH_RAD2DEG: {
- return PropertyInfo(Variant::REAL, "rad");
+ return PropertyInfo(Variant::FLOAT, "rad");
} break;
case MATH_LINEAR2DB: {
- return PropertyInfo(Variant::REAL, "nrg");
+ return PropertyInfo(Variant::FLOAT, "nrg");
} break;
case MATH_DB2LINEAR: {
- return PropertyInfo(Variant::REAL, "db");
+ return PropertyInfo(Variant::FLOAT, "db");
} break;
case MATH_POLAR2CARTESIAN: {
if (p_idx == 0)
- return PropertyInfo(Variant::REAL, "r");
+ return PropertyInfo(Variant::FLOAT, "r");
else
- return PropertyInfo(Variant::REAL, "th");
+ return PropertyInfo(Variant::FLOAT, "th");
} break;
case MATH_CARTESIAN2POLAR: {
if (p_idx == 0)
- return PropertyInfo(Variant::REAL, "x");
+ return PropertyInfo(Variant::FLOAT, "x");
else
- return PropertyInfo(Variant::REAL, "y");
+ return PropertyInfo(Variant::FLOAT, "y");
} break;
case MATH_WRAP: {
if (p_idx == 0)
@@ -410,11 +410,11 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const
case MATH_WRAPF:
case LOGIC_CLAMP: {
if (p_idx == 0)
- return PropertyInfo(Variant::REAL, "value");
+ return PropertyInfo(Variant::FLOAT, "value");
else if (p_idx == 1)
- return PropertyInfo(Variant::REAL, "min");
+ return PropertyInfo(Variant::FLOAT, "min");
else
- return PropertyInfo(Variant::REAL, "max");
+ return PropertyInfo(Variant::FLOAT, "max");
} break;
case LOGIC_NEAREST_PO2: {
return PropertyInfo(Variant::INT, "value");
@@ -475,7 +475,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const
if (p_idx == 0)
return PropertyInfo(Variant::STRING, "name");
else
- return PropertyInfo(Variant::REAL, "alpha");
+ return PropertyInfo(Variant::FLOAT, "alpha");
} break;
case FUNC_MAX: {
}
@@ -504,7 +504,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_output_value_port_info(int p_idx) cons
case MATH_FPOSMOD:
case MATH_FLOOR:
case MATH_CEIL: {
- t = Variant::REAL;
+ t = Variant::FLOAT;
} break;
case MATH_POSMOD:
case MATH_ROUND: {
@@ -519,14 +519,14 @@ PropertyInfo VisualScriptBuiltinFunc::get_output_value_port_info(int p_idx) cons
case MATH_POW:
case MATH_LOG:
case MATH_EXP: {
- t = Variant::REAL;
+ t = Variant::FLOAT;
} break;
case MATH_ISNAN:
case MATH_ISINF: {
t = Variant::BOOL;
} break;
case MATH_EASE: {
- t = Variant::REAL;
+ t = Variant::FLOAT;
} break;
case MATH_STEP_DECIMALS: {
t = Variant::INT;
@@ -539,7 +539,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_output_value_port_info(int p_idx) cons
case MATH_SMOOTHSTEP:
case MATH_MOVE_TOWARD:
case MATH_DECTIME: {
- t = Variant::REAL;
+ t = Variant::FLOAT;
} break;
case MATH_RANDOMIZE: {
@@ -551,7 +551,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_output_value_port_info(int p_idx) cons
} break;
case MATH_RANDF:
case MATH_RANDOM: {
- t = Variant::REAL;
+ t = Variant::FLOAT;
} break;
case MATH_SEED: {
@@ -568,7 +568,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_output_value_port_info(int p_idx) cons
case MATH_LINEAR2DB:
case MATH_WRAPF:
case MATH_DB2LINEAR: {
- t = Variant::REAL;
+ t = Variant::FLOAT;
} break;
case MATH_POLAR2CARTESIAN:
case MATH_CARTESIAN2POLAR: {
@@ -679,7 +679,7 @@ VisualScriptBuiltinFunc::BuiltinFunc VisualScriptBuiltinFunc::get_func() {
if (!p_inputs[m_arg]->is_num()) { \
r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; \
r_error.argument = m_arg; \
- r_error.expected = Variant::REAL; \
+ r_error.expected = Variant::FLOAT; \
return; \
}
@@ -781,7 +781,7 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in
int64_t i = *p_inputs[0];
*r_return = ABS(i);
- } else if (p_inputs[0]->get_type() == Variant::REAL) {
+ } else if (p_inputs[0]->get_type() == Variant::FLOAT) {
real_t r = *p_inputs[0];
*r_return = Math::abs(r);
@@ -789,7 +789,7 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in
r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
- r_error.expected = Variant::REAL;
+ r_error.expected = Variant::FLOAT;
}
} break;
case VisualScriptBuiltinFunc::MATH_SIGN: {
@@ -798,7 +798,7 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in
int64_t i = *p_inputs[0];
*r_return = i < 0 ? -1 : (i > 0 ? +1 : 0);
- } else if (p_inputs[0]->get_type() == Variant::REAL) {
+ } else if (p_inputs[0]->get_type() == Variant::FLOAT) {
real_t r = *p_inputs[0];
*r_return = r < 0.0 ? -1.0 : (r > 0.0 ? +1.0 : 0.0);
@@ -806,7 +806,7 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in
r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
- r_error.expected = Variant::REAL;
+ r_error.expected = Variant::FLOAT;
}
} break;
case VisualScriptBuiltinFunc::MATH_POW: {
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp
index c556527e9b..0bbef066a4 100644
--- a/modules/visual_script/visual_script_editor.cpp
+++ b/modules/visual_script/visual_script_editor.cpp
@@ -346,7 +346,7 @@ static Color _color_from_type(Variant::Type p_type, bool dark_theme = true) {
case Variant::BOOL: color = Color(0.55, 0.65, 0.94); break;
case Variant::INT: color = Color(0.49, 0.78, 0.94); break;
- case Variant::REAL: color = Color(0.38, 0.85, 0.96); break;
+ case Variant::FLOAT: color = Color(0.38, 0.85, 0.96); break;
case Variant::STRING: color = Color(0.42, 0.65, 0.93); break;
case Variant::VECTOR2: color = Color(0.74, 0.57, 0.95); break;
@@ -367,8 +367,10 @@ static Color _color_from_type(Variant::Type p_type, bool dark_theme = true) {
case Variant::ARRAY: color = Color(0.88, 0.88, 0.88); break;
case Variant::PACKED_BYTE_ARRAY: color = Color(0.67, 0.96, 0.78); break;
- case Variant::PACKED_INT_ARRAY: color = Color(0.69, 0.86, 0.96); break;
- case Variant::PACKED_REAL_ARRAY: color = Color(0.59, 0.91, 0.97); break;
+ case Variant::PACKED_INT32_ARRAY: color = Color(0.69, 0.86, 0.96); break;
+ case Variant::PACKED_FLOAT32_ARRAY: color = Color(0.59, 0.91, 0.97); break;
+ case Variant::PACKED_INT64_ARRAY: color = Color(0.69, 0.86, 0.96); break;
+ case Variant::PACKED_FLOAT64_ARRAY: color = Color(0.59, 0.91, 0.97); break;
case Variant::PACKED_STRING_ARRAY: color = Color(0.62, 0.77, 0.95); break;
case Variant::PACKED_VECTOR2_ARRAY: color = Color(0.82, 0.7, 0.96); break;
case Variant::PACKED_VECTOR3_ARRAY: color = Color(0.87, 0.61, 0.95); break;
@@ -383,7 +385,7 @@ static Color _color_from_type(Variant::Type p_type, bool dark_theme = true) {
case Variant::BOOL: color = Color(0.43, 0.56, 0.92); break;
case Variant::INT: color = Color(0.31, 0.7, 0.91); break;
- case Variant::REAL: color = Color(0.15, 0.8, 0.94); break;
+ case Variant::FLOAT: color = Color(0.15, 0.8, 0.94); break;
case Variant::STRING: color = Color(0.27, 0.56, 0.91); break;
case Variant::VECTOR2: color = Color(0.68, 0.46, 0.93); break;
@@ -404,8 +406,10 @@ static Color _color_from_type(Variant::Type p_type, bool dark_theme = true) {
case Variant::ARRAY: color = Color(0.45, 0.45, 0.45); break;
case Variant::PACKED_BYTE_ARRAY: color = Color(0.38, 0.92, 0.6); break;
- case Variant::PACKED_INT_ARRAY: color = Color(0.38, 0.73, 0.92); break;
- case Variant::PACKED_REAL_ARRAY: color = Color(0.25, 0.83, 0.95); break;
+ case Variant::PACKED_INT32_ARRAY: color = Color(0.38, 0.73, 0.92); break;
+ case Variant::PACKED_FLOAT32_ARRAY: color = Color(0.25, 0.83, 0.95); break;
+ case Variant::PACKED_INT64_ARRAY: color = Color(0.38, 0.73, 0.92); break;
+ case Variant::PACKED_FLOAT64_ARRAY: color = Color(0.25, 0.83, 0.95); break;
case Variant::PACKED_STRING_ARRAY: color = Color(0.38, 0.62, 0.92); break;
case Variant::PACKED_VECTOR2_ARRAY: color = Color(0.62, 0.36, 0.92); break;
case Variant::PACKED_VECTOR3_ARRAY: color = Color(0.79, 0.35, 0.92); break;
@@ -521,8 +525,8 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
Control::get_icon("Dictionary", "EditorIcons"),
Control::get_icon("Array", "EditorIcons"),
Control::get_icon("PackedByteArray", "EditorIcons"),
- Control::get_icon("PackedIntArray", "EditorIcons"),
- Control::get_icon("PackedRealArray", "EditorIcons"),
+ Control::get_icon("PackedInt32Array", "EditorIcons"),
+ Control::get_icon("PackedFloat32Array", "EditorIcons"),
Control::get_icon("PackedStringArray", "EditorIcons"),
Control::get_icon("PackedVector2Array", "EditorIcons"),
Control::get_icon("PackedVector3Array", "EditorIcons"),
@@ -619,16 +623,24 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
sbf = EditorNode::get_singleton()->get_theme_base()->get_theme()->get_stylebox("comment", "GraphNode");
Color c = sbf->get_border_color();
+ Color ic = c;
c.a = 1;
if (EditorSettings::get_singleton()->get("interface/theme/use_graph_node_headers")) {
- Color mono_color = ((c.r + c.g + c.b) / 3) < 0.7 ? Color(1.0, 1.0, 1.0) : Color(0.0, 0.0, 0.0);
+ Color mono_color;
+ if (((c.r + c.g + c.b) / 3) < 0.7) {
+ mono_color = Color(1.0, 1.0, 1.0);
+ ic = Color(0.0, 0.0, 0.0, 0.7);
+ } else {
+ mono_color = Color(0.0, 0.0, 0.0);
+ ic = Color(1.0, 1.0, 1.0, 0.7);
+ }
mono_color.a = 0.85;
c = mono_color;
}
gnode->add_color_override("title_color", c);
c.a = 0.7;
gnode->add_color_override("close_color", c);
- gnode->add_color_override("resizer_color", c);
+ gnode->add_color_override("resizer_color", ic);
gnode->add_style_override("frame", sbf);
}
@@ -977,8 +989,8 @@ void VisualScriptEditor::_update_members() {
Control::get_icon("Dictionary", "EditorIcons"),
Control::get_icon("Array", "EditorIcons"),
Control::get_icon("PackedByteArray", "EditorIcons"),
- Control::get_icon("PackedIntArray", "EditorIcons"),
- Control::get_icon("PackedRealArray", "EditorIcons"),
+ Control::get_icon("PackedInt32Array", "EditorIcons"),
+ Control::get_icon("PackedFloat32Array", "EditorIcons"),
Control::get_icon("PackedStringArray", "EditorIcons"),
Control::get_icon("PackedVector2Array", "EditorIcons"),
Control::get_icon("PackedVector3Array", "EditorIcons"),
@@ -2910,8 +2922,8 @@ void VisualScriptEditor::_graph_connected(const String &p_from, int p_from_slot,
if (to_type != Variant::NIL && from_type != Variant::NIL && to_type != from_type) {
// add a constructor node between the ports
bool exceptions = false; // true if there are any exceptions
- exceptions = exceptions || (to_type == Variant::INT && from_type == Variant::REAL);
- exceptions = exceptions || (to_type == Variant::REAL && from_type == Variant::INT);
+ exceptions = exceptions || (to_type == Variant::INT && from_type == Variant::FLOAT);
+ exceptions = exceptions || (to_type == Variant::FLOAT && from_type == Variant::INT);
if (Variant::can_convert(from_type, to_type) && !exceptions) {
MethodInfo mi;
mi.name = Variant::get_type_name(to_type);
@@ -3906,7 +3918,7 @@ void VisualScriptEditor::_notification(int p_what) {
case NOTIFICATION_READY: {
variable_editor->connect_compat("changed", this, "_update_members");
signal_editor->connect_compat("changed", this, "_update_members");
- FALLTHROUGH;
+ [[fallthrough]];
}
case NOTIFICATION_THEME_CHANGED: {
if (p_what != NOTIFICATION_READY && !is_visible_in_tree()) {
diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp
index 1f1c3e2f52..4a9a6bdb1d 100644
--- a/modules/visual_script/visual_script_nodes.cpp
+++ b/modules/visual_script/visual_script_nodes.cpp
@@ -2259,7 +2259,7 @@ PropertyInfo VisualScriptMathConstant::get_input_value_port_info(int p_idx) cons
PropertyInfo VisualScriptMathConstant::get_output_value_port_info(int p_idx) const {
- return PropertyInfo(Variant::REAL, const_name[constant]);
+ return PropertyInfo(Variant::FLOAT, const_name[constant]);
}
String VisualScriptMathConstant::get_caption() const {
diff --git a/modules/visual_script/visual_script_property_selector.cpp b/modules/visual_script/visual_script_property_selector.cpp
index 22f696851f..20bad364dc 100644
--- a/modules/visual_script/visual_script_property_selector.cpp
+++ b/modules/visual_script/visual_script_property_selector.cpp
@@ -120,8 +120,10 @@ void VisualScriptPropertySelector::_update_search() {
Control::get_icon("Dictionary", "EditorIcons"),
Control::get_icon("Array", "EditorIcons"),
Control::get_icon("PackedByteArray", "EditorIcons"),
- Control::get_icon("PackedIntArray", "EditorIcons"),
- Control::get_icon("PackedRealArray", "EditorIcons"),
+ Control::get_icon("PackedInt32Array", "EditorIcons"),
+ Control::get_icon("PackedFloat32Array", "EditorIcons"),
+ Control::get_icon("PackedInt64Array", "EditorIcons"),
+ Control::get_icon("PackedFloat64Array", "EditorIcons"),
Control::get_icon("PackedStringArray", "EditorIcons"),
Control::get_icon("PackedVector2Array", "EditorIcons"),
Control::get_icon("PackedVector3Array", "EditorIcons"),
@@ -279,7 +281,7 @@ void VisualScriptPropertySelector::_update_search() {
if (type == Variant::BOOL) {
get_visual_node_names("operators/logic/", Set<String>(), found, root, search_box);
}
- if (type == Variant::BOOL || type == Variant::INT || type == Variant::REAL || type == Variant::VECTOR2 || type == Variant::VECTOR3) {
+ if (type == Variant::BOOL || type == Variant::INT || type == Variant::FLOAT || type == Variant::VECTOR2 || type == Variant::VECTOR3) {
get_visual_node_names("operators/math/", Set<String>(), found, root, search_box);
}
}
@@ -355,7 +357,7 @@ void VisualScriptPropertySelector::get_visual_node_names(const String &root_filt
continue;
}
- bool in_modifier = false | p_modifiers.empty();
+ bool in_modifier = p_modifiers.empty();
for (Set<String>::Element *F = p_modifiers.front(); F && in_modifier; F = F->next()) {
if (E->get().findn(F->get()) != -1)
in_modifier = true;
diff --git a/modules/visual_script/visual_script_yield_nodes.cpp b/modules/visual_script/visual_script_yield_nodes.cpp
index 40d2ec88c5..858074742e 100644
--- a/modules/visual_script/visual_script_yield_nodes.cpp
+++ b/modules/visual_script/visual_script_yield_nodes.cpp
@@ -188,7 +188,7 @@ void VisualScriptYield::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_wait_time"), &VisualScriptYield::get_wait_time);
ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Frame,Physics Frame,Time", PROPERTY_USAGE_NOEDITOR), "set_yield_mode", "get_yield_mode");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "wait_time"), "set_wait_time", "get_wait_time");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wait_time"), "set_wait_time", "get_wait_time");
BIND_ENUM_CONSTANT(YIELD_FRAME);
BIND_ENUM_CONSTANT(YIELD_PHYSICS_FRAME);
diff --git a/platform/android/api/java_class_wrapper.h b/platform/android/api/java_class_wrapper.h
index 5414b533f9..48b581958b 100644
--- a/platform/android/api/java_class_wrapper.h
+++ b/platform/android/api/java_class_wrapper.h
@@ -113,12 +113,12 @@ class JavaClass : public Reference {
break;
case ARG_TYPE_FLOAT | ARG_NUMBER_CLASS_BIT:
case ARG_TYPE_FLOAT:
- r_type = Variant::REAL;
+ r_type = Variant::FLOAT;
likelihood = 1.0;
break;
case ARG_TYPE_DOUBLE | ARG_NUMBER_CLASS_BIT:
case ARG_TYPE_DOUBLE:
- r_type = Variant::REAL;
+ r_type = Variant::FLOAT;
likelihood = 0.5;
break;
case ARG_TYPE_STRING: r_type = Variant::STRING; break;
@@ -134,23 +134,23 @@ class JavaClass : public Reference {
likelihood = 0.5;
break;
case ARG_ARRAY_BIT | ARG_TYPE_SHORT:
- r_type = Variant::PACKED_INT_ARRAY;
+ r_type = Variant::PACKED_INT32_ARRAY;
likelihood = 0.3;
break;
case ARG_ARRAY_BIT | ARG_TYPE_INT:
- r_type = Variant::PACKED_INT_ARRAY;
+ r_type = Variant::PACKED_INT32_ARRAY;
likelihood = 1.0;
break;
case ARG_ARRAY_BIT | ARG_TYPE_LONG:
- r_type = Variant::PACKED_INT_ARRAY;
+ r_type = Variant::PACKED_INT32_ARRAY;
likelihood = 0.5;
break;
case ARG_ARRAY_BIT | ARG_TYPE_FLOAT:
- r_type = Variant::PACKED_REAL_ARRAY;
+ r_type = Variant::PACKED_FLOAT32_ARRAY;
likelihood = 1.0;
break;
case ARG_ARRAY_BIT | ARG_TYPE_DOUBLE:
- r_type = Variant::PACKED_REAL_ARRAY;
+ r_type = Variant::PACKED_FLOAT32_ARRAY;
likelihood = 0.5;
break;
case ARG_ARRAY_BIT | ARG_TYPE_STRING: r_type = Variant::PACKED_STRING_ARRAY; break;
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index 2679d9db92..50bf671a84 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -337,7 +337,7 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
Vector<String> props = dp.split("\n");
String vendor;
String device;
- d.description + "Device ID: " + d.id + "\n";
+ d.description = "Device ID: " + d.id + "\n";
d.api_level = 0;
for (int j = 0; j < props.size(); j++) {
diff --git a/platform/android/java_class_wrapper.cpp b/platform/android/java_class_wrapper.cpp
index 76213b949d..9e9b17fb99 100644
--- a/platform/android/java_class_wrapper.cpp
+++ b/platform/android/java_class_wrapper.cpp
@@ -97,7 +97,7 @@ bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method,
case ARG_TYPE_DOUBLE: {
if (!p_args[i]->is_num())
- arg_expected = Variant::REAL;
+ arg_expected = Variant::FLOAT;
} break;
case ARG_TYPE_STRING: {
diff --git a/platform/android/java_godot_lib_jni.cpp b/platform/android/java_godot_lib_jni.cpp
index b99cf70659..900a452024 100644
--- a/platform/android/java_godot_lib_jni.cpp
+++ b/platform/android/java_godot_lib_jni.cpp
@@ -99,7 +99,7 @@ jvalret _variant_to_jvalue(JNIEnv *env, Variant::Type p_type, const Variant *p_a
v.val.i = *p_arg;
};
} break;
- case Variant::REAL: {
+ case Variant::FLOAT: {
if (force_jobject) {
@@ -182,7 +182,7 @@ jvalret _variant_to_jvalue(JNIEnv *env, Variant::Type p_type, const Variant *p_a
v.obj = jdict;
} break;
- case Variant::PACKED_INT_ARRAY: {
+ case Variant::PACKED_INT32_ARRAY: {
Vector<int> array = *p_arg;
jintArray arr = env->NewIntArray(array.size());
@@ -201,7 +201,7 @@ jvalret _variant_to_jvalue(JNIEnv *env, Variant::Type p_type, const Variant *p_a
v.obj = arr;
} break;
- case Variant::PACKED_REAL_ARRAY: {
+ case Variant::PACKED_FLOAT32_ARRAY: {
Vector<float> array = *p_arg;
jfloatArray arr = env->NewFloatArray(array.size());
@@ -211,6 +211,10 @@ jvalret _variant_to_jvalue(JNIEnv *env, Variant::Type p_type, const Variant *p_a
v.obj = arr;
} break;
+#ifndef _MSC_VER
+#warning This is missing 64 bits arrays, I have no idea how to do it in JNI
+#endif
+
default: {
v.val.i = 0;
@@ -319,7 +323,7 @@ Variant _jobject_to_variant(JNIEnv *env, jobject obj) {
jdoubleArray arr = (jdoubleArray)obj;
int fCount = env->GetArrayLength(arr);
- PackedRealArray sarr;
+ PackedFloat32Array sarr;
sarr.resize(fCount);
real_t *w = sarr.ptrw();
@@ -337,7 +341,7 @@ Variant _jobject_to_variant(JNIEnv *env, jobject obj) {
jfloatArray arr = (jfloatArray)obj;
int fCount = env->GetArrayLength(arr);
- PackedRealArray sarr;
+ PackedFloat32Array sarr;
sarr.resize(fCount);
real_t *w = sarr.ptrw();
@@ -487,7 +491,7 @@ public:
ret = env->CallIntMethodA(instance, E->get().method, v);
} break;
- case Variant::REAL: {
+ case Variant::FLOAT: {
ret = env->CallFloatMethodA(instance, E->get().method, v);
} break;
@@ -505,7 +509,7 @@ public:
env->DeleteLocalRef(arr);
} break;
- case Variant::PACKED_INT_ARRAY: {
+ case Variant::PACKED_INT32_ARRAY: {
jintArray arr = (jintArray)env->CallObjectMethodA(instance, E->get().method, v);
@@ -519,7 +523,7 @@ public:
ret = sarr;
env->DeleteLocalRef(arr);
} break;
- case Variant::PACKED_REAL_ARRAY: {
+ case Variant::PACKED_FLOAT32_ARRAY: {
jfloatArray arr = (jfloatArray)env->CallObjectMethodA(instance, E->get().method, v);
@@ -534,6 +538,9 @@ public:
env->DeleteLocalRef(arr);
} break;
+#ifndef _MSC_VER
+#warning This is missing 64 bits arrays, I have no idea how to do it in JNI
+#endif
case Variant::DICTIONARY: {
jobject obj = env->CallObjectMethodA(instance, E->get().method, v);
@@ -1246,12 +1253,12 @@ static Variant::Type get_jni_type(const String &p_type) {
{ "void", Variant::NIL },
{ "boolean", Variant::BOOL },
{ "int", Variant::INT },
- { "float", Variant::REAL },
- { "double", Variant::REAL },
+ { "float", Variant::FLOAT },
+ { "double", Variant::FLOAT },
{ "java.lang.String", Variant::STRING },
- { "[I", Variant::PACKED_INT_ARRAY },
+ { "[I", Variant::PACKED_INT32_ARRAY },
{ "[B", Variant::PACKED_BYTE_ARRAY },
- { "[F", Variant::PACKED_REAL_ARRAY },
+ { "[F", Variant::PACKED_FLOAT32_ARRAY },
{ "[Ljava.lang.String;", Variant::PACKED_STRING_ARRAY },
{ "org.godotengine.godot.Dictionary", Variant::DICTIONARY },
{ NULL, Variant::NIL }
diff --git a/platform/iphone/game_center.mm b/platform/iphone/game_center.mm
index 14f4b00ea6..99d539d4ff 100644
--- a/platform/iphone/game_center.mm
+++ b/platform/iphone/game_center.mm
@@ -202,7 +202,7 @@ void GameCenter::request_achievement_descriptions() {
PackedStringArray titles;
PackedStringArray unachieved_descriptions;
PackedStringArray achieved_descriptions;
- PackedIntArray maximum_points;
+ PackedInt32Array maximum_points;
Array hidden;
Array replayable;
@@ -254,7 +254,7 @@ void GameCenter::request_achievements() {
if (error == nil) {
ret["result"] = "ok";
PackedStringArray names;
- PackedRealArray percentages;
+ PackedFloat32Array percentages;
for (int i = 0; i < [achievements count]; i++) {
diff --git a/platform/iphone/in_app_store.mm b/platform/iphone/in_app_store.mm
index 842bc44c01..a8a887824f 100644
--- a/platform/iphone/in_app_store.mm
+++ b/platform/iphone/in_app_store.mm
@@ -87,7 +87,7 @@ void InAppStore::_bind_methods() {
ret["result"] = "ok";
PackedStringArray titles;
PackedStringArray descriptions;
- PackedRealArray prices;
+ PackedFloat32Array prices;
PackedStringArray ids;
PackedStringArray localized_prices;
PackedStringArray currency_codes;
diff --git a/platform/javascript/javascript_eval.cpp b/platform/javascript/javascript_eval.cpp
index ab045d359b..44cce28d57 100644
--- a/platform/javascript/javascript_eval.cpp
+++ b/platform/javascript/javascript_eval.cpp
@@ -81,7 +81,7 @@ Variant JavaScript::eval(const String &p_code, bool p_use_global_exec_context) {
case 'number':
setValue(PTR, eval_ret, 'double');
- return 3; // REAL
+ return 3; // FLOAT
case 'string':
var array_len = lengthBytesUTF8(eval_ret)+1;
@@ -128,7 +128,7 @@ Variant JavaScript::eval(const String &p_code, bool p_use_global_exec_context) {
switch (return_type) {
case Variant::BOOL:
return js_data.b;
- case Variant::REAL:
+ case Variant::FLOAT:
return js_data.d;
case Variant::STRING: {
String str = String::utf8(js_data.s);
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index 41720360c3..716a637993 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -709,7 +709,7 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
break;
}
}
- FALLTHROUGH;
+ [[fallthrough]];
case WM_MBUTTONDOWN:
case WM_MBUTTONUP:
case WM_RBUTTONDOWN:
@@ -984,7 +984,7 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
if (wParam==VK_WIN) TODO wtf is this?
meta_mem=uMsg==WM_KEYDOWN;
*/
- FALLTHROUGH;
+ [[fallthrough]];
}
case WM_CHAR: {
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index d25418d14a..cd22ee9ff6 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -184,18 +184,10 @@ def configure(env):
env.Append(CCFLAGS=['-pipe'])
env.Append(LINKFLAGS=['-pipe'])
- # Check for gcc version >= 6 before adding -no-pie
- if using_gcc(env):
- version = get_compiler_version(env)
- if version != None and version[0] >= '6':
- env.Append(CCFLAGS=['-fpie'])
- env.Append(LINKFLAGS=['-no-pie'])
- # Do the same for clang should be fine with Clang 4 and higher
- if using_clang(env):
- version = get_compiler_version(env)
- if version != None and version[0] >= '4':
- env.Append(CCFLAGS=['-fpie'])
- env.Append(LINKFLAGS=['-no-pie'])
+ # -fpie and -no-pie is supported on GCC 6+ and Clang 4+, both below our
+ # minimal requirements.
+ env.Append(CCFLAGS=['-fpie'])
+ env.Append(LINKFLAGS=['-no-pie'])
## Dependencies
diff --git a/scene/2d/animated_sprite.cpp b/scene/2d/animated_sprite.cpp
index ef99be5b94..d4d008d488 100644
--- a/scene/2d/animated_sprite.cpp
+++ b/scene/2d/animated_sprite.cpp
@@ -744,11 +744,11 @@ void AnimatedSprite::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "frames", PROPERTY_HINT_RESOURCE_TYPE, "SpriteFrames"), "set_sprite_frames", "get_sprite_frames");
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "animation"), "set_animation", "get_animation");
ADD_PROPERTY(PropertyInfo(Variant::INT, "frame"), "set_frame", "get_frame");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "speed_scale"), "set_speed_scale", "get_speed_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "speed_scale"), "set_speed_scale", "get_speed_scale");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playing"), "_set_playing", "_is_playing");
ADD_GROUP("Lighting", "");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "specular_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_specular_color", "get_specular_color");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "shininess", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_shininess", "get_shininess");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "shininess", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_shininess", "get_shininess");
ADD_GROUP("Offset", "");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "centered"), "set_centered", "is_centered");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "offset"), "set_offset", "get_offset");
diff --git a/scene/2d/area_2d.cpp b/scene/2d/area_2d.cpp
index f5f1a2ed3c..eef8c58f78 100644
--- a/scene/2d/area_2d.cpp
+++ b/scene/2d/area_2d.cpp
@@ -660,11 +660,11 @@ void Area2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "space_override", PROPERTY_HINT_ENUM, "Disabled,Combine,Combine-Replace,Replace,Replace-Combine"), "set_space_override_mode", "get_space_override_mode");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "gravity_point"), "set_gravity_is_point", "is_gravity_a_point");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "gravity_distance_scale", PROPERTY_HINT_EXP_RANGE, "0,1024,0.001,or_greater"), "set_gravity_distance_scale", "get_gravity_distance_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity_distance_scale", PROPERTY_HINT_EXP_RANGE, "0,1024,0.001,or_greater"), "set_gravity_distance_scale", "get_gravity_distance_scale");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "gravity_vec"), "set_gravity_vector", "get_gravity_vector");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "gravity", PROPERTY_HINT_RANGE, "-1024,1024,0.001"), "set_gravity", "get_gravity");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "linear_damp", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"), "set_linear_damp", "get_linear_damp");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_damp", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"), "set_angular_damp", "get_angular_damp");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity", PROPERTY_HINT_RANGE, "-1024,1024,0.001"), "set_gravity", "get_gravity");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "linear_damp", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"), "set_linear_damp", "get_linear_damp");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_damp", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"), "set_angular_damp", "get_angular_damp");
ADD_PROPERTY(PropertyInfo(Variant::INT, "priority", PROPERTY_HINT_RANGE, "0,128,1"), "set_priority", "get_priority");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "monitoring"), "set_monitoring", "is_monitoring");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "monitorable"), "set_monitorable", "is_monitorable");
diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp
index 8419600bef..901fd1e126 100644
--- a/scene/2d/audio_stream_player_2d.cpp
+++ b/scene/2d/audio_stream_player_2d.cpp
@@ -515,13 +515,13 @@ void AudioStreamPlayer2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("_bus_layout_changed"), &AudioStreamPlayer2D::_bus_layout_changed);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream"), "set_stream", "get_stream");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "volume_db", PROPERTY_HINT_RANGE, "-80,24"), "set_volume_db", "get_volume_db");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "pitch_scale", PROPERTY_HINT_RANGE, "0.01,4,0.01,or_greater"), "set_pitch_scale", "get_pitch_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "volume_db", PROPERTY_HINT_RANGE, "-80,24"), "set_volume_db", "get_volume_db");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pitch_scale", PROPERTY_HINT_RANGE, "0.01,4,0.01,or_greater"), "set_pitch_scale", "get_pitch_scale");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playing", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "_set_playing", "is_playing");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autoplay"), "set_autoplay", "is_autoplay_enabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "stream_paused", PROPERTY_HINT_NONE, ""), "set_stream_paused", "get_stream_paused");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_distance", PROPERTY_HINT_EXP_RANGE, "1,4096,1,or_greater"), "set_max_distance", "get_max_distance");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "attenuation", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_attenuation", "get_attenuation");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_distance", PROPERTY_HINT_EXP_RANGE, "1,4096,1,or_greater"), "set_max_distance", "get_max_distance");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "attenuation", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_attenuation", "get_attenuation");
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus");
ADD_PROPERTY(PropertyInfo(Variant::INT, "area_mask", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_area_mask", "get_area_mask");
diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp
index 7ec770597e..1419fb561e 100644
--- a/scene/2d/camera_2d.cpp
+++ b/scene/2d/camera_2d.cpp
@@ -753,17 +753,17 @@ void Camera2D::_bind_methods() {
ADD_GROUP("Smoothing", "smoothing_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "smoothing_enabled"), "set_enable_follow_smoothing", "is_follow_smoothing_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "smoothing_speed"), "set_follow_smoothing", "get_follow_smoothing");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "smoothing_speed"), "set_follow_smoothing", "get_follow_smoothing");
ADD_GROUP("Offset", "offset_");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "offset_h", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_h_offset", "get_h_offset");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "offset_v", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_v_offset", "get_v_offset");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "offset_h", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_h_offset", "get_h_offset");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "offset_v", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_v_offset", "get_v_offset");
ADD_GROUP("Drag Margin", "drag_margin_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "drag_margin_left", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drag_margin", "get_drag_margin", MARGIN_LEFT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "drag_margin_top", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drag_margin", "get_drag_margin", MARGIN_TOP);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "drag_margin_right", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drag_margin", "get_drag_margin", MARGIN_RIGHT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "drag_margin_bottom", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drag_margin", "get_drag_margin", MARGIN_BOTTOM);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "drag_margin_left", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drag_margin", "get_drag_margin", MARGIN_LEFT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "drag_margin_top", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drag_margin", "get_drag_margin", MARGIN_TOP);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "drag_margin_right", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drag_margin", "get_drag_margin", MARGIN_RIGHT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "drag_margin_bottom", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drag_margin", "get_drag_margin", MARGIN_BOTTOM);
ADD_GROUP("Editor", "editor_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "editor_draw_screen"), "set_screen_drawing_enabled", "is_screen_drawing_enabled");
diff --git a/scene/2d/collision_polygon_2d.cpp b/scene/2d/collision_polygon_2d.cpp
index 72af0fcb2a..4edf92197e 100644
--- a/scene/2d/collision_polygon_2d.cpp
+++ b/scene/2d/collision_polygon_2d.cpp
@@ -308,7 +308,7 @@ void CollisionPolygon2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "polygon"), "set_polygon", "get_polygon");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "disabled"), "set_disabled", "is_disabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_way_collision"), "set_one_way_collision", "is_one_way_collision_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "one_way_collision_margin", PROPERTY_HINT_RANGE, "0,128,0.1"), "set_one_way_collision_margin", "get_one_way_collision_margin");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "one_way_collision_margin", PROPERTY_HINT_RANGE, "0,128,0.1"), "set_one_way_collision_margin", "get_one_way_collision_margin");
BIND_ENUM_CONSTANT(BUILD_SOLIDS);
BIND_ENUM_CONSTANT(BUILD_SEGMENTS);
diff --git a/scene/2d/collision_shape_2d.cpp b/scene/2d/collision_shape_2d.cpp
index 685d501a00..d37f8c5caa 100644
--- a/scene/2d/collision_shape_2d.cpp
+++ b/scene/2d/collision_shape_2d.cpp
@@ -242,7 +242,7 @@ void CollisionShape2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "shape", PROPERTY_HINT_RESOURCE_TYPE, "Shape2D"), "set_shape", "get_shape");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "disabled"), "set_disabled", "is_disabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_way_collision"), "set_one_way_collision", "is_one_way_collision_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "one_way_collision_margin", PROPERTY_HINT_RANGE, "0,128,0.1"), "set_one_way_collision_margin", "get_one_way_collision_margin");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "one_way_collision_margin", PROPERTY_HINT_RANGE, "0,128,0.1"), "set_one_way_collision_margin", "get_one_way_collision_margin");
}
CollisionShape2D::CollisionShape2D() {
diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp
index 4e98873385..35df6c8945 100644
--- a/scene/2d/cpu_particles_2d.cpp
+++ b/scene/2d/cpu_particles_2d.cpp
@@ -1273,13 +1273,13 @@ void CPUParticles2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "emitting"), "set_emitting", "is_emitting");
ADD_PROPERTY(PropertyInfo(Variant::INT, "amount", PROPERTY_HINT_EXP_RANGE, "1,1000000,1"), "set_amount", "get_amount");
ADD_GROUP("Time", "");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "lifetime", PROPERTY_HINT_RANGE, "0.01,600.0,0.01,or_greater"), "set_lifetime", "get_lifetime");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime", PROPERTY_HINT_RANGE, "0.01,600.0,0.01,or_greater"), "set_lifetime", "get_lifetime");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_shot"), "set_one_shot", "get_one_shot");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "preprocess", PROPERTY_HINT_RANGE, "0.00,600.0,0.01"), "set_pre_process_time", "get_pre_process_time");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "speed_scale", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_speed_scale", "get_speed_scale");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "explosiveness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_explosiveness_ratio", "get_explosiveness_ratio");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_randomness_ratio", "get_randomness_ratio");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "lifetime_randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_lifetime_randomness", "get_lifetime_randomness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "preprocess", PROPERTY_HINT_RANGE, "0.00,600.0,0.01"), "set_pre_process_time", "get_pre_process_time");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "speed_scale", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_speed_scale", "get_speed_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "explosiveness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_explosiveness_ratio", "get_explosiveness_ratio");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_randomness_ratio", "get_randomness_ratio");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime_randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_lifetime_randomness", "get_lifetime_randomness");
ADD_PROPERTY(PropertyInfo(Variant::INT, "fixed_fps", PROPERTY_HINT_RANGE, "0,1000,1"), "set_fixed_fps", "get_fixed_fps");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fract_delta"), "set_fractional_delta", "get_fractional_delta");
ADD_GROUP("Drawing", "");
@@ -1346,7 +1346,7 @@ void CPUParticles2D::_bind_methods() {
ADD_GROUP("Emission Shape", "emission_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "emission_shape", PROPERTY_HINT_ENUM, "Point,Sphere,Box,Points,Directed Points"), "set_emission_shape", "get_emission_shape");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "emission_sphere_radius", PROPERTY_HINT_RANGE, "0.01,128,0.01"), "set_emission_sphere_radius", "get_emission_sphere_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "emission_sphere_radius", PROPERTY_HINT_RANGE, "0.01,128,0.01"), "set_emission_sphere_radius", "get_emission_sphere_radius");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "emission_rect_extents"), "set_emission_rect_extents", "get_emission_rect_extents");
ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "emission_points"), "set_emission_points", "get_emission_points");
ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "emission_normals"), "set_emission_normals", "get_emission_normals");
@@ -1355,58 +1355,58 @@ void CPUParticles2D::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "flag_align_y"), "set_particle_flag", "get_particle_flag", FLAG_ALIGN_Y_TO_VELOCITY);
ADD_GROUP("Direction", "");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "direction"), "set_direction", "get_direction");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "spread", PROPERTY_HINT_RANGE, "0,180,0.01"), "set_spread", "get_spread");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "spread", PROPERTY_HINT_RANGE, "0,180,0.01"), "set_spread", "get_spread");
ADD_GROUP("Gravity", "");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "gravity"), "set_gravity", "get_gravity");
ADD_GROUP("Initial Velocity", "initial_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "initial_velocity", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_INITIAL_LINEAR_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "initial_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_INITIAL_LINEAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_INITIAL_LINEAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_INITIAL_LINEAR_VELOCITY);
ADD_GROUP("Angular Velocity", "angular_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_velocity", PROPERTY_HINT_RANGE, "-720,720,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGULAR_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGULAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_velocity", PROPERTY_HINT_RANGE, "-720,720,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGULAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGULAR_VELOCITY);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "angular_velocity_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANGULAR_VELOCITY);
ADD_GROUP("Orbit Velocity", "orbit_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "orbit_velocity", PROPERTY_HINT_RANGE, "-1000,1000,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ORBIT_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "orbit_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ORBIT_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "orbit_velocity", PROPERTY_HINT_RANGE, "-1000,1000,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ORBIT_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "orbit_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ORBIT_VELOCITY);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "orbit_velocity_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ORBIT_VELOCITY);
ADD_GROUP("Linear Accel", "linear_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_LINEAR_ACCEL);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_LINEAR_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_LINEAR_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_LINEAR_ACCEL);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "linear_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_LINEAR_ACCEL);
ADD_GROUP("Radial Accel", "radial_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "radial_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_RADIAL_ACCEL);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "radial_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_RADIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "radial_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_RADIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "radial_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_RADIAL_ACCEL);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "radial_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_RADIAL_ACCEL);
ADD_GROUP("Tangential Accel", "tangential_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "tangential_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_TANGENTIAL_ACCEL);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "tangential_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_TANGENTIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "tangential_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_TANGENTIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "tangential_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_TANGENTIAL_ACCEL);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "tangential_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_TANGENTIAL_ACCEL);
ADD_GROUP("Damping", "");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "damping", PROPERTY_HINT_RANGE, "0,100,0.01"), "set_param", "get_param", PARAM_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "damping_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "damping", PROPERTY_HINT_RANGE, "0,100,0.01"), "set_param", "get_param", PARAM_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "damping_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_DAMPING);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "damping_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_DAMPING);
ADD_GROUP("Angle", "");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angle", PROPERTY_HINT_RANGE, "-720,720,0.1,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGLE);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angle_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGLE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angle", PROPERTY_HINT_RANGE, "-720,720,0.1,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGLE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angle_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGLE);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "angle_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANGLE);
ADD_GROUP("Scale", "");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "scale_amount", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_SCALE);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "scale_amount_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_SCALE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "scale_amount", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_SCALE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "scale_amount_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_SCALE);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "scale_amount_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_SCALE);
ADD_GROUP("Color", "");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "color_ramp", PROPERTY_HINT_RESOURCE_TYPE, "Gradient"), "set_color_ramp", "get_color_ramp");
ADD_GROUP("Hue Variation", "hue_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "hue_variation", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_param", "get_param", PARAM_HUE_VARIATION);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "hue_variation_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_HUE_VARIATION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "hue_variation", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_param", "get_param", PARAM_HUE_VARIATION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "hue_variation_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_HUE_VARIATION);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "hue_variation_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_HUE_VARIATION);
ADD_GROUP("Animation", "anim_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_speed", PROPERTY_HINT_RANGE, "0,128,0.01,or_greater"), "set_param", "get_param", PARAM_ANIM_SPEED);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_speed_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_SPEED);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_speed", PROPERTY_HINT_RANGE, "0,128,0.01,or_greater"), "set_param", "get_param", PARAM_ANIM_SPEED);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_speed_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_SPEED);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "anim_speed_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANIM_SPEED);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_offset", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_ANIM_OFFSET);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_offset_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_OFFSET);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_offset", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_ANIM_OFFSET);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_offset_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_OFFSET);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "anim_offset_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANIM_OFFSET);
BIND_ENUM_CONSTANT(PARAM_INITIAL_LINEAR_VELOCITY);
diff --git a/scene/2d/joints_2d.cpp b/scene/2d/joints_2d.cpp
index 656ff45654..9cc9ab25ac 100644
--- a/scene/2d/joints_2d.cpp
+++ b/scene/2d/joints_2d.cpp
@@ -158,7 +158,7 @@ void Joint2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "node_a", PROPERTY_HINT_NODE_PATH_VALID_TYPES, "CollisionObject2D"), "set_node_a", "get_node_a");
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "node_b", PROPERTY_HINT_NODE_PATH_VALID_TYPES, "CollisionObject2D"), "set_node_b", "get_node_b");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "bias", PROPERTY_HINT_RANGE, "0,0.9,0.001"), "set_bias", "get_bias");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bias", PROPERTY_HINT_RANGE, "0,0.9,0.001"), "set_bias", "get_bias");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "disable_collision"), "set_exclude_nodes_from_collision", "get_exclude_nodes_from_collision");
}
@@ -215,7 +215,7 @@ void PinJoint2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_softness", "softness"), &PinJoint2D::set_softness);
ClassDB::bind_method(D_METHOD("get_softness"), &PinJoint2D::get_softness);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "softness", PROPERTY_HINT_EXP_RANGE, "0.00,16,0.01"), "set_softness", "get_softness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "softness", PROPERTY_HINT_EXP_RANGE, "0.00,16,0.01"), "set_softness", "get_softness");
}
PinJoint2D::PinJoint2D() {
@@ -285,8 +285,8 @@ void GrooveJoint2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_initial_offset", "offset"), &GrooveJoint2D::set_initial_offset);
ClassDB::bind_method(D_METHOD("get_initial_offset"), &GrooveJoint2D::get_initial_offset);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "length", PROPERTY_HINT_EXP_RANGE, "1,65535,1"), "set_length", "get_length");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "initial_offset", PROPERTY_HINT_EXP_RANGE, "1,65535,1"), "set_initial_offset", "get_initial_offset");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "length", PROPERTY_HINT_EXP_RANGE, "1,65535,1"), "set_length", "get_length");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "initial_offset", PROPERTY_HINT_EXP_RANGE, "1,65535,1"), "set_initial_offset", "get_initial_offset");
}
GrooveJoint2D::GrooveJoint2D() {
@@ -394,10 +394,10 @@ void DampedSpringJoint2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_damping", "damping"), &DampedSpringJoint2D::set_damping);
ClassDB::bind_method(D_METHOD("get_damping"), &DampedSpringJoint2D::get_damping);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "length", PROPERTY_HINT_EXP_RANGE, "1,65535,1"), "set_length", "get_length");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "rest_length", PROPERTY_HINT_EXP_RANGE, "0,65535,1"), "set_rest_length", "get_rest_length");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "stiffness", PROPERTY_HINT_EXP_RANGE, "0.1,64,0.1"), "set_stiffness", "get_stiffness");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "damping", PROPERTY_HINT_EXP_RANGE, "0.01,16,0.01"), "set_damping", "get_damping");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "length", PROPERTY_HINT_EXP_RANGE, "1,65535,1"), "set_length", "get_length");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rest_length", PROPERTY_HINT_EXP_RANGE, "0,65535,1"), "set_rest_length", "get_rest_length");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "stiffness", PROPERTY_HINT_EXP_RANGE, "0.1,64,0.1"), "set_stiffness", "get_stiffness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "damping", PROPERTY_HINT_EXP_RANGE, "0.01,16,0.01"), "set_damping", "get_damping");
}
DampedSpringJoint2D::DampedSpringJoint2D() {
diff --git a/scene/2d/light_2d.cpp b/scene/2d/light_2d.cpp
index 0b66d34ece..e61b1fa339 100644
--- a/scene/2d/light_2d.cpp
+++ b/scene/2d/light_2d.cpp
@@ -426,12 +426,12 @@ void Light2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "editor_only"), "set_editor_only", "is_editor_only");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "offset"), "set_texture_offset", "get_texture_offset");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "texture_scale", PROPERTY_HINT_RANGE, "0.01,50,0.01"), "set_texture_scale", "get_texture_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "texture_scale", PROPERTY_HINT_RANGE, "0.01,50,0.01"), "set_texture_scale", "get_texture_scale");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "energy", PROPERTY_HINT_RANGE, "0,16,0.01,or_greater"), "set_energy", "get_energy");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "energy", PROPERTY_HINT_RANGE, "0,16,0.01,or_greater"), "set_energy", "get_energy");
ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Add,Sub,Mix,Mask"), "set_mode", "get_mode");
ADD_GROUP("Range", "range_");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "range_height", PROPERTY_HINT_RANGE, "-2048,2048,0.1,or_lesser,or_greater"), "set_height", "get_height");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "range_height", PROPERTY_HINT_RANGE, "-2048,2048,0.1,or_lesser,or_greater"), "set_height", "get_height");
ADD_PROPERTY(PropertyInfo(Variant::INT, "range_z_min", PROPERTY_HINT_RANGE, itos(VS::CANVAS_ITEM_Z_MIN) + "," + itos(VS::CANVAS_ITEM_Z_MAX) + ",1"), "set_z_range_min", "get_z_range_min");
ADD_PROPERTY(PropertyInfo(Variant::INT, "range_z_max", PROPERTY_HINT_RANGE, itos(VS::CANVAS_ITEM_Z_MIN) + "," + itos(VS::CANVAS_ITEM_Z_MAX) + ",1"), "set_z_range_max", "get_z_range_max");
ADD_PROPERTY(PropertyInfo(Variant::INT, "range_layer_min", PROPERTY_HINT_RANGE, "-512,512,1"), "set_layer_range_min", "get_layer_range_min");
@@ -443,7 +443,7 @@ void Light2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "shadow_color"), "set_shadow_color", "get_shadow_color");
ADD_PROPERTY(PropertyInfo(Variant::INT, "shadow_buffer_size", PROPERTY_HINT_RANGE, "32,16384,1"), "set_shadow_buffer_size", "get_shadow_buffer_size");
ADD_PROPERTY(PropertyInfo(Variant::INT, "shadow_filter", PROPERTY_HINT_ENUM, "None,PCF5,PCF13"), "set_shadow_filter", "get_shadow_filter");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "shadow_filter_smooth", PROPERTY_HINT_RANGE, "0,64,0.1"), "set_shadow_smooth", "get_shadow_smooth");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "shadow_filter_smooth", PROPERTY_HINT_RANGE, "0,64,0.1"), "set_shadow_smooth", "get_shadow_smooth");
ADD_PROPERTY(PropertyInfo(Variant::INT, "shadow_item_cull_mask", PROPERTY_HINT_LAYERS_2D_RENDER), "set_item_shadow_cull_mask", "get_item_shadow_cull_mask");
BIND_ENUM_CONSTANT(MODE_ADD);
diff --git a/scene/2d/line_2d.cpp b/scene/2d/line_2d.cpp
index 0aadc84091..dd0af21c16 100644
--- a/scene/2d/line_2d.cpp
+++ b/scene/2d/line_2d.cpp
@@ -401,7 +401,7 @@ void Line2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_antialiased"), &Line2D::get_antialiased);
ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "points"), "set_points", "get_points");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "width"), "set_width", "get_width");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "width"), "set_width", "get_width");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "width_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_curve", "get_curve");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "default_color"), "set_default_color", "get_default_color");
ADD_GROUP("Fill", "");
@@ -413,7 +413,7 @@ void Line2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "begin_cap_mode", PROPERTY_HINT_ENUM, "None,Box,Round"), "set_begin_cap_mode", "get_begin_cap_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "end_cap_mode", PROPERTY_HINT_ENUM, "None,Box,Round"), "set_end_cap_mode", "get_end_cap_mode");
ADD_GROUP("Border", "");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "sharp_limit"), "set_sharp_limit", "get_sharp_limit");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sharp_limit"), "set_sharp_limit", "get_sharp_limit");
ADD_PROPERTY(PropertyInfo(Variant::INT, "round_precision"), "set_round_precision", "get_round_precision");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "antialiased"), "set_antialiased", "get_antialiased");
diff --git a/scene/2d/navigation_2d.cpp b/scene/2d/navigation_2d.cpp
index 45574d4a5a..bbabfa16c7 100644
--- a/scene/2d/navigation_2d.cpp
+++ b/scene/2d/navigation_2d.cpp
@@ -44,8 +44,8 @@ void Navigation2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_edge_connection_margin", "margin"), &Navigation2D::set_edge_connection_margin);
ClassDB::bind_method(D_METHOD("get_edge_connection_margin"), &Navigation2D::get_edge_connection_margin);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "cell_size"), "set_cell_size", "get_cell_size");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "edge_connection_margin"), "set_edge_connection_margin", "get_edge_connection_margin");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "cell_size"), "set_cell_size", "get_cell_size");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "edge_connection_margin"), "set_edge_connection_margin", "get_edge_connection_margin");
}
void Navigation2D::_notification(int p_what) {
@@ -88,3 +88,7 @@ Navigation2D::Navigation2D() {
set_cell_size(10); // Ten pixels
set_edge_connection_margin(100);
}
+
+Navigation2D::~Navigation2D() {
+ Navigation2DServer::get_singleton()->free(map);
+}
diff --git a/scene/2d/navigation_2d.h b/scene/2d/navigation_2d.h
index 16e20d8f9b..5520f5006e 100644
--- a/scene/2d/navigation_2d.h
+++ b/scene/2d/navigation_2d.h
@@ -66,6 +66,7 @@ public:
RID get_closest_point_owner(const Vector2 &p_point) const;
Navigation2D();
+ ~Navigation2D();
};
#endif // NAVIGATION_2D_H
diff --git a/scene/2d/navigation_agent_2d.cpp b/scene/2d/navigation_agent_2d.cpp
index d019d72bc9..f5fe113f29 100644
--- a/scene/2d/navigation_agent_2d.cpp
+++ b/scene/2d/navigation_agent_2d.cpp
@@ -74,13 +74,13 @@ void NavigationAgent2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("_avoidance_done", "new_velocity"), &NavigationAgent2D::_avoidance_done);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "target_desired_distance", PROPERTY_HINT_RANGE, "0.1,100,0.01"), "set_target_desired_distance", "get_target_desired_distance");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.1,500,0.01"), "set_radius", "get_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "neighbor_dist", PROPERTY_HINT_RANGE, "0.1,100000,0.01"), "set_neighbor_dist", "get_neighbor_dist");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "target_desired_distance", PROPERTY_HINT_RANGE, "0.1,100,0.01"), "set_target_desired_distance", "get_target_desired_distance");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.1,500,0.01"), "set_radius", "get_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "neighbor_dist", PROPERTY_HINT_RANGE, "0.1,100000,0.01"), "set_neighbor_dist", "get_neighbor_dist");
ADD_PROPERTY(PropertyInfo(Variant::INT, "max_neighbors", PROPERTY_HINT_RANGE, "1,10000,1"), "set_max_neighbors", "get_max_neighbors");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "time_horizon", PROPERTY_HINT_RANGE, "0.1,10000,0.01"), "set_time_horizon", "get_time_horizon");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_speed", PROPERTY_HINT_RANGE, "0.1,100000,0.01"), "set_max_speed", "get_max_speed");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "path_max_distance", PROPERTY_HINT_RANGE, "10,100,1"), "set_path_max_distance", "get_path_max_distance");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_horizon", PROPERTY_HINT_RANGE, "0.1,10000,0.01"), "set_time_horizon", "get_time_horizon");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_speed", PROPERTY_HINT_RANGE, "0.1,100000,0.01"), "set_max_speed", "get_max_speed");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "path_max_distance", PROPERTY_HINT_RANGE, "10,100,1"), "set_path_max_distance", "get_path_max_distance");
ADD_SIGNAL(MethodInfo("path_changed"));
ADD_SIGNAL(MethodInfo("target_reached"));
diff --git a/scene/2d/node_2d.cpp b/scene/2d/node_2d.cpp
index 7deebe9b27..df21538609 100644
--- a/scene/2d/node_2d.cpp
+++ b/scene/2d/node_2d.cpp
@@ -440,14 +440,14 @@ void Node2D::_bind_methods() {
ADD_GROUP("Transform", "");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "position"), "set_position", "get_position");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "rotation", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_rotation", "get_rotation");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "rotation_degrees", PROPERTY_HINT_RANGE, "-360,360,0.1,or_lesser,or_greater", PROPERTY_USAGE_EDITOR), "set_rotation_degrees", "get_rotation_degrees");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rotation", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_rotation", "get_rotation");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rotation_degrees", PROPERTY_HINT_RANGE, "-360,360,0.1,or_lesser,or_greater", PROPERTY_USAGE_EDITOR), "set_rotation_degrees", "get_rotation_degrees");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "scale"), "set_scale", "get_scale");
ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "transform", PROPERTY_HINT_NONE, "", 0), "set_transform", "get_transform");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "global_position", PROPERTY_HINT_NONE, "", 0), "set_global_position", "get_global_position");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "global_rotation", PROPERTY_HINT_NONE, "", 0), "set_global_rotation", "get_global_rotation");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "global_rotation_degrees", PROPERTY_HINT_NONE, "", 0), "set_global_rotation_degrees", "get_global_rotation_degrees");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "global_rotation", PROPERTY_HINT_NONE, "", 0), "set_global_rotation", "get_global_rotation");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "global_rotation_degrees", PROPERTY_HINT_NONE, "", 0), "set_global_rotation_degrees", "get_global_rotation_degrees");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "global_scale", PROPERTY_HINT_NONE, "", 0), "set_global_scale", "get_global_scale");
ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "global_transform", PROPERTY_HINT_NONE, "", 0), "set_global_transform", "get_global_transform");
diff --git a/scene/2d/particles_2d.cpp b/scene/2d/particles_2d.cpp
index d3bc7b6a5a..2ba2fd8f79 100644
--- a/scene/2d/particles_2d.cpp
+++ b/scene/2d/particles_2d.cpp
@@ -384,12 +384,12 @@ void Particles2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "emitting"), "set_emitting", "is_emitting");
ADD_PROPERTY(PropertyInfo(Variant::INT, "amount", PROPERTY_HINT_EXP_RANGE, "1,1000000,1"), "set_amount", "get_amount");
ADD_GROUP("Time", "");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "lifetime", PROPERTY_HINT_RANGE, "0.01,600.0,0.01,or_greater"), "set_lifetime", "get_lifetime");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime", PROPERTY_HINT_RANGE, "0.01,600.0,0.01,or_greater"), "set_lifetime", "get_lifetime");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_shot"), "set_one_shot", "get_one_shot");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "preprocess", PROPERTY_HINT_RANGE, "0.00,600.0,0.01"), "set_pre_process_time", "get_pre_process_time");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "speed_scale", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_speed_scale", "get_speed_scale");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "explosiveness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_explosiveness_ratio", "get_explosiveness_ratio");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_randomness_ratio", "get_randomness_ratio");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "preprocess", PROPERTY_HINT_RANGE, "0.00,600.0,0.01"), "set_pre_process_time", "get_pre_process_time");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "speed_scale", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_speed_scale", "get_speed_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "explosiveness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_explosiveness_ratio", "get_explosiveness_ratio");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_randomness_ratio", "get_randomness_ratio");
ADD_PROPERTY(PropertyInfo(Variant::INT, "fixed_fps", PROPERTY_HINT_RANGE, "0,1000,1"), "set_fixed_fps", "get_fixed_fps");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fract_delta"), "set_fractional_delta", "get_fractional_delta");
ADD_GROUP("Drawing", "");
diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp
index 3e417e7f5d..9ef3d0ca4f 100644
--- a/scene/2d/path_2d.cpp
+++ b/scene/2d/path_2d.cpp
@@ -308,14 +308,14 @@ void PathFollow2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_lookahead", "lookahead"), &PathFollow2D::set_lookahead);
ClassDB::bind_method(D_METHOD("get_lookahead"), &PathFollow2D::get_lookahead);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "offset", PROPERTY_HINT_RANGE, "0,10000,0.01,or_lesser,or_greater"), "set_offset", "get_offset");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "unit_offset", PROPERTY_HINT_RANGE, "0,1,0.0001,or_lesser,or_greater", PROPERTY_USAGE_EDITOR), "set_unit_offset", "get_unit_offset");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "h_offset"), "set_h_offset", "get_h_offset");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "v_offset"), "set_v_offset", "get_v_offset");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "offset", PROPERTY_HINT_RANGE, "0,10000,0.01,or_lesser,or_greater"), "set_offset", "get_offset");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "unit_offset", PROPERTY_HINT_RANGE, "0,1,0.0001,or_lesser,or_greater", PROPERTY_USAGE_EDITOR), "set_unit_offset", "get_unit_offset");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "h_offset"), "set_h_offset", "get_h_offset");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "v_offset"), "set_v_offset", "get_v_offset");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "rotate"), "set_rotate", "is_rotating");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "cubic_interp"), "set_cubic_interpolation", "get_cubic_interpolation");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "loop"), "set_loop", "has_loop");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "lookahead", PROPERTY_HINT_RANGE, "0.001,1024.0,0.001"), "set_lookahead", "get_lookahead");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lookahead", PROPERTY_HINT_RANGE, "0.001,1024.0,0.001"), "set_lookahead", "get_lookahead");
}
void PathFollow2D::set_offset(float p_offset) {
diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp
index e4d50db147..aae37014b3 100644
--- a/scene/2d/physics_body_2d.cpp
+++ b/scene/2d/physics_body_2d.cpp
@@ -221,7 +221,7 @@ void StaticBody2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("_reload_physics_characteristics"), &StaticBody2D::_reload_physics_characteristics);
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "constant_linear_velocity"), "set_constant_linear_velocity", "get_constant_linear_velocity");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "constant_angular_velocity"), "set_constant_angular_velocity", "get_constant_angular_velocity");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "constant_angular_velocity"), "set_constant_angular_velocity", "get_constant_angular_velocity");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "physics_material_override", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsMaterial"), "set_physics_material_override", "get_physics_material_override");
}
@@ -906,11 +906,11 @@ void RigidBody2D::_bind_methods() {
BIND_VMETHOD(MethodInfo("_integrate_forces", PropertyInfo(Variant::OBJECT, "state", PROPERTY_HINT_RESOURCE_TYPE, "Physics2DDirectBodyState")));
ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Rigid,Static,Character,Kinematic"), "set_mode", "get_mode");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "mass", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_mass", "get_mass");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "inertia", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01", 0), "set_inertia", "get_inertia");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "weight", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01", PROPERTY_USAGE_EDITOR), "set_weight", "get_weight");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mass", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_mass", "get_mass");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "inertia", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01", 0), "set_inertia", "get_inertia");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "weight", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01", PROPERTY_USAGE_EDITOR), "set_weight", "get_weight");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "physics_material_override", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsMaterial"), "set_physics_material_override", "get_physics_material_override");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "gravity_scale", PROPERTY_HINT_RANGE, "-128,128,0.01"), "set_gravity_scale", "get_gravity_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity_scale", PROPERTY_HINT_RANGE, "-128,128,0.01"), "set_gravity_scale", "get_gravity_scale");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "custom_integrator"), "set_use_custom_integrator", "is_using_custom_integrator");
ADD_PROPERTY(PropertyInfo(Variant::INT, "continuous_cd", PROPERTY_HINT_ENUM, "Disabled,Cast Ray,Cast Shape"), "set_continuous_collision_detection_mode", "get_continuous_collision_detection_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "contacts_reported", PROPERTY_HINT_RANGE, "0,64,1,or_greater"), "set_max_contacts_reported", "get_max_contacts_reported");
@@ -919,13 +919,13 @@ void RigidBody2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "can_sleep"), "set_can_sleep", "is_able_to_sleep");
ADD_GROUP("Linear", "linear_");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "linear_velocity"), "set_linear_velocity", "get_linear_velocity");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "linear_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"), "set_linear_damp", "get_linear_damp");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "linear_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"), "set_linear_damp", "get_linear_damp");
ADD_GROUP("Angular", "angular_");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_velocity"), "set_angular_velocity", "get_angular_velocity");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"), "set_angular_damp", "get_angular_damp");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_velocity"), "set_angular_velocity", "get_angular_velocity");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"), "set_angular_damp", "get_angular_damp");
ADD_GROUP("Applied Forces", "applied_");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "applied_force"), "set_applied_force", "get_applied_force");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "applied_torque"), "set_applied_torque", "get_applied_torque");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "applied_torque"), "set_applied_torque", "get_applied_torque");
ADD_SIGNAL(MethodInfo("body_shape_entered", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "local_shape")));
ADD_SIGNAL(MethodInfo("body_shape_exited", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "local_shape")));
@@ -1357,7 +1357,7 @@ void KinematicBody2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("_direct_state_changed"), &KinematicBody2D::_direct_state_changed);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "collision/safe_margin", PROPERTY_HINT_RANGE, "0.001,256,0.001"), "set_safe_margin", "get_safe_margin");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "collision/safe_margin", PROPERTY_HINT_RANGE, "0.001,256,0.001"), "set_safe_margin", "get_safe_margin");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "motion/sync_to_physics"), "set_sync_to_physics", "is_sync_to_physics_enabled");
}
diff --git a/scene/2d/polygon_2d.cpp b/scene/2d/polygon_2d.cpp
index eb8b053301..258292e316 100644
--- a/scene/2d/polygon_2d.cpp
+++ b/scene/2d/polygon_2d.cpp
@@ -700,19 +700,19 @@ void Polygon2D::_bind_methods() {
ADD_GROUP("Texture2D", "texture_");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "texture_offset"), "set_texture_offset", "get_texture_offset");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "texture_scale"), "set_texture_scale", "get_texture_scale");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "texture_rotation_degrees", PROPERTY_HINT_RANGE, "-360,360,0.1,or_lesser,or_greater"), "set_texture_rotation_degrees", "get_texture_rotation_degrees");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "texture_rotation", PROPERTY_HINT_NONE, "", 0), "set_texture_rotation", "get_texture_rotation");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "texture_rotation_degrees", PROPERTY_HINT_RANGE, "-360,360,0.1,or_lesser,or_greater"), "set_texture_rotation_degrees", "get_texture_rotation_degrees");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "texture_rotation", PROPERTY_HINT_NONE, "", 0), "set_texture_rotation", "get_texture_rotation");
ADD_GROUP("Lighting", "");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "normal_map", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_normal_map", "get_normal_map");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "specular_map", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_specular_map", "get_specular_map");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "specular_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_specular_color", "get_specular_color");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "shininess", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_shininess", "get_shininess");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "shininess", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_shininess", "get_shininess");
ADD_GROUP("Skeleton", "");
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "skeleton", PROPERTY_HINT_NODE_PATH_VALID_TYPES, "Skeleton2D"), "set_skeleton", "get_skeleton");
ADD_GROUP("Invert", "invert_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "invert_enable"), "set_invert", "get_invert");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "invert_border", PROPERTY_HINT_RANGE, "0.1,16384,0.1"), "set_invert_border", "get_invert_border");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "invert_border", PROPERTY_HINT_RANGE, "0.1,16384,0.1"), "set_invert_border", "get_invert_border");
ADD_GROUP("Data", "");
ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "polygon"), "set_polygon", "get_polygon");
diff --git a/scene/2d/position_2d.cpp b/scene/2d/position_2d.cpp
index cdeb905c0c..9e95a55d9f 100644
--- a/scene/2d/position_2d.cpp
+++ b/scene/2d/position_2d.cpp
@@ -96,7 +96,7 @@ void Position2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("_set_gizmo_extents", "extents"), &Position2D::set_gizmo_extents);
ClassDB::bind_method(D_METHOD("_get_gizmo_extents"), &Position2D::get_gizmo_extents);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "gizmo_extents", PROPERTY_HINT_RANGE, "0,1000,0.1,or_greater", PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_INTERNAL), "_set_gizmo_extents", "_get_gizmo_extents");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gizmo_extents", PROPERTY_HINT_RANGE, "0,1000,0.1,or_greater", PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_INTERNAL), "_set_gizmo_extents", "_get_gizmo_extents");
}
Position2D::Position2D() {
diff --git a/scene/2d/skeleton_2d.cpp b/scene/2d/skeleton_2d.cpp
index 6f64464cc9..9ebaf23c3a 100644
--- a/scene/2d/skeleton_2d.cpp
+++ b/scene/2d/skeleton_2d.cpp
@@ -90,7 +90,7 @@ void Bone2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_default_length"), &Bone2D::get_default_length);
ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "rest"), "set_rest", "get_rest");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "default_length", PROPERTY_HINT_RANGE, "1,1024,1"), "set_default_length", "get_default_length");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "default_length", PROPERTY_HINT_RANGE, "1,1024,1"), "set_default_length", "get_default_length");
}
void Bone2D::set_rest(const Transform2D &p_rest) {
diff --git a/scene/2d/sprite.cpp b/scene/2d/sprite.cpp
index fac2e7cd46..a5648053c4 100644
--- a/scene/2d/sprite.cpp
+++ b/scene/2d/sprite.cpp
@@ -502,7 +502,7 @@ void Sprite::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "normal_map", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_normal_map", "get_normal_map");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "specular_map", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_specular_map", "get_specular_map");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "specular_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_specular_color", "get_specular_color");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "shininess", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_shininess", "get_shininess");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "shininess", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_shininess", "get_shininess");
ADD_GROUP("Offset", "");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "centered"), "set_centered", "is_centered");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "offset"), "set_offset", "get_offset");
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp
index 0ce11ee75d..60ad8c7a74 100644
--- a/scene/2d/tile_map.cpp
+++ b/scene/2d/tile_map.cpp
@@ -1909,8 +1909,8 @@ void TileMap::_bind_methods() {
ADD_GROUP("Collision", "collision_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "collision_use_parent", PROPERTY_HINT_NONE, ""), "set_collision_use_parent", "get_collision_use_parent");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "collision_use_kinematic", PROPERTY_HINT_NONE, ""), "set_collision_use_kinematic", "get_collision_use_kinematic");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "collision_friction", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_collision_friction", "get_collision_friction");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "collision_bounce", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_collision_bounce", "get_collision_bounce");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "collision_friction", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_collision_friction", "get_collision_friction");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "collision_bounce", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_collision_bounce", "get_collision_bounce");
ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_layer", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_collision_layer", "get_collision_layer");
ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_mask", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_collision_mask", "get_collision_mask");
diff --git a/scene/3d/area.cpp b/scene/3d/area.cpp
index e5dc3cbf65..265b42ab5e 100644
--- a/scene/3d/area.cpp
+++ b/scene/3d/area.cpp
@@ -706,11 +706,11 @@ void Area::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "space_override", PROPERTY_HINT_ENUM, "Disabled,Combine,Combine-Replace,Replace,Replace-Combine"), "set_space_override_mode", "get_space_override_mode");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "gravity_point"), "set_gravity_is_point", "is_gravity_a_point");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "gravity_distance_scale", PROPERTY_HINT_EXP_RANGE, "0,1024,0.001,or_greater"), "set_gravity_distance_scale", "get_gravity_distance_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity_distance_scale", PROPERTY_HINT_EXP_RANGE, "0,1024,0.001,or_greater"), "set_gravity_distance_scale", "get_gravity_distance_scale");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "gravity_vec"), "set_gravity_vector", "get_gravity_vector");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "gravity", PROPERTY_HINT_RANGE, "-1024,1024,0.01"), "set_gravity", "get_gravity");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "linear_damp", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"), "set_linear_damp", "get_linear_damp");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_damp", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"), "set_angular_damp", "get_angular_damp");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity", PROPERTY_HINT_RANGE, "-1024,1024,0.01"), "set_gravity", "get_gravity");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "linear_damp", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"), "set_linear_damp", "get_linear_damp");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_damp", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"), "set_angular_damp", "get_angular_damp");
ADD_PROPERTY(PropertyInfo(Variant::INT, "priority", PROPERTY_HINT_RANGE, "0,128,1"), "set_priority", "get_priority");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "monitoring"), "set_monitoring", "is_monitoring");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "monitorable"), "set_monitorable", "is_monitorable");
@@ -723,8 +723,8 @@ void Area::_bind_methods() {
ADD_GROUP("Reverb Bus", "reverb_bus_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "reverb_bus_enable"), "set_use_reverb_bus", "is_using_reverb_bus");
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "reverb_bus_name", PROPERTY_HINT_ENUM, ""), "set_reverb_bus", "get_reverb_bus");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "reverb_bus_amount", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_reverb_amount", "get_reverb_amount");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "reverb_bus_uniformity", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_reverb_uniformity", "get_reverb_uniformity");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "reverb_bus_amount", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_reverb_amount", "get_reverb_amount");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "reverb_bus_uniformity", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_reverb_uniformity", "get_reverb_uniformity");
BIND_ENUM_CONSTANT(SPACE_OVERRIDE_DISABLED);
BIND_ENUM_CONSTANT(SPACE_OVERRIDE_COMBINE);
diff --git a/scene/3d/arvr_nodes.cpp b/scene/3d/arvr_nodes.cpp
index 8d1556ef1c..bf85a8bd53 100644
--- a/scene/3d/arvr_nodes.cpp
+++ b/scene/3d/arvr_nodes.cpp
@@ -252,7 +252,7 @@ void ARVRController::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_rumble"), &ARVRController::get_rumble);
ClassDB::bind_method(D_METHOD("set_rumble", "rumble"), &ARVRController::set_rumble);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "rumble", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_rumble", "get_rumble");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rumble", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_rumble", "get_rumble");
ADD_PROPERTY_DEFAULT("rumble", 0.0);
ClassDB::bind_method(D_METHOD("get_mesh"), &ARVRController::get_mesh);
@@ -544,7 +544,7 @@ String ARVROrigin::get_configuration_warning() const {
void ARVROrigin::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_world_scale", "world_scale"), &ARVROrigin::set_world_scale);
ClassDB::bind_method(D_METHOD("get_world_scale"), &ARVROrigin::get_world_scale);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "world_scale"), "set_world_scale", "get_world_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "world_scale"), "set_world_scale", "get_world_scale");
};
void ARVROrigin::set_tracked_camera(ARVRCamera *p_tracked_camera) {
diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp
index 320457a3f2..461ac1748b 100644
--- a/scene/3d/audio_stream_player_3d.cpp
+++ b/scene/3d/audio_stream_player_3d.cpp
@@ -98,11 +98,18 @@ static const Vector3 speaker_directions[7] = {
void AudioStreamPlayer3D::_calc_output_vol(const Vector3 &source_dir, real_t tightness, AudioStreamPlayer3D::Output &output) {
unsigned int speaker_count; // only main speakers (no LFE)
switch (AudioServer::get_singleton()->get_speaker_mode()) {
- default: //fallthrough
- case AudioServer::SPEAKER_MODE_STEREO: speaker_count = 2; break;
- case AudioServer::SPEAKER_SURROUND_31: speaker_count = 3; break;
- case AudioServer::SPEAKER_SURROUND_51: speaker_count = 5; break;
- case AudioServer::SPEAKER_SURROUND_71: speaker_count = 7; break;
+ case AudioServer::SPEAKER_MODE_STEREO:
+ speaker_count = 2;
+ break;
+ case AudioServer::SPEAKER_SURROUND_31:
+ speaker_count = 3;
+ break;
+ case AudioServer::SPEAKER_SURROUND_51:
+ speaker_count = 5;
+ break;
+ case AudioServer::SPEAKER_SURROUND_71:
+ speaker_count = 7;
+ break;
}
Spcap spcap(speaker_count, speaker_directions); //TODO: should only be created/recreated once the speaker mode / speaker positions changes
@@ -113,18 +120,19 @@ void AudioStreamPlayer3D::_calc_output_vol(const Vector3 &source_dir, real_t tig
case AudioServer::SPEAKER_SURROUND_71:
output.vol[3].l = volumes[5]; // side-left
output.vol[3].r = volumes[6]; // side-right
- //fallthrough
+ [[fallthrough]];
case AudioServer::SPEAKER_SURROUND_51:
output.vol[2].l = volumes[3]; // rear-left
output.vol[2].r = volumes[4]; // rear-right
- //fallthrough
+ [[fallthrough]];
case AudioServer::SPEAKER_SURROUND_31:
output.vol[1].r = 1.0; // LFE - always full power
output.vol[1].l = volumes[2]; // center
- //fallthrough
+ [[fallthrough]];
case AudioServer::SPEAKER_MODE_STEREO:
output.vol[0].r = volumes[1]; // front-right
output.vol[0].l = volumes[0]; // front-left
+ break;
}
}
@@ -1004,24 +1012,24 @@ void AudioStreamPlayer3D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream"), "set_stream", "get_stream");
ADD_PROPERTY(PropertyInfo(Variant::INT, "attenuation_model", PROPERTY_HINT_ENUM, "Inverse,InverseSquare,Log,Disabled"), "set_attenuation_model", "get_attenuation_model");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "unit_db", PROPERTY_HINT_RANGE, "-80,80"), "set_unit_db", "get_unit_db");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "unit_size", PROPERTY_HINT_RANGE, "0.1,100,0.1"), "set_unit_size", "get_unit_size");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_db", PROPERTY_HINT_RANGE, "-24,6"), "set_max_db", "get_max_db");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "pitch_scale", PROPERTY_HINT_RANGE, "0.01,4,0.01,or_greater"), "set_pitch_scale", "get_pitch_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "unit_db", PROPERTY_HINT_RANGE, "-80,80"), "set_unit_db", "get_unit_db");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "unit_size", PROPERTY_HINT_RANGE, "0.1,100,0.1"), "set_unit_size", "get_unit_size");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_db", PROPERTY_HINT_RANGE, "-24,6"), "set_max_db", "get_max_db");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pitch_scale", PROPERTY_HINT_RANGE, "0.01,4,0.01,or_greater"), "set_pitch_scale", "get_pitch_scale");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playing", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "_set_playing", "is_playing");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autoplay"), "set_autoplay", "is_autoplay_enabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "stream_paused", PROPERTY_HINT_NONE, ""), "set_stream_paused", "get_stream_paused");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_distance", PROPERTY_HINT_EXP_RANGE, "0,4096,1,or_greater"), "set_max_distance", "get_max_distance");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_distance", PROPERTY_HINT_EXP_RANGE, "0,4096,1,or_greater"), "set_max_distance", "get_max_distance");
ADD_PROPERTY(PropertyInfo(Variant::INT, "out_of_range_mode", PROPERTY_HINT_ENUM, "Mix,Pause"), "set_out_of_range_mode", "get_out_of_range_mode");
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus");
ADD_PROPERTY(PropertyInfo(Variant::INT, "area_mask", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_area_mask", "get_area_mask");
ADD_GROUP("Emission Angle", "emission_angle");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "emission_angle_enabled"), "set_emission_angle_enabled", "is_emission_angle_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "emission_angle_degrees", PROPERTY_HINT_RANGE, "0.1,90,0.1"), "set_emission_angle", "get_emission_angle");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "emission_angle_filter_attenuation_db", PROPERTY_HINT_RANGE, "-80,0,0.1"), "set_emission_angle_filter_attenuation_db", "get_emission_angle_filter_attenuation_db");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "emission_angle_degrees", PROPERTY_HINT_RANGE, "0.1,90,0.1"), "set_emission_angle", "get_emission_angle");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "emission_angle_filter_attenuation_db", PROPERTY_HINT_RANGE, "-80,0,0.1"), "set_emission_angle_filter_attenuation_db", "get_emission_angle_filter_attenuation_db");
ADD_GROUP("Attenuation Filter", "attenuation_filter_");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "attenuation_filter_cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_attenuation_filter_cutoff_hz", "get_attenuation_filter_cutoff_hz");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "attenuation_filter_db", PROPERTY_HINT_RANGE, "-80,0,0.1"), "set_attenuation_filter_db", "get_attenuation_filter_db");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "attenuation_filter_cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_attenuation_filter_cutoff_hz", "get_attenuation_filter_cutoff_hz");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "attenuation_filter_db", PROPERTY_HINT_RANGE, "-80,0,0.1"), "set_attenuation_filter_db", "get_attenuation_filter_db");
ADD_GROUP("Doppler", "doppler_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "doppler_tracking", PROPERTY_HINT_ENUM, "Disabled,Idle,Physics"), "set_doppler_tracking", "get_doppler_tracking");
diff --git a/scene/3d/baked_lightmap.cpp b/scene/3d/baked_lightmap.cpp
index a6b92d5ee6..73b1d450f0 100644
--- a/scene/3d/baked_lightmap.cpp
+++ b/scene/3d/baked_lightmap.cpp
@@ -174,7 +174,7 @@ void BakedLightmapData::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::AABB, "bounds", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_bounds", "get_bounds");
ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM, "cell_space_transform", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_cell_space_transform", "get_cell_space_transform");
ADD_PROPERTY(PropertyInfo(Variant::INT, "cell_subdiv", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_cell_subdiv", "get_cell_subdiv");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "energy", PROPERTY_HINT_RANGE, "0,16,0.01,or_greater"), "set_energy", "get_energy");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "energy", PROPERTY_HINT_RANGE, "0,16,0.01,or_greater"), "set_energy", "get_energy");
ADD_PROPERTY(PropertyInfo(Variant::PACKED_BYTE_ARRAY, "octree", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_octree", "get_octree");
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "user_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_user_data", "_get_user_data");
}
@@ -819,16 +819,16 @@ void BakedLightmap::_bind_methods() {
ClassDB::set_method_flags(get_class_static(), _scs_create("debug_bake"), METHOD_FLAGS_DEFAULT | METHOD_FLAG_EDITOR);
ADD_GROUP("Bake", "bake_");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "bake_cell_size", PROPERTY_HINT_RANGE, "0.01,64,0.01"), "set_bake_cell_size", "get_bake_cell_size");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bake_cell_size", PROPERTY_HINT_RANGE, "0.01,64,0.01"), "set_bake_cell_size", "get_bake_cell_size");
ADD_PROPERTY(PropertyInfo(Variant::INT, "bake_quality", PROPERTY_HINT_ENUM, "Low,Medium,High"), "set_bake_quality", "get_bake_quality");
ADD_PROPERTY(PropertyInfo(Variant::INT, "bake_mode", PROPERTY_HINT_ENUM, "ConeTrace,RayTrace"), "set_bake_mode", "get_bake_mode");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "bake_propagation", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_propagation", "get_propagation");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "bake_energy", PROPERTY_HINT_RANGE, "0,32,0.01"), "set_energy", "get_energy");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bake_propagation", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_propagation", "get_propagation");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bake_energy", PROPERTY_HINT_RANGE, "0,32,0.01"), "set_energy", "get_energy");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "bake_hdr"), "set_hdr", "is_hdr");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "bake_extents"), "set_extents", "get_extents");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "bake_default_texels_per_unit"), "set_bake_default_texels_per_unit", "get_bake_default_texels_per_unit");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bake_default_texels_per_unit"), "set_bake_default_texels_per_unit", "get_bake_default_texels_per_unit");
ADD_GROUP("Capture", "capture_");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "capture_cell_size", PROPERTY_HINT_RANGE, "0.01,64,0.01"), "set_capture_cell_size", "get_capture_cell_size");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "capture_cell_size", PROPERTY_HINT_RANGE, "0.01,64,0.01"), "set_capture_cell_size", "get_capture_cell_size");
ADD_GROUP("Data", "");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "image_path", PROPERTY_HINT_DIR), "set_image_path", "get_image_path");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "light_data", PROPERTY_HINT_RESOURCE_TYPE, "BakedLightmapData"), "set_light_data", "get_light_data");
diff --git a/scene/3d/camera.cpp b/scene/3d/camera.cpp
index ac8d50c419..741712025c 100644
--- a/scene/3d/camera.cpp
+++ b/scene/3d/camera.cpp
@@ -545,16 +545,16 @@ void Camera::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "cull_mask", PROPERTY_HINT_LAYERS_3D_RENDER), "set_cull_mask", "get_cull_mask");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "environment", PROPERTY_HINT_RESOURCE_TYPE, "Environment"), "set_environment", "get_environment");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "effects", PROPERTY_HINT_RESOURCE_TYPE, "CameraEffects"), "set_effects", "get_effects");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "h_offset"), "set_h_offset", "get_h_offset");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "v_offset"), "set_v_offset", "get_v_offset");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "h_offset"), "set_h_offset", "get_h_offset");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "v_offset"), "set_v_offset", "get_v_offset");
ADD_PROPERTY(PropertyInfo(Variant::INT, "doppler_tracking", PROPERTY_HINT_ENUM, "Disabled,Idle,Physics"), "set_doppler_tracking", "get_doppler_tracking");
ADD_PROPERTY(PropertyInfo(Variant::INT, "projection", PROPERTY_HINT_ENUM, "Perspective,Orthogonal,Frustum"), "set_projection", "get_projection");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "current"), "set_current", "is_current");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "fov", PROPERTY_HINT_RANGE, "1,179,0.1"), "set_fov", "get_fov");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "size", PROPERTY_HINT_RANGE, "0.1,16384,0.01"), "set_size", "get_size");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fov", PROPERTY_HINT_RANGE, "1,179,0.1"), "set_fov", "get_fov");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "size", PROPERTY_HINT_RANGE, "0.1,16384,0.01"), "set_size", "get_size");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "frustum_offset"), "set_frustum_offset", "get_frustum_offset");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "near", PROPERTY_HINT_EXP_RANGE, "0.01,8192,0.01,or_greater"), "set_znear", "get_znear");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "far", PROPERTY_HINT_EXP_RANGE, "0.1,8192,0.1,or_greater"), "set_zfar", "get_zfar");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "near", PROPERTY_HINT_EXP_RANGE, "0.01,8192,0.01,or_greater"), "set_znear", "get_znear");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "far", PROPERTY_HINT_EXP_RANGE, "0.1,8192,0.1,or_greater"), "set_zfar", "get_zfar");
BIND_ENUM_CONSTANT(PROJECTION_PERSPECTIVE);
BIND_ENUM_CONSTANT(PROJECTION_ORTHOGONAL);
@@ -926,7 +926,7 @@ void ClippedCamera::_bind_methods() {
ClassDB::bind_method(D_METHOD("clear_exceptions"), &ClippedCamera::clear_exceptions);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "margin", PROPERTY_HINT_RANGE, "0,32,0.01"), "set_margin", "get_margin");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "margin", PROPERTY_HINT_RANGE, "0,32,0.01"), "set_margin", "get_margin");
ADD_PROPERTY(PropertyInfo(Variant::INT, "process_mode", PROPERTY_HINT_ENUM, "Physics,Idle"), "set_process_mode", "get_process_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_mask", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_collision_mask", "get_collision_mask");
diff --git a/scene/3d/collision_polygon.cpp b/scene/3d/collision_polygon.cpp
index 342159d80f..636b859477 100644
--- a/scene/3d/collision_polygon.cpp
+++ b/scene/3d/collision_polygon.cpp
@@ -191,7 +191,7 @@ void CollisionPolygon::_bind_methods() {
ClassDB::bind_method(D_METHOD("_is_editable_3d_polygon"), &CollisionPolygon::_is_editable_3d_polygon);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "depth"), "set_depth", "get_depth");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "depth"), "set_depth", "get_depth");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "disabled"), "set_disabled", "is_disabled");
ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "polygon"), "set_polygon", "get_polygon");
}
diff --git a/scene/3d/cpu_particles.cpp b/scene/3d/cpu_particles.cpp
index 9210c5d5ef..cddbe4bbbb 100644
--- a/scene/3d/cpu_particles.cpp
+++ b/scene/3d/cpu_particles.cpp
@@ -1327,13 +1327,13 @@ void CPUParticles::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "emitting"), "set_emitting", "is_emitting");
ADD_PROPERTY(PropertyInfo(Variant::INT, "amount", PROPERTY_HINT_EXP_RANGE, "1,1000000,1"), "set_amount", "get_amount");
ADD_GROUP("Time", "");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "lifetime", PROPERTY_HINT_EXP_RANGE, "0.01,600.0,0.01,or_greater"), "set_lifetime", "get_lifetime");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime", PROPERTY_HINT_EXP_RANGE, "0.01,600.0,0.01,or_greater"), "set_lifetime", "get_lifetime");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_shot"), "set_one_shot", "get_one_shot");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "preprocess", PROPERTY_HINT_EXP_RANGE, "0.00,600.0,0.01"), "set_pre_process_time", "get_pre_process_time");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "speed_scale", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_speed_scale", "get_speed_scale");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "explosiveness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_explosiveness_ratio", "get_explosiveness_ratio");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_randomness_ratio", "get_randomness_ratio");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "lifetime_randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_lifetime_randomness", "get_lifetime_randomness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "preprocess", PROPERTY_HINT_EXP_RANGE, "0.00,600.0,0.01"), "set_pre_process_time", "get_pre_process_time");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "speed_scale", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_speed_scale", "get_speed_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "explosiveness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_explosiveness_ratio", "get_explosiveness_ratio");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_randomness_ratio", "get_randomness_ratio");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime_randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_lifetime_randomness", "get_lifetime_randomness");
ADD_PROPERTY(PropertyInfo(Variant::INT, "fixed_fps", PROPERTY_HINT_RANGE, "0,1000,1"), "set_fixed_fps", "get_fixed_fps");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fract_delta"), "set_fractional_delta", "get_fractional_delta");
ADD_GROUP("Drawing", "");
@@ -1401,7 +1401,7 @@ void CPUParticles::_bind_methods() {
ADD_GROUP("Emission Shape", "emission_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "emission_shape", PROPERTY_HINT_ENUM, "Point,Sphere,Box,Points,Directed Points"), "set_emission_shape", "get_emission_shape");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "emission_sphere_radius", PROPERTY_HINT_RANGE, "0.01,128,0.01"), "set_emission_sphere_radius", "get_emission_sphere_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "emission_sphere_radius", PROPERTY_HINT_RANGE, "0.01,128,0.01"), "set_emission_sphere_radius", "get_emission_sphere_radius");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "emission_box_extents"), "set_emission_box_extents", "get_emission_box_extents");
ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR3_ARRAY, "emission_points"), "set_emission_points", "get_emission_points");
ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR3_ARRAY, "emission_normals"), "set_emission_normals", "get_emission_normals");
@@ -1412,59 +1412,59 @@ void CPUParticles::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "flag_disable_z"), "set_particle_flag", "get_particle_flag", FLAG_DISABLE_Z);
ADD_GROUP("Direction", "");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "direction"), "set_direction", "get_direction");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "spread", PROPERTY_HINT_RANGE, "0,180,0.01"), "set_spread", "get_spread");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "flatness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_flatness", "get_flatness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "spread", PROPERTY_HINT_RANGE, "0,180,0.01"), "set_spread", "get_spread");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "flatness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_flatness", "get_flatness");
ADD_GROUP("Gravity", "");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "gravity"), "set_gravity", "get_gravity");
ADD_GROUP("Initial Velocity", "initial_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "initial_velocity", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_INITIAL_LINEAR_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "initial_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_INITIAL_LINEAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_INITIAL_LINEAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_INITIAL_LINEAR_VELOCITY);
ADD_GROUP("Angular Velocity", "angular_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_velocity", PROPERTY_HINT_RANGE, "-720,720,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGULAR_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGULAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_velocity", PROPERTY_HINT_RANGE, "-720,720,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGULAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGULAR_VELOCITY);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "angular_velocity_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANGULAR_VELOCITY);
ADD_GROUP("Orbit Velocity", "orbit_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "orbit_velocity", PROPERTY_HINT_RANGE, "-1000,1000,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ORBIT_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "orbit_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ORBIT_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "orbit_velocity", PROPERTY_HINT_RANGE, "-1000,1000,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ORBIT_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "orbit_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ORBIT_VELOCITY);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "orbit_velocity_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ORBIT_VELOCITY);
ADD_GROUP("Linear Accel", "linear_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_LINEAR_ACCEL);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_LINEAR_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_LINEAR_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_LINEAR_ACCEL);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "linear_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_LINEAR_ACCEL);
ADD_GROUP("Radial Accel", "radial_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "radial_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_RADIAL_ACCEL);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "radial_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_RADIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "radial_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_RADIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "radial_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_RADIAL_ACCEL);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "radial_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_RADIAL_ACCEL);
ADD_GROUP("Tangential Accel", "tangential_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "tangential_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_TANGENTIAL_ACCEL);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "tangential_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_TANGENTIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "tangential_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_TANGENTIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "tangential_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_TANGENTIAL_ACCEL);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "tangential_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_TANGENTIAL_ACCEL);
ADD_GROUP("Damping", "");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "damping", PROPERTY_HINT_RANGE, "0,100,0.01"), "set_param", "get_param", PARAM_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "damping_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "damping", PROPERTY_HINT_RANGE, "0,100,0.01"), "set_param", "get_param", PARAM_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "damping_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_DAMPING);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "damping_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_DAMPING);
ADD_GROUP("Angle", "");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angle", PROPERTY_HINT_RANGE, "-720,720,0.1,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGLE);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angle_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGLE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angle", PROPERTY_HINT_RANGE, "-720,720,0.1,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGLE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angle_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGLE);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "angle_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANGLE);
ADD_GROUP("Scale", "");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "scale_amount", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_SCALE);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "scale_amount_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_SCALE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "scale_amount", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_SCALE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "scale_amount_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_SCALE);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "scale_amount_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_SCALE);
ADD_GROUP("Color", "");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "color_ramp", PROPERTY_HINT_RESOURCE_TYPE, "Gradient"), "set_color_ramp", "get_color_ramp");
ADD_GROUP("Hue Variation", "hue_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "hue_variation", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_param", "get_param", PARAM_HUE_VARIATION);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "hue_variation_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_HUE_VARIATION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "hue_variation", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_param", "get_param", PARAM_HUE_VARIATION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "hue_variation_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_HUE_VARIATION);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "hue_variation_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_HUE_VARIATION);
ADD_GROUP("Animation", "anim_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_speed", PROPERTY_HINT_RANGE, "0,128,0.01,or_greater"), "set_param", "get_param", PARAM_ANIM_SPEED);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_speed_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_SPEED);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_speed", PROPERTY_HINT_RANGE, "0,128,0.01,or_greater"), "set_param", "get_param", PARAM_ANIM_SPEED);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_speed_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_SPEED);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "anim_speed_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANIM_SPEED);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_offset", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_ANIM_OFFSET);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_offset_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_OFFSET);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_offset", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_ANIM_OFFSET);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_offset_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_OFFSET);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "anim_offset_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANIM_OFFSET);
BIND_ENUM_CONSTANT(PARAM_INITIAL_LINEAR_VELOCITY);
diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp
index 918646fd9e..c3f039ae85 100644
--- a/scene/3d/gi_probe.cpp
+++ b/scene/3d/gi_probe.cpp
@@ -271,13 +271,13 @@ void GIProbeData::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_data", "_get_data");
ADD_PROPERTY(PropertyInfo(Variant::INT, "dynamic_range", PROPERTY_HINT_RANGE, "0,8,0.01"), "set_dynamic_range", "get_dynamic_range");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "energy", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_energy", "get_energy");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "bias", PROPERTY_HINT_RANGE, "0,8,0.01"), "set_bias", "get_bias");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "normal_bias", PROPERTY_HINT_RANGE, "0,8,0.01"), "set_normal_bias", "get_normal_bias");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "propagation", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_propagation", "get_propagation");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "anisotropy_strength", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_anisotropy_strength", "get_anisotropy_strength");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ao", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_ao", "get_ao");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ao_size", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_ao_size", "get_ao_size");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "energy", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_energy", "get_energy");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bias", PROPERTY_HINT_RANGE, "0,8,0.01"), "set_bias", "get_bias");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "normal_bias", PROPERTY_HINT_RANGE, "0,8,0.01"), "set_normal_bias", "get_normal_bias");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "propagation", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_propagation", "get_propagation");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "anisotropy_strength", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_anisotropy_strength", "get_anisotropy_strength");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ao", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_ao", "get_ao");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ao_size", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_ao_size", "get_ao_size");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_two_bounces"), "set_use_two_bounces", "is_using_two_bounces");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "interior"), "set_interior", "is_interior");
}
diff --git a/scene/3d/interpolated_camera.cpp b/scene/3d/interpolated_camera.cpp
index baf5ac4be6..592d592a38 100644
--- a/scene/3d/interpolated_camera.cpp
+++ b/scene/3d/interpolated_camera.cpp
@@ -144,7 +144,7 @@ void InterpolatedCamera::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_interpolation_enabled"), &InterpolatedCamera::is_interpolation_enabled);
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "target"), "set_target_path", "get_target_path");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "speed"), "set_speed", "get_speed");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "speed"), "set_speed", "get_speed");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "enabled"), "set_interpolation_enabled", "is_interpolation_enabled");
}
diff --git a/scene/3d/light.cpp b/scene/3d/light.cpp
index 90d3f71b95..7c922ce1cd 100644
--- a/scene/3d/light.cpp
+++ b/scene/3d/light.cpp
@@ -253,17 +253,17 @@ void Light::_bind_methods() {
ADD_GROUP("Light", "light_");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "light_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_color", "get_color");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "light_energy", PROPERTY_HINT_RANGE, "0,16,0.01,or_greater"), "set_param", "get_param", PARAM_ENERGY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "light_indirect_energy", PROPERTY_HINT_RANGE, "0,16,0.01,or_greater"), "set_param", "get_param", PARAM_INDIRECT_ENERGY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "light_energy", PROPERTY_HINT_RANGE, "0,16,0.01,or_greater"), "set_param", "get_param", PARAM_ENERGY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "light_indirect_energy", PROPERTY_HINT_RANGE, "0,16,0.01,or_greater"), "set_param", "get_param", PARAM_INDIRECT_ENERGY);
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "light_negative"), "set_negative", "is_negative");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "light_specular", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_SPECULAR);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "light_specular", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_SPECULAR);
ADD_PROPERTY(PropertyInfo(Variant::INT, "light_bake_mode", PROPERTY_HINT_ENUM, "Disable,Indirect,All"), "set_bake_mode", "get_bake_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "light_cull_mask", PROPERTY_HINT_LAYERS_3D_RENDER), "set_cull_mask", "get_cull_mask");
ADD_GROUP("Shadow", "shadow_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "shadow_enabled"), "set_shadow", "has_shadow");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "shadow_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_shadow_color", "get_shadow_color");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "shadow_bias", PROPERTY_HINT_RANGE, "-16,16,0.01"), "set_param", "get_param", PARAM_SHADOW_BIAS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "shadow_contact", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_param", "get_param", PARAM_CONTACT_SHADOW_SIZE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "shadow_bias", PROPERTY_HINT_RANGE, "-16,16,0.01"), "set_param", "get_param", PARAM_SHADOW_BIAS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "shadow_contact", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_param", "get_param", PARAM_CONTACT_SHADOW_SIZE);
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "shadow_reverse_cull_face"), "set_shadow_reverse_cull_face", "get_shadow_reverse_cull_face");
ADD_GROUP("Editor", "");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "editor_only"), "set_editor_only", "is_editor_only");
@@ -393,15 +393,15 @@ void DirectionalLight::_bind_methods() {
ADD_GROUP("Directional Shadow", "directional_shadow_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "directional_shadow_mode", PROPERTY_HINT_ENUM, "Orthogonal,PSSM 2 Splits,PSSM 4 Splits"), "set_shadow_mode", "get_shadow_mode");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "directional_shadow_split_1", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_param", "get_param", PARAM_SHADOW_SPLIT_1_OFFSET);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "directional_shadow_split_2", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_param", "get_param", PARAM_SHADOW_SPLIT_2_OFFSET);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "directional_shadow_split_3", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_param", "get_param", PARAM_SHADOW_SPLIT_3_OFFSET);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "directional_shadow_fade_start", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_SHADOW_FADE_START);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "directional_shadow_split_1", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_param", "get_param", PARAM_SHADOW_SPLIT_1_OFFSET);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "directional_shadow_split_2", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_param", "get_param", PARAM_SHADOW_SPLIT_2_OFFSET);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "directional_shadow_split_3", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_param", "get_param", PARAM_SHADOW_SPLIT_3_OFFSET);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "directional_shadow_fade_start", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_SHADOW_FADE_START);
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "directional_shadow_blend_splits"), "set_blend_splits", "is_blend_splits_enabled");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "directional_shadow_normal_bias", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_param", "get_param", PARAM_SHADOW_NORMAL_BIAS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "directional_shadow_bias_split_scale", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_SHADOW_BIAS_SPLIT_SCALE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "directional_shadow_normal_bias", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_param", "get_param", PARAM_SHADOW_NORMAL_BIAS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "directional_shadow_bias_split_scale", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_SHADOW_BIAS_SPLIT_SCALE);
ADD_PROPERTY(PropertyInfo(Variant::INT, "directional_shadow_depth_range", PROPERTY_HINT_ENUM, "Stable,Optimized"), "set_shadow_depth_range", "get_shadow_depth_range");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "directional_shadow_max_distance", PROPERTY_HINT_EXP_RANGE, "0,8192,0.1,or_greater"), "set_param", "get_param", PARAM_SHADOW_MAX_DISTANCE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "directional_shadow_max_distance", PROPERTY_HINT_EXP_RANGE, "0,8192,0.1,or_greater"), "set_param", "get_param", PARAM_SHADOW_MAX_DISTANCE);
BIND_ENUM_CONSTANT(SHADOW_ORTHOGONAL);
BIND_ENUM_CONSTANT(SHADOW_PARALLEL_2_SPLITS);
@@ -442,8 +442,8 @@ void OmniLight::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_shadow_mode"), &OmniLight::get_shadow_mode);
ADD_GROUP("Omni", "omni_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "omni_range", PROPERTY_HINT_EXP_RANGE, "0,4096,0.1,or_greater"), "set_param", "get_param", PARAM_RANGE);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "omni_attenuation", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_param", "get_param", PARAM_ATTENUATION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "omni_range", PROPERTY_HINT_EXP_RANGE, "0,4096,0.1,or_greater"), "set_param", "get_param", PARAM_RANGE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "omni_attenuation", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_param", "get_param", PARAM_ATTENUATION);
ADD_PROPERTY(PropertyInfo(Variant::INT, "omni_shadow_mode", PROPERTY_HINT_ENUM, "Dual Paraboloid,Cube"), "set_shadow_mode", "get_shadow_mode");
BIND_ENUM_CONSTANT(SHADOW_DUAL_PARABOLOID);
@@ -473,8 +473,8 @@ String SpotLight::get_configuration_warning() const {
void SpotLight::_bind_methods() {
ADD_GROUP("Spot", "spot_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "spot_range", PROPERTY_HINT_EXP_RANGE, "0,4096,0.1,or_greater"), "set_param", "get_param", PARAM_RANGE);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "spot_attenuation", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_param", "get_param", PARAM_ATTENUATION);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "spot_angle", PROPERTY_HINT_RANGE, "0,180,0.1"), "set_param", "get_param", PARAM_SPOT_ANGLE);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "spot_angle_attenuation", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_param", "get_param", PARAM_SPOT_ATTENUATION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "spot_range", PROPERTY_HINT_EXP_RANGE, "0,4096,0.1,or_greater"), "set_param", "get_param", PARAM_RANGE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "spot_attenuation", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_param", "get_param", PARAM_ATTENUATION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "spot_angle", PROPERTY_HINT_RANGE, "0,180,0.1"), "set_param", "get_param", PARAM_SPOT_ANGLE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "spot_angle_attenuation", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_param", "get_param", PARAM_SPOT_ATTENUATION);
}
diff --git a/scene/3d/mesh_instance.cpp b/scene/3d/mesh_instance.cpp
index fa5b965414..06e1202a24 100644
--- a/scene/3d/mesh_instance.cpp
+++ b/scene/3d/mesh_instance.cpp
@@ -96,7 +96,7 @@ void MeshInstance::_get_property_list(List<PropertyInfo> *p_list) const {
ls.sort();
for (List<String>::Element *E = ls.front(); E; E = E->next()) {
- p_list->push_back(PropertyInfo(Variant::REAL, E->get(), PROPERTY_HINT_RANGE, "0,1,0.00001"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, E->get(), PROPERTY_HINT_RANGE, "0,1,0.00001"));
}
if (mesh.is_valid()) {
diff --git a/scene/3d/navigation.cpp b/scene/3d/navigation.cpp
index f2109a2f33..8c543bc97f 100644
--- a/scene/3d/navigation.cpp
+++ b/scene/3d/navigation.cpp
@@ -94,8 +94,8 @@ void Navigation::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_edge_connection_margin"), &Navigation::get_edge_connection_margin);
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "up_vector"), "set_up_vector", "get_up_vector");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "cell_size"), "set_cell_size", "get_cell_size");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "edge_connection_margin"), "set_edge_connection_margin", "get_edge_connection_margin");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "cell_size"), "set_cell_size", "get_cell_size");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "edge_connection_margin"), "set_edge_connection_margin", "get_edge_connection_margin");
}
void Navigation::_notification(int p_what) {
diff --git a/scene/3d/navigation_agent.cpp b/scene/3d/navigation_agent.cpp
index 29cdd6f204..728fc947e9 100644
--- a/scene/3d/navigation_agent.cpp
+++ b/scene/3d/navigation_agent.cpp
@@ -80,14 +80,14 @@ void NavigationAgent::_bind_methods() {
ClassDB::bind_method(D_METHOD("_avoidance_done", "new_velocity"), &NavigationAgent::_avoidance_done);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "target_desired_distance", PROPERTY_HINT_RANGE, "0.1,100,0.01"), "set_target_desired_distance", "get_target_desired_distance");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.1,100,0.01"), "set_radius", "get_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "agent_height_offset", PROPERTY_HINT_RANGE, "-100.0,100,0.01"), "set_agent_height_offset", "get_agent_height_offset");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "neighbor_dist", PROPERTY_HINT_RANGE, "0.1,10000,0.01"), "set_neighbor_dist", "get_neighbor_dist");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "target_desired_distance", PROPERTY_HINT_RANGE, "0.1,100,0.01"), "set_target_desired_distance", "get_target_desired_distance");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.1,100,0.01"), "set_radius", "get_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "agent_height_offset", PROPERTY_HINT_RANGE, "-100.0,100,0.01"), "set_agent_height_offset", "get_agent_height_offset");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "neighbor_dist", PROPERTY_HINT_RANGE, "0.1,10000,0.01"), "set_neighbor_dist", "get_neighbor_dist");
ADD_PROPERTY(PropertyInfo(Variant::INT, "max_neighbors", PROPERTY_HINT_RANGE, "1,10000,1"), "set_max_neighbors", "get_max_neighbors");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "time_horizon", PROPERTY_HINT_RANGE, "0.01,100,0.01"), "set_time_horizon", "get_time_horizon");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_speed", PROPERTY_HINT_RANGE, "0.1,10000,0.01"), "set_max_speed", "get_max_speed");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "path_max_distance", PROPERTY_HINT_RANGE, "0.01,100,0.1"), "set_path_max_distance", "get_path_max_distance");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_horizon", PROPERTY_HINT_RANGE, "0.01,100,0.01"), "set_time_horizon", "get_time_horizon");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_speed", PROPERTY_HINT_RANGE, "0.1,10000,0.01"), "set_max_speed", "get_max_speed");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "path_max_distance", PROPERTY_HINT_RANGE, "0.01,100,0.1"), "set_path_max_distance", "get_path_max_distance");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "ignore_y"), "set_ignore_y", "get_ignore_y");
ADD_SIGNAL(MethodInfo("path_changed"));
diff --git a/scene/3d/particles.cpp b/scene/3d/particles.cpp
index 787638053c..e502b0c037 100644
--- a/scene/3d/particles.cpp
+++ b/scene/3d/particles.cpp
@@ -386,12 +386,12 @@ void Particles::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "emitting"), "set_emitting", "is_emitting");
ADD_PROPERTY(PropertyInfo(Variant::INT, "amount", PROPERTY_HINT_EXP_RANGE, "1,1000000,1"), "set_amount", "get_amount");
ADD_GROUP("Time", "");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "lifetime", PROPERTY_HINT_EXP_RANGE, "0.01,600.0,0.01,or_greater"), "set_lifetime", "get_lifetime");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime", PROPERTY_HINT_EXP_RANGE, "0.01,600.0,0.01,or_greater"), "set_lifetime", "get_lifetime");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_shot"), "set_one_shot", "get_one_shot");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "preprocess", PROPERTY_HINT_EXP_RANGE, "0.00,600.0,0.01"), "set_pre_process_time", "get_pre_process_time");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "speed_scale", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_speed_scale", "get_speed_scale");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "explosiveness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_explosiveness_ratio", "get_explosiveness_ratio");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_randomness_ratio", "get_randomness_ratio");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "preprocess", PROPERTY_HINT_EXP_RANGE, "0.00,600.0,0.01"), "set_pre_process_time", "get_pre_process_time");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "speed_scale", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_speed_scale", "get_speed_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "explosiveness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_explosiveness_ratio", "get_explosiveness_ratio");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_randomness_ratio", "get_randomness_ratio");
ADD_PROPERTY(PropertyInfo(Variant::INT, "fixed_fps", PROPERTY_HINT_RANGE, "0,1000,1"), "set_fixed_fps", "get_fixed_fps");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fract_delta"), "set_fractional_delta", "get_fractional_delta");
ADD_GROUP("Drawing", "");
diff --git a/scene/3d/path.cpp b/scene/3d/path.cpp
index 30cba441e0..0cdcbd9a1f 100644
--- a/scene/3d/path.cpp
+++ b/scene/3d/path.cpp
@@ -297,10 +297,10 @@ void PathFollow::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_loop", "loop"), &PathFollow::set_loop);
ClassDB::bind_method(D_METHOD("has_loop"), &PathFollow::has_loop);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "offset", PROPERTY_HINT_RANGE, "0,10000,0.01,or_lesser,or_greater"), "set_offset", "get_offset");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "unit_offset", PROPERTY_HINT_RANGE, "0,1,0.0001,or_lesser,or_greater", PROPERTY_USAGE_EDITOR), "set_unit_offset", "get_unit_offset");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "h_offset"), "set_h_offset", "get_h_offset");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "v_offset"), "set_v_offset", "get_v_offset");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "offset", PROPERTY_HINT_RANGE, "0,10000,0.01,or_lesser,or_greater"), "set_offset", "get_offset");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "unit_offset", PROPERTY_HINT_RANGE, "0,1,0.0001,or_lesser,or_greater", PROPERTY_USAGE_EDITOR), "set_unit_offset", "get_unit_offset");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "h_offset"), "set_h_offset", "get_h_offset");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "v_offset"), "set_v_offset", "get_v_offset");
ADD_PROPERTY(PropertyInfo(Variant::INT, "rotation_mode", PROPERTY_HINT_ENUM, "None,Y,XY,XYZ,Oriented"), "set_rotation_mode", "get_rotation_mode");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "cubic_interp"), "set_cubic_interpolation", "get_cubic_interpolation");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "loop"), "set_loop", "has_loop");
diff --git a/scene/3d/physics_body.cpp b/scene/3d/physics_body.cpp
index 6ffa94eed5..f483787e49 100644
--- a/scene/3d/physics_body.cpp
+++ b/scene/3d/physics_body.cpp
@@ -871,10 +871,10 @@ void RigidBody::_bind_methods() {
BIND_VMETHOD(MethodInfo("_integrate_forces", PropertyInfo(Variant::OBJECT, "state", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsDirectBodyState")));
ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Rigid,Static,Character,Kinematic"), "set_mode", "get_mode");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "mass", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_mass", "get_mass");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "weight", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01", PROPERTY_USAGE_EDITOR), "set_weight", "get_weight");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mass", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_mass", "get_mass");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "weight", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01", PROPERTY_USAGE_EDITOR), "set_weight", "get_weight");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "physics_material_override", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsMaterial"), "set_physics_material_override", "get_physics_material_override");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "gravity_scale", PROPERTY_HINT_RANGE, "-128,128,0.01"), "set_gravity_scale", "get_gravity_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity_scale", PROPERTY_HINT_RANGE, "-128,128,0.01"), "set_gravity_scale", "get_gravity_scale");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "custom_integrator"), "set_use_custom_integrator", "is_using_custom_integrator");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "continuous_cd"), "set_use_continuous_collision_detection", "is_using_continuous_collision_detection");
ADD_PROPERTY(PropertyInfo(Variant::INT, "contacts_reported", PROPERTY_HINT_RANGE, "0,64,1,or_greater"), "set_max_contacts_reported", "get_max_contacts_reported");
@@ -890,10 +890,10 @@ void RigidBody::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "axis_lock_angular_z"), "set_axis_lock", "get_axis_lock", PhysicsServer::BODY_AXIS_ANGULAR_Z);
ADD_GROUP("Linear", "linear_");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "linear_velocity"), "set_linear_velocity", "get_linear_velocity");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "linear_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"), "set_linear_damp", "get_linear_damp");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "linear_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"), "set_linear_damp", "get_linear_damp");
ADD_GROUP("Angular", "angular_");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "angular_velocity"), "set_angular_velocity", "get_angular_velocity");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"), "set_angular_damp", "get_angular_damp");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"), "set_angular_damp", "get_angular_damp");
ADD_SIGNAL(MethodInfo("body_shape_entered", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "local_shape")));
ADD_SIGNAL(MethodInfo("body_shape_exited", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "local_shape")));
@@ -1297,7 +1297,7 @@ void KinematicBody::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "move_lock_y", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_axis_lock", "get_axis_lock", PhysicsServer::BODY_AXIS_LINEAR_Y);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "move_lock_z", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_axis_lock", "get_axis_lock", PhysicsServer::BODY_AXIS_LINEAR_Z);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "collision/safe_margin", PROPERTY_HINT_RANGE, "0.001,256,0.001"), "set_safe_margin", "get_safe_margin");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "collision/safe_margin", PROPERTY_HINT_RANGE, "0.001,256,0.001"), "set_safe_margin", "get_safe_margin");
}
void KinematicBody::_direct_state_changed(Object *p_state) {
@@ -1514,9 +1514,9 @@ bool PhysicalBone::PinJointData::_get(const StringName &p_name, Variant &r_ret)
void PhysicalBone::PinJointData::_get_property_list(List<PropertyInfo> *p_list) const {
JointData::_get_property_list(p_list);
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/bias", PROPERTY_HINT_RANGE, "0.01,0.99,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/damping", PROPERTY_HINT_RANGE, "0.01,8.0,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/impulse_clamp", PROPERTY_HINT_RANGE, "0.0,64.0,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/bias", PROPERTY_HINT_RANGE, "0.01,0.99,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/damping", PROPERTY_HINT_RANGE, "0.01,8.0,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/impulse_clamp", PROPERTY_HINT_RANGE, "0.0,64.0,0.01"));
}
bool PhysicalBone::ConeJointData::_set(const StringName &p_name, const Variant &p_value, RID j) {
@@ -1581,11 +1581,11 @@ bool PhysicalBone::ConeJointData::_get(const StringName &p_name, Variant &r_ret)
void PhysicalBone::ConeJointData::_get_property_list(List<PropertyInfo> *p_list) const {
JointData::_get_property_list(p_list);
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/swing_span", PROPERTY_HINT_RANGE, "-180,180,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/twist_span", PROPERTY_HINT_RANGE, "-40000,40000,0.1,or_lesser,or_greater"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/bias", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/relaxation", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/swing_span", PROPERTY_HINT_RANGE, "-180,180,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/twist_span", PROPERTY_HINT_RANGE, "-40000,40000,0.1,or_lesser,or_greater"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/bias", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/relaxation", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"));
}
bool PhysicalBone::HingeJointData::_set(const StringName &p_name, const Variant &p_value, RID j) {
@@ -1658,11 +1658,11 @@ void PhysicalBone::HingeJointData::_get_property_list(List<PropertyInfo> *p_list
JointData::_get_property_list(p_list);
p_list->push_back(PropertyInfo(Variant::BOOL, "joint_constraints/angular_limit_enabled"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/angular_limit_upper", PROPERTY_HINT_RANGE, "-180,180,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/angular_limit_lower", PROPERTY_HINT_RANGE, "-180,180,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/angular_limit_bias", PROPERTY_HINT_RANGE, "0.01,0.99,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/angular_limit_softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/angular_limit_relaxation", PROPERTY_HINT_RANGE, "0.01,16,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_upper", PROPERTY_HINT_RANGE, "-180,180,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_lower", PROPERTY_HINT_RANGE, "-180,180,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_bias", PROPERTY_HINT_RANGE, "0.01,0.99,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_relaxation", PROPERTY_HINT_RANGE, "0.01,16,0.01"));
}
bool PhysicalBone::SliderJointData::_set(const StringName &p_name, const Variant &p_value, RID j) {
@@ -1762,17 +1762,17 @@ bool PhysicalBone::SliderJointData::_get(const StringName &p_name, Variant &r_re
void PhysicalBone::SliderJointData::_get_property_list(List<PropertyInfo> *p_list) const {
JointData::_get_property_list(p_list);
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/linear_limit_upper"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/linear_limit_lower"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/linear_limit_softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/linear_limit_restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/linear_limit_damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/linear_limit_upper"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/linear_limit_lower"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/linear_limit_softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/linear_limit_restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/linear_limit_damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/angular_limit_upper", PROPERTY_HINT_RANGE, "-180,180,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/angular_limit_lower", PROPERTY_HINT_RANGE, "-180,180,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/angular_limit_softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/angular_limit_restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/angular_limit_damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_upper", PROPERTY_HINT_RANGE, "-180,180,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_lower", PROPERTY_HINT_RANGE, "-180,180,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/angular_limit_damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"));
}
bool PhysicalBone::SixDOFJointData::_set(const StringName &p_name, const Variant &p_value, RID j) {
@@ -1986,26 +1986,26 @@ void PhysicalBone::SixDOFJointData::_get_property_list(List<PropertyInfo> *p_lis
const StringName axis_names[] = { "x", "y", "z" };
for (int i = 0; i < 3; ++i) {
p_list->push_back(PropertyInfo(Variant::BOOL, "joint_constraints/" + axis_names[i] + "/linear_limit_enabled"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/linear_limit_upper"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/linear_limit_lower"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/linear_limit_softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/linear_limit_upper"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/linear_limit_lower"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/linear_limit_softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"));
p_list->push_back(PropertyInfo(Variant::BOOL, "joint_constraints/" + axis_names[i] + "/linear_spring_enabled"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/linear_spring_stiffness"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/linear_spring_damping"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/linear_equilibrium_point"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/linear_restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/linear_damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/linear_spring_stiffness"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/linear_spring_damping"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/linear_equilibrium_point"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/linear_restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/linear_damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"));
p_list->push_back(PropertyInfo(Variant::BOOL, "joint_constraints/" + axis_names[i] + "/angular_limit_enabled"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/angular_limit_upper", PROPERTY_HINT_RANGE, "-180,180,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/angular_limit_lower", PROPERTY_HINT_RANGE, "-180,180,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/angular_limit_softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/angular_restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/angular_damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/erp"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/angular_limit_upper", PROPERTY_HINT_RANGE, "-180,180,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/angular_limit_lower", PROPERTY_HINT_RANGE, "-180,180,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/angular_limit_softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/angular_restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/angular_damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/erp"));
p_list->push_back(PropertyInfo(Variant::BOOL, "joint_constraints/" + axis_names[i] + "/angular_spring_enabled"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/angular_spring_stiffness"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/angular_spring_damping"));
- p_list->push_back(PropertyInfo(Variant::REAL, "joint_constraints/" + axis_names[i] + "/angular_equilibrium_point"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/angular_spring_stiffness"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/angular_spring_damping"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "joint_constraints/" + axis_names[i] + "/angular_equilibrium_point"));
}
}
@@ -2169,11 +2169,11 @@ void PhysicalBone::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM, "body_offset"), "set_body_offset", "get_body_offset");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "mass", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_mass", "get_mass");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "weight", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_weight", "get_weight");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "friction", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_friction", "get_friction");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "bounce", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_bounce", "get_bounce");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "gravity_scale", PROPERTY_HINT_RANGE, "-10,10,0.01"), "set_gravity_scale", "get_gravity_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mass", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_mass", "get_mass");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "weight", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_weight", "get_weight");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "friction", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_friction", "get_friction");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bounce", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_bounce", "get_bounce");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity_scale", PROPERTY_HINT_RANGE, "-10,10,0.01"), "set_gravity_scale", "get_gravity_scale");
BIND_ENUM_CONSTANT(JOINT_TYPE_NONE);
BIND_ENUM_CONSTANT(JOINT_TYPE_PIN);
diff --git a/scene/3d/physics_joint.cpp b/scene/3d/physics_joint.cpp
index eacc6bcc0f..0699e366e0 100644
--- a/scene/3d/physics_joint.cpp
+++ b/scene/3d/physics_joint.cpp
@@ -172,9 +172,9 @@ void PinJoint::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_param", "param", "value"), &PinJoint::set_param);
ClassDB::bind_method(D_METHOD("get_param", "param"), &PinJoint::get_param);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "params/bias", PROPERTY_HINT_RANGE, "0.01,0.99,0.01"), "set_param", "get_param", PARAM_BIAS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "params/damping", PROPERTY_HINT_RANGE, "0.01,8.0,0.01"), "set_param", "get_param", PARAM_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "params/impulse_clamp", PROPERTY_HINT_RANGE, "0.0,64.0,0.01"), "set_param", "get_param", PARAM_IMPULSE_CLAMP);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "params/bias", PROPERTY_HINT_RANGE, "0.01,0.99,0.01"), "set_param", "get_param", PARAM_BIAS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "params/damping", PROPERTY_HINT_RANGE, "0.01,8.0,0.01"), "set_param", "get_param", PARAM_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "params/impulse_clamp", PROPERTY_HINT_RANGE, "0.0,64.0,0.01"), "set_param", "get_param", PARAM_IMPULSE_CLAMP);
BIND_ENUM_CONSTANT(PARAM_BIAS);
BIND_ENUM_CONSTANT(PARAM_DAMPING);
@@ -257,18 +257,18 @@ void HingeJoint::_bind_methods() {
ClassDB::bind_method(D_METHOD("_set_lower_limit", "lower_limit"), &HingeJoint::_set_lower_limit);
ClassDB::bind_method(D_METHOD("_get_lower_limit"), &HingeJoint::_get_lower_limit);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "params/bias", PROPERTY_HINT_RANGE, "0.00,0.99,0.01"), "set_param", "get_param", PARAM_BIAS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "params/bias", PROPERTY_HINT_RANGE, "0.00,0.99,0.01"), "set_param", "get_param", PARAM_BIAS);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_limit/enable"), "set_flag", "get_flag", FLAG_USE_LIMIT);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_limit/upper", PROPERTY_HINT_RANGE, "-180,180,0.1"), "_set_upper_limit", "_get_upper_limit");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_limit/lower", PROPERTY_HINT_RANGE, "-180,180,0.1"), "_set_lower_limit", "_get_lower_limit");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit/bias", PROPERTY_HINT_RANGE, "0.01,0.99,0.01"), "set_param", "get_param", PARAM_LIMIT_BIAS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param", "get_param", PARAM_LIMIT_SOFTNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit/relaxation", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param", "get_param", PARAM_LIMIT_RELAXATION);
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_limit/upper", PROPERTY_HINT_RANGE, "-180,180,0.1"), "_set_upper_limit", "_get_upper_limit");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_limit/lower", PROPERTY_HINT_RANGE, "-180,180,0.1"), "_set_lower_limit", "_get_lower_limit");
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit/bias", PROPERTY_HINT_RANGE, "0.01,0.99,0.01"), "set_param", "get_param", PARAM_LIMIT_BIAS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param", "get_param", PARAM_LIMIT_SOFTNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit/relaxation", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param", "get_param", PARAM_LIMIT_RELAXATION);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "motor/enable"), "set_flag", "get_flag", FLAG_ENABLE_MOTOR);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "motor/target_velocity", PROPERTY_HINT_RANGE, "-200,200,0.01,or_greater,or_lesser"), "set_param", "get_param", PARAM_MOTOR_TARGET_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "motor/max_impulse", PROPERTY_HINT_RANGE, "0.01,1024,0.01"), "set_param", "get_param", PARAM_MOTOR_MAX_IMPULSE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "motor/target_velocity", PROPERTY_HINT_RANGE, "-200,200,0.01,or_greater,or_lesser"), "set_param", "get_param", PARAM_MOTOR_TARGET_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "motor/max_impulse", PROPERTY_HINT_RANGE, "0.01,1024,0.01"), "set_param", "get_param", PARAM_MOTOR_MAX_IMPULSE);
BIND_ENUM_CONSTANT(PARAM_BIAS);
BIND_ENUM_CONSTANT(PARAM_LIMIT_UPPER);
@@ -392,29 +392,29 @@ void SliderJoint::_bind_methods() {
ClassDB::bind_method(D_METHOD("_set_lower_limit_angular", "lower_limit_angular"), &SliderJoint::_set_lower_limit_angular);
ClassDB::bind_method(D_METHOD("_get_lower_limit_angular"), &SliderJoint::_get_lower_limit_angular);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit/upper_distance", PROPERTY_HINT_RANGE, "-1024,1024,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_UPPER);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit/lower_distance", PROPERTY_HINT_RANGE, "-1024,1024,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_LOWER);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_SOFTNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_RESTITUTION);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_motion/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_MOTION_SOFTNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_motion/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_MOTION_RESTITUTION);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_motion/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_MOTION_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_ortho/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_ORTHOGONAL_SOFTNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_ortho/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_ORTHOGONAL_RESTITUTION);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_ortho/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_ORTHOGONAL_DAMPING);
-
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_limit/upper_angle", PROPERTY_HINT_RANGE, "-180,180,0.1"), "_set_upper_limit_angular", "_get_upper_limit_angular");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_limit/lower_angle", PROPERTY_HINT_RANGE, "-180,180,0.1"), "_set_lower_limit_angular", "_get_lower_limit_angular");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_LIMIT_SOFTNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_LIMIT_RESTITUTION);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_LIMIT_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_motion/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_MOTION_SOFTNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_motion/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_MOTION_RESTITUTION);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_motion/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_MOTION_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_ortho/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_ORTHOGONAL_SOFTNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_ortho/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_ORTHOGONAL_RESTITUTION);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_ortho/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_ORTHOGONAL_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit/upper_distance", PROPERTY_HINT_RANGE, "-1024,1024,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_UPPER);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit/lower_distance", PROPERTY_HINT_RANGE, "-1024,1024,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_LOWER);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_SOFTNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_RESTITUTION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motion/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_MOTION_SOFTNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motion/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_MOTION_RESTITUTION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motion/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_MOTION_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_ortho/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_ORTHOGONAL_SOFTNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_ortho/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_ORTHOGONAL_RESTITUTION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_ortho/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_ORTHOGONAL_DAMPING);
+
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_limit/upper_angle", PROPERTY_HINT_RANGE, "-180,180,0.1"), "_set_upper_limit_angular", "_get_upper_limit_angular");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_limit/lower_angle", PROPERTY_HINT_RANGE, "-180,180,0.1"), "_set_lower_limit_angular", "_get_lower_limit_angular");
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_LIMIT_SOFTNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_LIMIT_RESTITUTION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_LIMIT_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motion/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_MOTION_SOFTNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motion/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_MOTION_RESTITUTION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motion/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_MOTION_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_ortho/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_ORTHOGONAL_SOFTNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_ortho/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_ORTHOGONAL_RESTITUTION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_ortho/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_ORTHOGONAL_DAMPING);
BIND_ENUM_CONSTANT(PARAM_LINEAR_LIMIT_UPPER);
BIND_ENUM_CONSTANT(PARAM_LINEAR_LIMIT_LOWER);
@@ -541,12 +541,12 @@ void ConeTwistJoint::_bind_methods() {
ClassDB::bind_method(D_METHOD("_set_twist_span", "twist_span"), &ConeTwistJoint::_set_twist_span);
ClassDB::bind_method(D_METHOD("_get_twist_span"), &ConeTwistJoint::_get_twist_span);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "swing_span", PROPERTY_HINT_RANGE, "-180,180,0.1"), "_set_swing_span", "_get_swing_span");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "twist_span", PROPERTY_HINT_RANGE, "-40000,40000,0.1"), "_set_twist_span", "_get_twist_span");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "swing_span", PROPERTY_HINT_RANGE, "-180,180,0.1"), "_set_swing_span", "_get_swing_span");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "twist_span", PROPERTY_HINT_RANGE, "-40000,40000,0.1"), "_set_twist_span", "_get_twist_span");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "bias", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_BIAS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_SOFTNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "relaxation", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_RELAXATION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "bias", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_BIAS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_SOFTNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "relaxation", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_RELAXATION);
BIND_ENUM_CONSTANT(PARAM_SWING_SPAN);
BIND_ENUM_CONSTANT(PARAM_TWIST_SPAN);
@@ -711,92 +711,92 @@ void Generic6DOFJoint::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_precision"), &Generic6DOFJoint::get_precision);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_limit_x/enabled"), "set_flag_x", "get_flag_x", FLAG_ENABLE_LINEAR_LIMIT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_x/upper_distance"), "set_param_x", "get_param_x", PARAM_LINEAR_UPPER_LIMIT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_x/lower_distance"), "set_param_x", "get_param_x", PARAM_LINEAR_LOWER_LIMIT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_x/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_LINEAR_LIMIT_SOFTNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_x/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_LINEAR_RESTITUTION);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_x/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_LINEAR_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_x/upper_distance"), "set_param_x", "get_param_x", PARAM_LINEAR_UPPER_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_x/lower_distance"), "set_param_x", "get_param_x", PARAM_LINEAR_LOWER_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_x/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_LINEAR_LIMIT_SOFTNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_x/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_LINEAR_RESTITUTION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_x/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_LINEAR_DAMPING);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_motor_x/enabled"), "set_flag_x", "get_flag_x", FLAG_ENABLE_LINEAR_MOTOR);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_motor_x/target_velocity"), "set_param_x", "get_param_x", PARAM_LINEAR_MOTOR_TARGET_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_motor_x/force_limit"), "set_param_x", "get_param_x", PARAM_LINEAR_MOTOR_FORCE_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motor_x/target_velocity"), "set_param_x", "get_param_x", PARAM_LINEAR_MOTOR_TARGET_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motor_x/force_limit"), "set_param_x", "get_param_x", PARAM_LINEAR_MOTOR_FORCE_LIMIT);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_spring_x/enabled"), "set_flag_x", "get_flag_x", FLAG_ENABLE_LINEAR_SPRING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_spring_x/stiffness"), "set_param_x", "get_param_x", PARAM_LINEAR_SPRING_STIFFNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_spring_x/damping"), "set_param_x", "get_param_x", PARAM_LINEAR_SPRING_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_spring_x/equilibrium_point"), "set_param_x", "get_param_x", PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_x/stiffness"), "set_param_x", "get_param_x", PARAM_LINEAR_SPRING_STIFFNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_x/damping"), "set_param_x", "get_param_x", PARAM_LINEAR_SPRING_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_x/equilibrium_point"), "set_param_x", "get_param_x", PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_limit_x/enabled"), "set_flag_x", "get_flag_x", FLAG_ENABLE_ANGULAR_LIMIT);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_limit_x/upper_angle", PROPERTY_HINT_RANGE, "-180,180,0.01"), "_set_angular_hi_limit_x", "_get_angular_hi_limit_x");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_limit_x/lower_angle", PROPERTY_HINT_RANGE, "-180,180,0.01"), "_set_angular_lo_limit_x", "_get_angular_lo_limit_x");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_x/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_ANGULAR_LIMIT_SOFTNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_x/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_ANGULAR_RESTITUTION);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_x/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_ANGULAR_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_x/force_limit"), "set_param_x", "get_param_x", PARAM_ANGULAR_FORCE_LIMIT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_x/erp"), "set_param_x", "get_param_x", PARAM_ANGULAR_ERP);
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_limit_x/upper_angle", PROPERTY_HINT_RANGE, "-180,180,0.01"), "_set_angular_hi_limit_x", "_get_angular_hi_limit_x");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_limit_x/lower_angle", PROPERTY_HINT_RANGE, "-180,180,0.01"), "_set_angular_lo_limit_x", "_get_angular_lo_limit_x");
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_x/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_ANGULAR_LIMIT_SOFTNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_x/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_ANGULAR_RESTITUTION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_x/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_ANGULAR_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_x/force_limit"), "set_param_x", "get_param_x", PARAM_ANGULAR_FORCE_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_x/erp"), "set_param_x", "get_param_x", PARAM_ANGULAR_ERP);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_motor_x/enabled"), "set_flag_x", "get_flag_x", FLAG_ENABLE_MOTOR);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_motor_x/target_velocity"), "set_param_x", "get_param_x", PARAM_ANGULAR_MOTOR_TARGET_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_motor_x/force_limit"), "set_param_x", "get_param_x", PARAM_ANGULAR_MOTOR_FORCE_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motor_x/target_velocity"), "set_param_x", "get_param_x", PARAM_ANGULAR_MOTOR_TARGET_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motor_x/force_limit"), "set_param_x", "get_param_x", PARAM_ANGULAR_MOTOR_FORCE_LIMIT);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_spring_x/enabled"), "set_flag_x", "get_flag_x", FLAG_ENABLE_ANGULAR_SPRING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_spring_x/stiffness"), "set_param_x", "get_param_x", PARAM_ANGULAR_SPRING_STIFFNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_spring_x/damping"), "set_param_x", "get_param_x", PARAM_ANGULAR_SPRING_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_spring_x/equilibrium_point"), "set_param_x", "get_param_x", PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_x/stiffness"), "set_param_x", "get_param_x", PARAM_ANGULAR_SPRING_STIFFNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_x/damping"), "set_param_x", "get_param_x", PARAM_ANGULAR_SPRING_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_x/equilibrium_point"), "set_param_x", "get_param_x", PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_limit_y/enabled"), "set_flag_y", "get_flag_y", FLAG_ENABLE_LINEAR_LIMIT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_y/upper_distance"), "set_param_y", "get_param_y", PARAM_LINEAR_UPPER_LIMIT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_y/lower_distance"), "set_param_y", "get_param_y", PARAM_LINEAR_LOWER_LIMIT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_y/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_LINEAR_LIMIT_SOFTNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_y/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_LINEAR_RESTITUTION);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_y/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_LINEAR_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_y/upper_distance"), "set_param_y", "get_param_y", PARAM_LINEAR_UPPER_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_y/lower_distance"), "set_param_y", "get_param_y", PARAM_LINEAR_LOWER_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_y/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_LINEAR_LIMIT_SOFTNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_y/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_LINEAR_RESTITUTION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_y/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_LINEAR_DAMPING);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_motor_y/enabled"), "set_flag_y", "get_flag_y", FLAG_ENABLE_LINEAR_MOTOR);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_motor_y/target_velocity"), "set_param_y", "get_param_y", PARAM_LINEAR_MOTOR_TARGET_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_motor_y/force_limit"), "set_param_y", "get_param_y", PARAM_LINEAR_MOTOR_FORCE_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motor_y/target_velocity"), "set_param_y", "get_param_y", PARAM_LINEAR_MOTOR_TARGET_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motor_y/force_limit"), "set_param_y", "get_param_y", PARAM_LINEAR_MOTOR_FORCE_LIMIT);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_spring_y/enabled"), "set_flag_y", "get_flag_y", FLAG_ENABLE_LINEAR_SPRING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_spring_y/stiffness"), "set_param_y", "get_param_y", PARAM_LINEAR_SPRING_STIFFNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_spring_y/damping"), "set_param_y", "get_param_y", PARAM_LINEAR_SPRING_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_spring_y/equilibrium_point"), "set_param_y", "get_param_y", PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_y/stiffness"), "set_param_y", "get_param_y", PARAM_LINEAR_SPRING_STIFFNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_y/damping"), "set_param_y", "get_param_y", PARAM_LINEAR_SPRING_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_y/equilibrium_point"), "set_param_y", "get_param_y", PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_limit_y/enabled"), "set_flag_y", "get_flag_y", FLAG_ENABLE_ANGULAR_LIMIT);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_limit_y/upper_angle", PROPERTY_HINT_RANGE, "-180,180,0.01"), "_set_angular_hi_limit_y", "_get_angular_hi_limit_y");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_limit_y/lower_angle", PROPERTY_HINT_RANGE, "-180,180,0.01"), "_set_angular_lo_limit_y", "_get_angular_lo_limit_y");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_y/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_ANGULAR_LIMIT_SOFTNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_y/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_ANGULAR_RESTITUTION);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_y/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_ANGULAR_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_y/force_limit"), "set_param_y", "get_param_y", PARAM_ANGULAR_FORCE_LIMIT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_y/erp"), "set_param_y", "get_param_y", PARAM_ANGULAR_ERP);
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_limit_y/upper_angle", PROPERTY_HINT_RANGE, "-180,180,0.01"), "_set_angular_hi_limit_y", "_get_angular_hi_limit_y");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_limit_y/lower_angle", PROPERTY_HINT_RANGE, "-180,180,0.01"), "_set_angular_lo_limit_y", "_get_angular_lo_limit_y");
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_y/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_ANGULAR_LIMIT_SOFTNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_y/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_ANGULAR_RESTITUTION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_y/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_ANGULAR_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_y/force_limit"), "set_param_y", "get_param_y", PARAM_ANGULAR_FORCE_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_y/erp"), "set_param_y", "get_param_y", PARAM_ANGULAR_ERP);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_motor_y/enabled"), "set_flag_y", "get_flag_y", FLAG_ENABLE_MOTOR);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_motor_y/target_velocity"), "set_param_y", "get_param_y", PARAM_ANGULAR_MOTOR_TARGET_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_motor_y/force_limit"), "set_param_y", "get_param_y", PARAM_ANGULAR_MOTOR_FORCE_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motor_y/target_velocity"), "set_param_y", "get_param_y", PARAM_ANGULAR_MOTOR_TARGET_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motor_y/force_limit"), "set_param_y", "get_param_y", PARAM_ANGULAR_MOTOR_FORCE_LIMIT);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_spring_y/enabled"), "set_flag_y", "get_flag_y", FLAG_ENABLE_ANGULAR_SPRING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_spring_y/stiffness"), "set_param_y", "get_param_y", PARAM_ANGULAR_SPRING_STIFFNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_spring_y/damping"), "set_param_y", "get_param_y", PARAM_ANGULAR_SPRING_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_spring_y/equilibrium_point"), "set_param_y", "get_param_y", PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_y/stiffness"), "set_param_y", "get_param_y", PARAM_ANGULAR_SPRING_STIFFNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_y/damping"), "set_param_y", "get_param_y", PARAM_ANGULAR_SPRING_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_y/equilibrium_point"), "set_param_y", "get_param_y", PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_limit_z/enabled"), "set_flag_z", "get_flag_z", FLAG_ENABLE_LINEAR_LIMIT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_z/upper_distance"), "set_param_z", "get_param_z", PARAM_LINEAR_UPPER_LIMIT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_z/lower_distance"), "set_param_z", "get_param_z", PARAM_LINEAR_LOWER_LIMIT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_z/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_LINEAR_LIMIT_SOFTNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_z/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_LINEAR_RESTITUTION);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_limit_z/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_LINEAR_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_z/upper_distance"), "set_param_z", "get_param_z", PARAM_LINEAR_UPPER_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_z/lower_distance"), "set_param_z", "get_param_z", PARAM_LINEAR_LOWER_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_z/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_LINEAR_LIMIT_SOFTNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_z/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_LINEAR_RESTITUTION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_z/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_LINEAR_DAMPING);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_motor_z/enabled"), "set_flag_z", "get_flag_z", FLAG_ENABLE_LINEAR_MOTOR);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_motor_z/target_velocity"), "set_param_z", "get_param_z", PARAM_LINEAR_MOTOR_TARGET_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_motor_z/force_limit"), "set_param_z", "get_param_z", PARAM_LINEAR_MOTOR_FORCE_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motor_z/target_velocity"), "set_param_z", "get_param_z", PARAM_LINEAR_MOTOR_TARGET_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motor_z/force_limit"), "set_param_z", "get_param_z", PARAM_LINEAR_MOTOR_FORCE_LIMIT);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_spring_z/enabled"), "set_flag_z", "get_flag_z", FLAG_ENABLE_LINEAR_SPRING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_spring_z/stiffness"), "set_param_z", "get_param_z", PARAM_LINEAR_SPRING_STIFFNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_spring_z/damping"), "set_param_z", "get_param_z", PARAM_LINEAR_SPRING_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_spring_z/equilibrium_point"), "set_param_z", "get_param_z", PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_z/stiffness"), "set_param_z", "get_param_z", PARAM_LINEAR_SPRING_STIFFNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_z/damping"), "set_param_z", "get_param_z", PARAM_LINEAR_SPRING_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_z/equilibrium_point"), "set_param_z", "get_param_z", PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_limit_z/enabled"), "set_flag_z", "get_flag_z", FLAG_ENABLE_ANGULAR_LIMIT);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_limit_z/upper_angle", PROPERTY_HINT_RANGE, "-180,180,0.01"), "_set_angular_hi_limit_z", "_get_angular_hi_limit_z");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_limit_z/lower_angle", PROPERTY_HINT_RANGE, "-180,180,0.01"), "_set_angular_lo_limit_z", "_get_angular_lo_limit_z");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_z/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_ANGULAR_LIMIT_SOFTNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_z/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_ANGULAR_RESTITUTION);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_z/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_ANGULAR_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_z/force_limit"), "set_param_z", "get_param_z", PARAM_ANGULAR_FORCE_LIMIT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_limit_z/erp"), "set_param_z", "get_param_z", PARAM_ANGULAR_ERP);
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_limit_z/upper_angle", PROPERTY_HINT_RANGE, "-180,180,0.01"), "_set_angular_hi_limit_z", "_get_angular_hi_limit_z");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_limit_z/lower_angle", PROPERTY_HINT_RANGE, "-180,180,0.01"), "_set_angular_lo_limit_z", "_get_angular_lo_limit_z");
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_z/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_ANGULAR_LIMIT_SOFTNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_z/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_ANGULAR_RESTITUTION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_z/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_ANGULAR_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_z/force_limit"), "set_param_z", "get_param_z", PARAM_ANGULAR_FORCE_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_z/erp"), "set_param_z", "get_param_z", PARAM_ANGULAR_ERP);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_motor_z/enabled"), "set_flag_z", "get_flag_z", FLAG_ENABLE_MOTOR);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_motor_z/target_velocity"), "set_param_z", "get_param_z", PARAM_ANGULAR_MOTOR_TARGET_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_motor_z/force_limit"), "set_param_z", "get_param_z", PARAM_ANGULAR_MOTOR_FORCE_LIMIT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motor_z/target_velocity"), "set_param_z", "get_param_z", PARAM_ANGULAR_MOTOR_TARGET_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motor_z/force_limit"), "set_param_z", "get_param_z", PARAM_ANGULAR_MOTOR_FORCE_LIMIT);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_spring_z/enabled"), "set_flag_z", "get_flag_z", FLAG_ENABLE_ANGULAR_SPRING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_spring_z/stiffness"), "set_param_z", "get_param_z", PARAM_ANGULAR_SPRING_STIFFNESS);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_spring_z/damping"), "set_param_z", "get_param_z", PARAM_ANGULAR_SPRING_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_spring_z/equilibrium_point"), "set_param_z", "get_param_z", PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_z/stiffness"), "set_param_z", "get_param_z", PARAM_ANGULAR_SPRING_STIFFNESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_z/damping"), "set_param_z", "get_param_z", PARAM_ANGULAR_SPRING_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_z/equilibrium_point"), "set_param_z", "get_param_z", PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT);
ADD_PROPERTY(PropertyInfo(Variant::INT, "precision", PROPERTY_HINT_RANGE, "1,99999,1"), "set_precision", "get_precision");
diff --git a/scene/3d/reflection_probe.cpp b/scene/3d/reflection_probe.cpp
index 0c44f21e76..3cf8e43ec2 100644
--- a/scene/3d/reflection_probe.cpp
+++ b/scene/3d/reflection_probe.cpp
@@ -239,8 +239,8 @@ void ReflectionProbe::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_update_mode"), &ReflectionProbe::get_update_mode);
ADD_PROPERTY(PropertyInfo(Variant::INT, "update_mode", PROPERTY_HINT_ENUM, "Once,Always"), "set_update_mode", "get_update_mode");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "intensity", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_intensity", "get_intensity");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_distance", PROPERTY_HINT_EXP_RANGE, "0,16384,0.1,or_greater"), "set_max_distance", "get_max_distance");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "intensity", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_intensity", "get_intensity");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_distance", PROPERTY_HINT_EXP_RANGE, "0,16384,0.1,or_greater"), "set_max_distance", "get_max_distance");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "extents"), "set_extents", "get_extents");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "origin_offset"), "set_origin_offset", "get_origin_offset");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "box_projection"), "set_enable_box_projection", "is_box_projection_enabled");
@@ -250,8 +250,8 @@ void ReflectionProbe::_bind_methods() {
ADD_GROUP("Interior", "interior_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "interior_enable"), "set_as_interior", "is_set_as_interior");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "interior_ambient_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_interior_ambient", "get_interior_ambient");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "interior_ambient_energy", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_interior_ambient_energy", "get_interior_ambient_energy");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "interior_ambient_contrib", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_interior_ambient_probe_contribution", "get_interior_ambient_probe_contribution");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "interior_ambient_energy", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_interior_ambient_energy", "get_interior_ambient_energy");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "interior_ambient_contrib", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_interior_ambient_probe_contribution", "get_interior_ambient_probe_contribution");
BIND_ENUM_CONSTANT(UPDATE_ONCE);
BIND_ENUM_CONSTANT(UPDATE_ALWAYS);
diff --git a/scene/3d/soft_body.cpp b/scene/3d/soft_body.cpp
index 957e7df179..14b1c24fa3 100644
--- a/scene/3d/soft_body.cpp
+++ b/scene/3d/soft_body.cpp
@@ -174,7 +174,7 @@ void SoftBody::_get_property_list(List<PropertyInfo> *p_list) const {
const int pinned_points_indices_size = pinned_points.size();
- p_list->push_back(PropertyInfo(Variant::PACKED_INT_ARRAY, "pinned_points"));
+ p_list->push_back(PropertyInfo(Variant::PACKED_INT32_ARRAY, "pinned_points"));
for (int i = 0; i < pinned_points_indices_size; ++i) {
p_list->push_back(PropertyInfo(Variant::INT, "attachments/" + itos(i) + "/point_index"));
@@ -376,14 +376,14 @@ void SoftBody::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "parent_collision_ignore", PROPERTY_HINT_PROPERTY_OF_VARIANT_TYPE, "Parent collision object"), "set_parent_collision_ignore", "get_parent_collision_ignore");
ADD_PROPERTY(PropertyInfo(Variant::INT, "simulation_precision", PROPERTY_HINT_RANGE, "1,100,1"), "set_simulation_precision", "get_simulation_precision");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "total_mass", PROPERTY_HINT_RANGE, "0.01,10000,1"), "set_total_mass", "get_total_mass");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "linear_stiffness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_linear_stiffness", "get_linear_stiffness");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "areaAngular_stiffness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_areaAngular_stiffness", "get_areaAngular_stiffness");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "volume_stiffness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_volume_stiffness", "get_volume_stiffness");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "pressure_coefficient"), "set_pressure_coefficient", "get_pressure_coefficient");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "damping_coefficient", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_damping_coefficient", "get_damping_coefficient");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "drag_coefficient", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drag_coefficient", "get_drag_coefficient");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "pose_matching_coefficient", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_pose_matching_coefficient", "get_pose_matching_coefficient");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "total_mass", PROPERTY_HINT_RANGE, "0.01,10000,1"), "set_total_mass", "get_total_mass");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "linear_stiffness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_linear_stiffness", "get_linear_stiffness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "areaAngular_stiffness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_areaAngular_stiffness", "get_areaAngular_stiffness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "volume_stiffness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_volume_stiffness", "get_volume_stiffness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pressure_coefficient"), "set_pressure_coefficient", "get_pressure_coefficient");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "damping_coefficient", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_damping_coefficient", "get_damping_coefficient");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "drag_coefficient", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drag_coefficient", "get_drag_coefficient");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pose_matching_coefficient", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_pose_matching_coefficient", "get_pose_matching_coefficient");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "ray_pickable"), "set_ray_pickable", "is_ray_pickable");
}
diff --git a/scene/3d/spring_arm.cpp b/scene/3d/spring_arm.cpp
index bce0535d64..ce277dae5b 100644
--- a/scene/3d/spring_arm.cpp
+++ b/scene/3d/spring_arm.cpp
@@ -81,8 +81,8 @@ void SpringArm::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_mask", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_collision_mask", "get_collision_mask");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "shape", PROPERTY_HINT_RESOURCE_TYPE, "Shape"), "set_shape", "get_shape");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "spring_length"), "set_length", "get_length");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "margin"), "set_margin", "get_margin");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "spring_length"), "set_length", "get_length");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "margin"), "set_margin", "get_margin");
}
float SpringArm::get_length() const {
diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp
index 169ba78aca..0aa404de7d 100644
--- a/scene/3d/sprite_3d.cpp
+++ b/scene/3d/sprite_3d.cpp
@@ -342,8 +342,8 @@ void SpriteBase3D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "flip_h"), "set_flip_h", "is_flipped_h");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "flip_v"), "set_flip_v", "is_flipped_v");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "modulate"), "set_modulate", "get_modulate");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "opacity", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_opacity", "get_opacity");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "pixel_size", PROPERTY_HINT_RANGE, "0.0001,128,0.0001"), "set_pixel_size", "get_pixel_size");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "opacity", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_opacity", "get_opacity");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pixel_size", PROPERTY_HINT_RANGE, "0.0001,128,0.0001"), "set_pixel_size", "get_pixel_size");
ADD_PROPERTY(PropertyInfo(Variant::INT, "axis", PROPERTY_HINT_ENUM, "X-Axis,Y-Axis,Z-Axis"), "set_axis", "get_axis");
ADD_GROUP("Flags", "");
ADD_PROPERTY(PropertyInfo(Variant::INT, "billboard", PROPERTY_HINT_ENUM, "Disabled,Enabled,Y-Billboard"), "set_billboard_mode", "get_billboard_mode");
diff --git a/scene/3d/vehicle_body.cpp b/scene/3d/vehicle_body.cpp
index 52e50aa84e..c249d844d1 100644
--- a/scene/3d/vehicle_body.cpp
+++ b/scene/3d/vehicle_body.cpp
@@ -282,24 +282,24 @@ void VehicleWheel::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_steering"), &VehicleWheel::get_steering);
ADD_GROUP("Per-Wheel Motion", "");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "engine_force", PROPERTY_HINT_RANGE, "0.00,1024.0,0.01,or_greater"), "set_engine_force", "get_engine_force");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "brake", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_brake", "get_brake");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "steering", PROPERTY_HINT_RANGE, "-180,180.0,0.01"), "set_steering", "get_steering");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "engine_force", PROPERTY_HINT_RANGE, "0.00,1024.0,0.01,or_greater"), "set_engine_force", "get_engine_force");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "brake", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_brake", "get_brake");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "steering", PROPERTY_HINT_RANGE, "-180,180.0,0.01"), "set_steering", "get_steering");
ADD_GROUP("VehicleBody Motion", "");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_as_traction"), "set_use_as_traction", "is_used_as_traction");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_as_steering"), "set_use_as_steering", "is_used_as_steering");
ADD_GROUP("Wheel", "wheel_");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "wheel_roll_influence"), "set_roll_influence", "get_roll_influence");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "wheel_radius"), "set_radius", "get_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "wheel_rest_length"), "set_suspension_rest_length", "get_suspension_rest_length");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "wheel_friction_slip"), "set_friction_slip", "get_friction_slip");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wheel_roll_influence"), "set_roll_influence", "get_roll_influence");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wheel_radius"), "set_radius", "get_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wheel_rest_length"), "set_suspension_rest_length", "get_suspension_rest_length");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wheel_friction_slip"), "set_friction_slip", "get_friction_slip");
ADD_GROUP("Suspension", "suspension_");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "suspension_travel"), "set_suspension_travel", "get_suspension_travel");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "suspension_stiffness"), "set_suspension_stiffness", "get_suspension_stiffness");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "suspension_max_force"), "set_suspension_max_force", "get_suspension_max_force");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "suspension_travel"), "set_suspension_travel", "get_suspension_travel");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "suspension_stiffness"), "set_suspension_stiffness", "get_suspension_stiffness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "suspension_max_force"), "set_suspension_max_force", "get_suspension_max_force");
ADD_GROUP("Damping", "damping_");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "damping_compression"), "set_damping_compression", "get_damping_compression");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "damping_relaxation"), "set_damping_relaxation", "get_damping_relaxation");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "damping_compression"), "set_damping_compression", "get_damping_compression");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "damping_relaxation"), "set_damping_relaxation", "get_damping_relaxation");
}
void VehicleWheel::set_engine_force(float p_engine_force) {
@@ -974,9 +974,9 @@ void VehicleBody::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_steering"), &VehicleBody::get_steering);
ADD_GROUP("Motion", "");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "engine_force", PROPERTY_HINT_RANGE, "0.00,1024.0,0.01,or_greater"), "set_engine_force", "get_engine_force");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "brake", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_brake", "get_brake");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "steering", PROPERTY_HINT_RANGE, "-180,180.0,0.01"), "set_steering", "get_steering");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "engine_force", PROPERTY_HINT_RANGE, "0.00,1024.0,0.01,or_greater"), "set_engine_force", "get_engine_force");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "brake", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_brake", "get_brake");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "steering", PROPERTY_HINT_RANGE, "-180,180.0,0.01"), "set_steering", "get_steering");
}
VehicleBody::VehicleBody() {
diff --git a/scene/3d/visual_instance.cpp b/scene/3d/visual_instance.cpp
index 5a332fe0f9..73cffe9c89 100644
--- a/scene/3d/visual_instance.cpp
+++ b/scene/3d/visual_instance.cpp
@@ -296,7 +296,7 @@ void GeometryInstance::_bind_methods() {
ADD_GROUP("Geometry", "");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "material_override", PROPERTY_HINT_RESOURCE_TYPE, "ShaderMaterial,StandardMaterial3D"), "set_material_override", "get_material_override");
ADD_PROPERTY(PropertyInfo(Variant::INT, "cast_shadow", PROPERTY_HINT_ENUM, "Off,On,Double-Sided,Shadows Only"), "set_cast_shadows_setting", "get_cast_shadows_setting");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "extra_cull_margin", PROPERTY_HINT_RANGE, "0,16384,0.01"), "set_extra_cull_margin", "get_extra_cull_margin");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "extra_cull_margin", PROPERTY_HINT_RANGE, "0,16384,0.01"), "set_extra_cull_margin", "get_extra_cull_margin");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "use_in_baked_light"), "set_flag", "get_flag", FLAG_USE_BAKED_LIGHT);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "use_dynamic_gi"), "set_flag", "get_flag", FLAG_USE_DYNAMIC_GI);
diff --git a/scene/animation/animation_blend_space_1d.cpp b/scene/animation/animation_blend_space_1d.cpp
index fbbc99baa2..93ebf88edb 100644
--- a/scene/animation/animation_blend_space_1d.cpp
+++ b/scene/animation/animation_blend_space_1d.cpp
@@ -31,7 +31,7 @@
#include "animation_blend_space_1d.h"
void AnimationNodeBlendSpace1D::get_parameter_list(List<PropertyInfo> *r_list) const {
- r_list->push_back(PropertyInfo(Variant::REAL, blend_position));
+ r_list->push_back(PropertyInfo(Variant::FLOAT, blend_position));
}
Variant AnimationNodeBlendSpace1D::get_parameter_default_value(const StringName &p_parameter) const {
return 0;
@@ -83,12 +83,12 @@ void AnimationNodeBlendSpace1D::_bind_methods() {
for (int i = 0; i < MAX_BLEND_POINTS; i++) {
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "blend_point_" + itos(i) + "/node", PROPERTY_HINT_RESOURCE_TYPE, "AnimationRootNode", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_add_blend_point", "get_blend_point_node", i);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "blend_point_" + itos(i) + "/pos", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "set_blend_point_position", "get_blend_point_position", i);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "blend_point_" + itos(i) + "/pos", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "set_blend_point_position", "get_blend_point_position", i);
}
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "min_space", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_min_space", "get_min_space");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_space", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_max_space", "get_max_space");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "snap", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_snap", "get_snap");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "min_space", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_min_space", "get_min_space");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_space", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_max_space", "get_max_space");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "snap", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_snap", "get_snap");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "value_label", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_value_label", "get_value_label");
}
diff --git a/scene/animation/animation_blend_space_2d.cpp b/scene/animation/animation_blend_space_2d.cpp
index c9ea7a212b..15ecf9fa1e 100644
--- a/scene/animation/animation_blend_space_2d.cpp
+++ b/scene/animation/animation_blend_space_2d.cpp
@@ -34,7 +34,7 @@
void AnimationNodeBlendSpace2D::get_parameter_list(List<PropertyInfo> *r_list) const {
r_list->push_back(PropertyInfo(Variant::VECTOR2, blend_position));
r_list->push_back(PropertyInfo(Variant::INT, closest, PROPERTY_HINT_NONE, "", 0));
- r_list->push_back(PropertyInfo(Variant::REAL, length_internal, PROPERTY_HINT_NONE, "", 0));
+ r_list->push_back(PropertyInfo(Variant::FLOAT, length_internal, PROPERTY_HINT_NONE, "", 0));
}
Variant AnimationNodeBlendSpace2D::get_parameter_default_value(const StringName &p_parameter) const {
if (p_parameter == closest) {
@@ -650,7 +650,7 @@ void AnimationNodeBlendSpace2D::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::VECTOR2, "blend_point_" + itos(i) + "/pos", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "set_blend_point_position", "get_blend_point_position", i);
}
- ADD_PROPERTY(PropertyInfo(Variant::PACKED_INT_ARRAY, "triangles", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_triangles", "_get_triangles");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_INT32_ARRAY, "triangles", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_triangles", "_get_triangles");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "min_space", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_min_space", "get_min_space");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "max_space", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_max_space", "get_max_space");
diff --git a/scene/animation/animation_blend_tree.cpp b/scene/animation/animation_blend_tree.cpp
index cda17e5e88..1c99920569 100644
--- a/scene/animation/animation_blend_tree.cpp
+++ b/scene/animation/animation_blend_tree.cpp
@@ -44,7 +44,7 @@ StringName AnimationNodeAnimation::get_animation() const {
Vector<String> (*AnimationNodeAnimation::get_editable_animation_list)() = NULL;
void AnimationNodeAnimation::get_parameter_list(List<PropertyInfo> *r_list) const {
- r_list->push_back(PropertyInfo(Variant::REAL, time, PROPERTY_HINT_NONE, "", 0));
+ r_list->push_back(PropertyInfo(Variant::FLOAT, time, PROPERTY_HINT_NONE, "", 0));
}
void AnimationNodeAnimation::_validate_property(PropertyInfo &property) const {
@@ -140,9 +140,9 @@ AnimationNodeAnimation::AnimationNodeAnimation() {
void AnimationNodeOneShot::get_parameter_list(List<PropertyInfo> *r_list) const {
r_list->push_back(PropertyInfo(Variant::BOOL, active));
r_list->push_back(PropertyInfo(Variant::BOOL, prev_active, PROPERTY_HINT_NONE, "", 0));
- r_list->push_back(PropertyInfo(Variant::REAL, time, PROPERTY_HINT_NONE, "", 0));
- r_list->push_back(PropertyInfo(Variant::REAL, remaining, PROPERTY_HINT_NONE, "", 0));
- r_list->push_back(PropertyInfo(Variant::REAL, time_to_restart, PROPERTY_HINT_NONE, "", 0));
+ r_list->push_back(PropertyInfo(Variant::FLOAT, time, PROPERTY_HINT_NONE, "", 0));
+ r_list->push_back(PropertyInfo(Variant::FLOAT, remaining, PROPERTY_HINT_NONE, "", 0));
+ r_list->push_back(PropertyInfo(Variant::FLOAT, time_to_restart, PROPERTY_HINT_NONE, "", 0));
}
Variant AnimationNodeOneShot::get_parameter_default_value(const StringName &p_parameter) const {
@@ -339,14 +339,14 @@ void AnimationNodeOneShot::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_use_sync", "enable"), &AnimationNodeOneShot::set_use_sync);
ClassDB::bind_method(D_METHOD("is_using_sync"), &AnimationNodeOneShot::is_using_sync);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "fadein_time", PROPERTY_HINT_RANGE, "0,60,0.01,or_greater"), "set_fadein_time", "get_fadein_time");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "fadeout_time", PROPERTY_HINT_RANGE, "0,60,0.01,or_greater"), "set_fadeout_time", "get_fadeout_time");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fadein_time", PROPERTY_HINT_RANGE, "0,60,0.01,or_greater"), "set_fadein_time", "get_fadein_time");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fadeout_time", PROPERTY_HINT_RANGE, "0,60,0.01,or_greater"), "set_fadeout_time", "get_fadeout_time");
ADD_GROUP("autorestart_", "Auto Restart");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autorestart"), "set_autorestart", "has_autorestart");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "autorestart_delay", PROPERTY_HINT_RANGE, "0,60,0.01,or_greater"), "set_autorestart_delay", "get_autorestart_delay");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "autorestart_random_delay", PROPERTY_HINT_RANGE, "0,60,0.01,or_greater"), "set_autorestart_random_delay", "get_autorestart_random_delay");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "autorestart_delay", PROPERTY_HINT_RANGE, "0,60,0.01,or_greater"), "set_autorestart_delay", "get_autorestart_delay");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "autorestart_random_delay", PROPERTY_HINT_RANGE, "0,60,0.01,or_greater"), "set_autorestart_random_delay", "get_autorestart_random_delay");
ADD_GROUP("", "");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "sync"), "set_use_sync", "is_using_sync");
@@ -379,7 +379,7 @@ AnimationNodeOneShot::AnimationNodeOneShot() {
////////////////////////////////////////////////
void AnimationNodeAdd2::get_parameter_list(List<PropertyInfo> *r_list) const {
- r_list->push_back(PropertyInfo(Variant::REAL, add_amount, PROPERTY_HINT_RANGE, "0,1,0.01"));
+ r_list->push_back(PropertyInfo(Variant::FLOAT, add_amount, PROPERTY_HINT_RANGE, "0,1,0.01"));
}
Variant AnimationNodeAdd2::get_parameter_default_value(const StringName &p_parameter) const {
return 0;
@@ -431,7 +431,7 @@ AnimationNodeAdd2::AnimationNodeAdd2() {
////////////////////////////////////////////////
void AnimationNodeAdd3::get_parameter_list(List<PropertyInfo> *r_list) const {
- r_list->push_back(PropertyInfo(Variant::REAL, add_amount, PROPERTY_HINT_RANGE, "-1,1,0.01"));
+ r_list->push_back(PropertyInfo(Variant::FLOAT, add_amount, PROPERTY_HINT_RANGE, "-1,1,0.01"));
}
Variant AnimationNodeAdd3::get_parameter_default_value(const StringName &p_parameter) const {
return 0;
@@ -484,7 +484,7 @@ AnimationNodeAdd3::AnimationNodeAdd3() {
/////////////////////////////////////////////
void AnimationNodeBlend2::get_parameter_list(List<PropertyInfo> *r_list) const {
- r_list->push_back(PropertyInfo(Variant::REAL, blend_amount, PROPERTY_HINT_RANGE, "0,1,0.01"));
+ r_list->push_back(PropertyInfo(Variant::FLOAT, blend_amount, PROPERTY_HINT_RANGE, "0,1,0.01"));
}
Variant AnimationNodeBlend2::get_parameter_default_value(const StringName &p_parameter) const {
return 0; //for blend amount
@@ -535,7 +535,7 @@ AnimationNodeBlend2::AnimationNodeBlend2() {
//////////////////////////////////////
void AnimationNodeBlend3::get_parameter_list(List<PropertyInfo> *r_list) const {
- r_list->push_back(PropertyInfo(Variant::REAL, blend_amount, PROPERTY_HINT_RANGE, "-1,1,0.01"));
+ r_list->push_back(PropertyInfo(Variant::FLOAT, blend_amount, PROPERTY_HINT_RANGE, "-1,1,0.01"));
}
Variant AnimationNodeBlend3::get_parameter_default_value(const StringName &p_parameter) const {
return 0; //for blend amount
@@ -583,7 +583,7 @@ AnimationNodeBlend3::AnimationNodeBlend3() {
/////////////////////////////////
void AnimationNodeTimeScale::get_parameter_list(List<PropertyInfo> *r_list) const {
- r_list->push_back(PropertyInfo(Variant::REAL, scale, PROPERTY_HINT_RANGE, "0,32,0.01,or_greater"));
+ r_list->push_back(PropertyInfo(Variant::FLOAT, scale, PROPERTY_HINT_RANGE, "0,32,0.01,or_greater"));
}
Variant AnimationNodeTimeScale::get_parameter_default_value(const StringName &p_parameter) const {
return 1.0; //initial timescale
@@ -613,7 +613,7 @@ AnimationNodeTimeScale::AnimationNodeTimeScale() {
////////////////////////////////////
void AnimationNodeTimeSeek::get_parameter_list(List<PropertyInfo> *r_list) const {
- r_list->push_back(PropertyInfo(Variant::REAL, seek_pos, PROPERTY_HINT_RANGE, "-1,3600,0.01,or_greater"));
+ r_list->push_back(PropertyInfo(Variant::FLOAT, seek_pos, PROPERTY_HINT_RANGE, "-1,3600,0.01,or_greater"));
}
Variant AnimationNodeTimeSeek::get_parameter_default_value(const StringName &p_parameter) const {
return 1.0; //initial timescale
@@ -661,8 +661,8 @@ void AnimationNodeTransition::get_parameter_list(List<PropertyInfo> *r_list) con
r_list->push_back(PropertyInfo(Variant::INT, current, PROPERTY_HINT_ENUM, anims));
r_list->push_back(PropertyInfo(Variant::INT, prev_current, PROPERTY_HINT_NONE, "", 0));
r_list->push_back(PropertyInfo(Variant::INT, prev, PROPERTY_HINT_NONE, "", 0));
- r_list->push_back(PropertyInfo(Variant::REAL, time, PROPERTY_HINT_NONE, "", 0));
- r_list->push_back(PropertyInfo(Variant::REAL, prev_xfading, PROPERTY_HINT_NONE, "", 0));
+ r_list->push_back(PropertyInfo(Variant::FLOAT, time, PROPERTY_HINT_NONE, "", 0));
+ r_list->push_back(PropertyInfo(Variant::FLOAT, prev_xfading, PROPERTY_HINT_NONE, "", 0));
}
Variant AnimationNodeTransition::get_parameter_default_value(const StringName &p_parameter) const {
if (p_parameter == time || p_parameter == prev_xfading) {
@@ -829,7 +829,7 @@ void AnimationNodeTransition::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_cross_fade_time"), &AnimationNodeTransition::get_cross_fade_time);
ADD_PROPERTY(PropertyInfo(Variant::INT, "input_count", PROPERTY_HINT_RANGE, "0,64,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), "set_enabled_inputs", "get_enabled_inputs");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "xfade_time", PROPERTY_HINT_RANGE, "0,120,0.01"), "set_cross_fade_time", "get_cross_fade_time");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "xfade_time", PROPERTY_HINT_RANGE, "0,120,0.01"), "set_cross_fade_time", "get_cross_fade_time");
for (int i = 0; i < MAX_INPUTS; i++) {
ADD_PROPERTYI(PropertyInfo(Variant::STRING, "input_" + itos(i) + "/name", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), "set_input_caption", "get_input_caption", i);
diff --git a/scene/animation/animation_node_state_machine.cpp b/scene/animation/animation_node_state_machine.cpp
index 9b608adf7a..9c7dd7cdd7 100644
--- a/scene/animation/animation_node_state_machine.cpp
+++ b/scene/animation/animation_node_state_machine.cpp
@@ -121,7 +121,7 @@ void AnimationNodeStateMachineTransition::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "switch_mode", PROPERTY_HINT_ENUM, "Immediate,Sync,AtEnd"), "set_switch_mode", "get_switch_mode");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "auto_advance"), "set_auto_advance", "has_auto_advance");
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "advance_condition"), "set_advance_condition", "get_advance_condition");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "xfade_time", PROPERTY_HINT_RANGE, "0,240,0.01"), "set_xfade_time", "get_xfade_time");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "xfade_time", PROPERTY_HINT_RANGE, "0,240,0.01"), "set_xfade_time", "get_xfade_time");
ADD_PROPERTY(PropertyInfo(Variant::INT, "priority", PROPERTY_HINT_RANGE, "0,32,1"), "set_priority", "get_priority");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "disabled"), "set_disabled", "is_disabled");
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index c607203e18..481a4a9958 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -1685,14 +1685,14 @@ void AnimationPlayer::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "current_animation", PROPERTY_HINT_ENUM, "", PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_ANIMATE_AS_TRIGGER), "set_current_animation", "get_current_animation");
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "assigned_animation", PROPERTY_HINT_NONE, "", 0), "set_assigned_animation", "get_assigned_animation");
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "autoplay", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_autoplay", "get_autoplay");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "current_animation_length", PROPERTY_HINT_NONE, "", 0), "", "get_current_animation_length");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "current_animation_position", PROPERTY_HINT_NONE, "", 0), "", "get_current_animation_position");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "current_animation_length", PROPERTY_HINT_NONE, "", 0), "", "get_current_animation_length");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "current_animation_position", PROPERTY_HINT_NONE, "", 0), "", "get_current_animation_position");
ADD_GROUP("Playback Options", "playback_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "playback_process_mode", PROPERTY_HINT_ENUM, "Physics,Idle,Manual"), "set_animation_process_mode", "get_animation_process_mode");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "playback_default_blend_time", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_default_blend_time", "get_default_blend_time");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "playback_default_blend_time", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_default_blend_time", "get_default_blend_time");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playback_active", PROPERTY_HINT_NONE, "", 0), "set_active", "is_active");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "playback_speed", PROPERTY_HINT_RANGE, "-64,64,0.01"), "set_speed_scale", "get_speed_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "playback_speed", PROPERTY_HINT_RANGE, "-64,64,0.01"), "set_speed_scale", "get_speed_scale");
ADD_PROPERTY(PropertyInfo(Variant::INT, "method_call_mode", PROPERTY_HINT_ENUM, "Deferred,Immediate"), "set_method_call_mode", "get_method_call_mode");
ADD_SIGNAL(MethodInfo("animation_finished", PropertyInfo(Variant::STRING_NAME, "anim_name")));
diff --git a/scene/animation/animation_tree.cpp b/scene/animation/animation_tree.cpp
index 93d61e2882..7117b3f5ac 100644
--- a/scene/animation/animation_tree.cpp
+++ b/scene/animation/animation_tree.cpp
@@ -437,7 +437,7 @@ void AnimationNode::_bind_methods() {
mi.return_val.usage = PROPERTY_USAGE_NIL_IS_VARIANT;
BIND_VMETHOD(mi);
}
- BIND_VMETHOD(MethodInfo("process", PropertyInfo(Variant::REAL, "time"), PropertyInfo(Variant::BOOL, "seek")));
+ BIND_VMETHOD(MethodInfo("process", PropertyInfo(Variant::FLOAT, "time"), PropertyInfo(Variant::BOOL, "seek")));
BIND_VMETHOD(MethodInfo(Variant::STRING, "get_caption"));
BIND_VMETHOD(MethodInfo(Variant::BOOL, "has_filter"));
diff --git a/scene/animation/root_motion_view.cpp b/scene/animation/root_motion_view.cpp
index 1a26131fcb..ce9b8bd213 100644
--- a/scene/animation/root_motion_view.cpp
+++ b/scene/animation/root_motion_view.cpp
@@ -187,8 +187,8 @@ void RootMotionView::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "animation_path", PROPERTY_HINT_NODE_PATH_VALID_TYPES, "AnimationTree"), "set_animation_path", "get_animation_path");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "cell_size", PROPERTY_HINT_RANGE, "0.1,16,0.01,or_greater"), "set_cell_size", "get_cell_size");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.1,16,0.01,or_greater"), "set_radius", "get_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "cell_size", PROPERTY_HINT_RANGE, "0.1,16,0.01,or_greater"), "set_cell_size", "get_cell_size");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.1,16,0.01,or_greater"), "set_radius", "get_radius");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "zero_y"), "set_zero_y", "get_zero_y");
}
diff --git a/scene/animation/skeleton_ik.cpp b/scene/animation/skeleton_ik.cpp
index cfda90a558..5cdb38b5c2 100644
--- a/scene/animation/skeleton_ik.cpp
+++ b/scene/animation/skeleton_ik.cpp
@@ -392,13 +392,13 @@ void SkeletonIK::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "root_bone"), "set_root_bone", "get_root_bone");
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "tip_bone"), "set_tip_bone", "get_tip_bone");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "interpolation", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_interpolation", "get_interpolation");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "interpolation", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_interpolation", "get_interpolation");
ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM, "target"), "set_target_transform", "get_target_transform");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "override_tip_basis"), "set_override_tip_basis", "is_override_tip_basis");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_magnet"), "set_use_magnet", "is_using_magnet");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "magnet"), "set_magnet_position", "get_magnet_position");
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "target_node"), "set_target_node", "get_target_node");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "min_distance"), "set_min_distance", "get_min_distance");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "min_distance"), "set_min_distance", "get_min_distance");
ADD_PROPERTY(PropertyInfo(Variant::INT, "max_iterations"), "set_max_iterations", "get_max_iterations");
}
diff --git a/scene/animation/tween.cpp b/scene/animation/tween.cpp
index 161c6d04af..4b8b537d43 100644
--- a/scene/animation/tween.cpp
+++ b/scene/animation/tween.cpp
@@ -67,7 +67,6 @@ void Tween::_add_pending_command(StringName p_key, const Variant &p_arg1, const
count = 0;
// Add the specified arguments to the command
- // TODO: Make this a switch statement?
if (count > 0)
cmd.arg[0] = p_arg1;
if (count > 1)
@@ -157,7 +156,7 @@ void Tween::_get_property_list(List<PropertyInfo> *p_list) const {
// Add the property info for the Tween object
p_list->push_back(PropertyInfo(Variant::BOOL, "playback/active", PROPERTY_HINT_NONE, ""));
p_list->push_back(PropertyInfo(Variant::BOOL, "playback/repeat", PROPERTY_HINT_NONE, ""));
- p_list->push_back(PropertyInfo(Variant::REAL, "playback/speed", PROPERTY_HINT_RANGE, "-64,64,0.01"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "playback/speed", PROPERTY_HINT_RANGE, "-64,64,0.01"));
}
void Tween::_notification(int p_what) {
@@ -250,14 +249,14 @@ void Tween::_bind_methods() {
// Add the Tween signals
ADD_SIGNAL(MethodInfo("tween_started", PropertyInfo(Variant::OBJECT, "object"), PropertyInfo(Variant::NODE_PATH, "key")));
- ADD_SIGNAL(MethodInfo("tween_step", PropertyInfo(Variant::OBJECT, "object"), PropertyInfo(Variant::NODE_PATH, "key"), PropertyInfo(Variant::REAL, "elapsed"), PropertyInfo(Variant::OBJECT, "value")));
+ ADD_SIGNAL(MethodInfo("tween_step", PropertyInfo(Variant::OBJECT, "object"), PropertyInfo(Variant::NODE_PATH, "key"), PropertyInfo(Variant::FLOAT, "elapsed"), PropertyInfo(Variant::OBJECT, "value")));
ADD_SIGNAL(MethodInfo("tween_completed", PropertyInfo(Variant::OBJECT, "object"), PropertyInfo(Variant::NODE_PATH, "key")));
ADD_SIGNAL(MethodInfo("tween_all_completed"));
// Add the properties and tie them to the getters and setters
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "repeat"), "set_repeat", "is_repeat");
ADD_PROPERTY(PropertyInfo(Variant::INT, "playback_process_mode", PROPERTY_HINT_ENUM, "Physics,Idle"), "set_tween_process_mode", "get_tween_process_mode");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "playback_speed", PROPERTY_HINT_RANGE, "-64,64,0.01"), "set_speed_scale", "get_speed_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "playback_speed", PROPERTY_HINT_RANGE, "-64,64,0.01"), "set_speed_scale", "get_speed_scale");
// Bind Idle vs Physics process
BIND_ENUM_CONSTANT(TWEEN_PROCESS_PHYSICS);
@@ -346,7 +345,7 @@ Variant Tween::_get_final_val(const InterpolateData &p_data) const {
ERR_FAIL_COND_V(error.error != Callable::CallError::CALL_OK, p_data.initial_val);
}
- // If we're looking at an INT value, instead convert it to a REAL
+ // If we're looking at an INT value, instead convert it to a FLOAT
// This is better for interpolation
if (final_val.get_type() == Variant::INT) final_val = final_val.operator real_t();
@@ -388,7 +387,7 @@ Variant &Tween::_get_delta_val(InterpolateData &p_data) {
ERR_FAIL_COND_V(error.error != Callable::CallError::CALL_OK, p_data.initial_val);
}
- // If we're looking at an INT value, instead convert it to a REAL
+ // If we're looking at an INT value, instead convert it to a FLOAT
// This is better for interpolation
if (final_val.get_type() == Variant::INT) final_val = final_val.operator real_t();
@@ -402,7 +401,7 @@ Variant &Tween::_get_delta_val(InterpolateData &p_data) {
// Grab the initial value from the data to calculate delta
Variant initial_val = _get_initial_val(p_data);
- // If we're looking at an INT value, instead convert it to a REAL
+ // If we're looking at an INT value, instead convert it to a FLOAT
// This is better for interpolation
if (initial_val.get_type() == Variant::INT) initial_val = initial_val.operator real_t();
@@ -441,8 +440,8 @@ Variant Tween::_run_equation(InterpolateData &p_data) {
result = (int)_run_equation(p_data.trans_type, p_data.ease_type, p_data.elapsed - p_data.delay, (int)initial_val, (int)delta_val, p_data.duration);
break;
- case Variant::REAL:
- // Run the REAL specific equation
+ case Variant::FLOAT:
+ // Run the FLOAT specific equation
result = _run_equation(p_data.trans_type, p_data.ease_type, p_data.elapsed - p_data.delay, (real_t)initial_val, (real_t)delta_val, p_data.duration);
break;
@@ -459,6 +458,20 @@ Variant Tween::_run_equation(InterpolateData &p_data) {
result = r;
} break;
+ case Variant::RECT2: {
+ // Get the Rect2 for initial and delta value
+ Rect2 i = initial_val;
+ Rect2 d = delta_val;
+ Rect2 r;
+
+ // Execute the equation for the position and size of Rect2
+ APPLY_EQUATION(position.x);
+ APPLY_EQUATION(position.y);
+ APPLY_EQUATION(size.x);
+ APPLY_EQUATION(size.y);
+ result = r;
+ } break;
+
case Variant::VECTOR3: {
// Get vectors for initial and delta values
Vector3 i = initial_val;
@@ -473,26 +486,6 @@ Variant Tween::_run_equation(InterpolateData &p_data) {
result = r;
} break;
- case Variant::BASIS: {
- // Get the basis for initial and delta values
- Basis i = initial_val;
- Basis d = delta_val;
- Basis r;
-
- // Execute the equation on all the basis and mutate the r basis
- // This uses the custom APPLY_EQUATION macro defined above
- APPLY_EQUATION(elements[0][0]);
- APPLY_EQUATION(elements[0][1]);
- APPLY_EQUATION(elements[0][2]);
- APPLY_EQUATION(elements[1][0]);
- APPLY_EQUATION(elements[1][1]);
- APPLY_EQUATION(elements[1][2]);
- APPLY_EQUATION(elements[2][0]);
- APPLY_EQUATION(elements[2][1]);
- APPLY_EQUATION(elements[2][2]);
- result = r;
- } break;
-
case Variant::TRANSFORM2D: {
// Get the transforms for initial and delta values
Transform2D i = initial_val;
@@ -509,6 +502,7 @@ Variant Tween::_run_equation(InterpolateData &p_data) {
APPLY_EQUATION(elements[2][1]);
result = r;
} break;
+
case Variant::QUAT: {
// Get the quaternian for the initial and delta values
Quat i = initial_val;
@@ -523,6 +517,7 @@ Variant Tween::_run_equation(InterpolateData &p_data) {
APPLY_EQUATION(w);
result = r;
} break;
+
case Variant::AABB: {
// Get the AABB's for the initial and delta values
AABB i = initial_val;
@@ -539,6 +534,27 @@ Variant Tween::_run_equation(InterpolateData &p_data) {
APPLY_EQUATION(size.z);
result = r;
} break;
+
+ case Variant::BASIS: {
+ // Get the basis for initial and delta values
+ Basis i = initial_val;
+ Basis d = delta_val;
+ Basis r;
+
+ // Execute the equation on all the basis and mutate the r basis
+ // This uses the custom APPLY_EQUATION macro defined above
+ APPLY_EQUATION(elements[0][0]);
+ APPLY_EQUATION(elements[0][1]);
+ APPLY_EQUATION(elements[0][2]);
+ APPLY_EQUATION(elements[1][0]);
+ APPLY_EQUATION(elements[1][1]);
+ APPLY_EQUATION(elements[1][2]);
+ APPLY_EQUATION(elements[2][0]);
+ APPLY_EQUATION(elements[2][1]);
+ APPLY_EQUATION(elements[2][2]);
+ result = r;
+ } break;
+
case Variant::TRANSFORM: {
// Get the transforms for the initial and delta values
Transform i = initial_val;
@@ -561,6 +577,7 @@ Variant Tween::_run_equation(InterpolateData &p_data) {
APPLY_EQUATION(origin.z);
result = r;
} break;
+
case Variant::COLOR: {
// Get the Color for initial and delta value
Color i = initial_val;
@@ -575,6 +592,7 @@ Variant Tween::_run_equation(InterpolateData &p_data) {
APPLY_EQUATION(a);
result = r;
} break;
+
default: {
// If unknown, just return the initial value
result = initial_val;
@@ -1119,8 +1137,8 @@ bool Tween::_calc_delta_val(const Variant &p_initial_val, const Variant &p_final
delta_val = (int)final_val - (int)initial_val;
break;
- case Variant::REAL:
- // Convert to REAL and find the delta
+ case Variant::FLOAT:
+ // Convert to FLOAT and find the delta
delta_val = (real_t)final_val - (real_t)initial_val;
break;
@@ -1129,26 +1147,18 @@ bool Tween::_calc_delta_val(const Variant &p_initial_val, const Variant &p_final
delta_val = final_val.operator Vector2() - initial_val.operator Vector2();
break;
+ case Variant::RECT2: {
+ // Build a new Rect2 and use the new position and sizes to make a delta
+ Rect2 i = initial_val;
+ Rect2 f = final_val;
+ delta_val = Rect2(f.position - i.position, f.size - i.size);
+ } break;
+
case Variant::VECTOR3:
// Convert to Vectors and find the delta
delta_val = final_val.operator Vector3() - initial_val.operator Vector3();
break;
- case Variant::BASIS: {
- // Build a new basis which is the delta between the initial and final values
- Basis i = initial_val;
- Basis f = final_val;
- delta_val = Basis(f.elements[0][0] - i.elements[0][0],
- f.elements[0][1] - i.elements[0][1],
- f.elements[0][2] - i.elements[0][2],
- f.elements[1][0] - i.elements[1][0],
- f.elements[1][1] - i.elements[1][1],
- f.elements[1][2] - i.elements[1][2],
- f.elements[2][0] - i.elements[2][0],
- f.elements[2][1] - i.elements[2][1],
- f.elements[2][2] - i.elements[2][2]);
- } break;
-
case Variant::TRANSFORM2D: {
// Build a new transform which is the difference between the initial and final values
Transform2D i = initial_val;
@@ -1175,6 +1185,21 @@ bool Tween::_calc_delta_val(const Variant &p_initial_val, const Variant &p_final
delta_val = AABB(f.position - i.position, f.size - i.size);
} break;
+ case Variant::BASIS: {
+ // Build a new basis which is the delta between the initial and final values
+ Basis i = initial_val;
+ Basis f = final_val;
+ delta_val = Basis(f.elements[0][0] - i.elements[0][0],
+ f.elements[0][1] - i.elements[0][1],
+ f.elements[0][2] - i.elements[0][2],
+ f.elements[1][0] - i.elements[1][0],
+ f.elements[1][1] - i.elements[1][1],
+ f.elements[1][2] - i.elements[1][2],
+ f.elements[2][0] - i.elements[2][0],
+ f.elements[2][1] - i.elements[2][1],
+ f.elements[2][2] - i.elements[2][2]);
+ } break;
+
case Variant::TRANSFORM: {
// Build a new transform which is the difference between the initial and final values
Transform i = initial_val;
@@ -1203,10 +1228,34 @@ bool Tween::_calc_delta_val(const Variant &p_initial_val, const Variant &p_final
delta_val = Color(f.r - i.r, f.g - i.g, f.b - i.b, f.a - i.a);
} break;
- default:
- // TODO: Should move away from a 'magic string'?
- ERR_PRINT("Invalid param type, except(int/real/vector2/vector/matrix/matrix32/quat/aabb/transform/color)");
+ default: {
+ static Variant::Type supported_types[] = {
+ Variant::BOOL,
+ Variant::INT,
+ Variant::FLOAT,
+ Variant::VECTOR2,
+ Variant::RECT2,
+ Variant::VECTOR3,
+ Variant::TRANSFORM2D,
+ Variant::QUAT,
+ Variant::AABB,
+ Variant::BASIS,
+ Variant::TRANSFORM,
+ Variant::COLOR,
+ };
+
+ int length = *(&supported_types + 1) - supported_types;
+ String error_msg = "Invalid parameter type. Supported types are: ";
+ for (int i = 0; i < length; i++) {
+ if (i != 0) {
+ error_msg += ", ";
+ }
+ error_msg += Variant::get_type_name(supported_types[i]);
+ }
+ error_msg += ".";
+ ERR_PRINT(error_msg);
return false;
+ }
};
return true;
}
@@ -1449,7 +1498,7 @@ bool Tween::follow_property(Object *p_object, NodePath p_property, Variant p_ini
// TODO: Is this documented? It's really helpful for decluttering tweens
if (p_initial_val.get_type() == Variant::NIL) p_initial_val = p_object->get_indexed(p_property.get_subnames());
- // Convert initial INT values to REAL as they are better for interpolation
+ // Convert initial INT values to FLOAT as they are better for interpolation
if (p_initial_val.get_type() == Variant::INT) p_initial_val = p_initial_val.operator real_t();
// Confirm the source and target objects are valid
@@ -1475,7 +1524,7 @@ bool Tween::follow_property(Object *p_object, NodePath p_property, Variant p_ini
Variant target_val = p_target->get_indexed(p_target_property.get_subnames(), &target_prop_valid);
ERR_FAIL_COND_V(!target_prop_valid, false);
- // Convert target INT to REAL since it is better for interpolation
+ // Convert target INT to FLOAT since it is better for interpolation
if (target_val.get_type() == Variant::INT) target_val = target_val.operator real_t();
// Verify that the target value and initial value are the same type
@@ -1511,7 +1560,7 @@ bool Tween::follow_method(Object *p_object, StringName p_method, Variant p_initi
_add_pending_command("follow_method", p_object, p_method, p_initial_val, p_target, p_target_method, p_duration, p_trans_type, p_ease_type, p_delay);
return true;
}
- // Convert initial INT values to REAL as they are better for interpolation
+ // Convert initial INT values to FLOAT as they are better for interpolation
if (p_initial_val.get_type() == Variant::INT) p_initial_val = p_initial_val.operator real_t();
// Verify the source and target objects are valid
@@ -1537,7 +1586,7 @@ bool Tween::follow_method(Object *p_object, StringName p_method, Variant p_initi
Variant target_val = p_target->call(p_target_method, NULL, 0, error);
ERR_FAIL_COND_V(error.error != Callable::CallError::CALL_OK, false);
- // Convert target INT values to REAL as they are better for interpolation
+ // Convert target INT values to FLOAT as they are better for interpolation
if (target_val.get_type() == Variant::INT) target_val = target_val.operator real_t();
ERR_FAIL_COND_V(target_val.get_type() != p_initial_val.get_type(), false);
@@ -1575,7 +1624,7 @@ bool Tween::targeting_property(Object *p_object, NodePath p_property, Object *p_
p_property = p_property.get_as_property_path();
p_initial_property = p_initial_property.get_as_property_path();
- // Convert the initial INT values to REAL as they are better for Interpolation
+ // Convert the initial INT values to FLOAT as they are better for Interpolation
if (p_final_val.get_type() == Variant::INT) p_final_val = p_final_val.operator real_t();
// Verify both objects are valid
@@ -1601,7 +1650,7 @@ bool Tween::targeting_property(Object *p_object, NodePath p_property, Object *p_
Variant initial_val = p_initial->get_indexed(p_initial_property.get_subnames(), &initial_prop_valid);
ERR_FAIL_COND_V(!initial_prop_valid, false);
- // Convert the initial INT value to REAL as it is better for interpolation
+ // Convert the initial INT value to FLOAT as it is better for interpolation
if (initial_val.get_type() == Variant::INT) initial_val = initial_val.operator real_t();
ERR_FAIL_COND_V(initial_val.get_type() != p_final_val.get_type(), false);
@@ -1641,7 +1690,7 @@ bool Tween::targeting_method(Object *p_object, StringName p_method, Object *p_in
return true;
}
- // Convert final INT values to REAL as they are better for interpolation
+ // Convert final INT values to FLOAT as they are better for interpolation
if (p_final_val.get_type() == Variant::INT) p_final_val = p_final_val.operator real_t();
// Make sure the given objects are valid
@@ -1667,7 +1716,7 @@ bool Tween::targeting_method(Object *p_object, StringName p_method, Object *p_in
Variant initial_val = p_initial->call(p_initial_method, NULL, 0, error);
ERR_FAIL_COND_V(error.error != Callable::CallError::CALL_OK, false);
- // Convert initial INT values to REAL as they aer better for interpolation
+ // Convert initial INT values to FLOAT as they aer better for interpolation
if (initial_val.get_type() == Variant::INT) initial_val = initial_val.operator real_t();
ERR_FAIL_COND_V(initial_val.get_type() != p_final_val.get_type(), false);
diff --git a/scene/audio/audio_stream_player.cpp b/scene/audio/audio_stream_player.cpp
index a0c67efc4e..d738631d3b 100644
--- a/scene/audio/audio_stream_player.cpp
+++ b/scene/audio/audio_stream_player.cpp
@@ -411,8 +411,8 @@ void AudioStreamPlayer::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_stream_playback"), &AudioStreamPlayer::get_stream_playback);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream"), "set_stream", "get_stream");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "volume_db", PROPERTY_HINT_RANGE, "-80,24"), "set_volume_db", "get_volume_db");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "pitch_scale", PROPERTY_HINT_RANGE, "0.01,4,0.01,or_greater"), "set_pitch_scale", "get_pitch_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "volume_db", PROPERTY_HINT_RANGE, "-80,24"), "set_volume_db", "get_volume_db");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pitch_scale", PROPERTY_HINT_RANGE, "0.01,4,0.01,or_greater"), "set_pitch_scale", "get_pitch_scale");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playing", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "_set_playing", "is_playing");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autoplay"), "set_autoplay", "is_autoplay_enabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "stream_paused", PROPERTY_HINT_NONE, ""), "set_stream_paused", "get_stream_paused");
diff --git a/scene/debugger/scene_debugger.cpp b/scene/debugger/scene_debugger.cpp
index 9b9f0455a1..22ff0611a7 100644
--- a/scene/debugger/scene_debugger.cpp
+++ b/scene/debugger/scene_debugger.cpp
@@ -347,13 +347,17 @@ void SceneDebuggerObject::serialize(Array &r_arr, int p_max_size) {
const PropertyInfo &pi = properties[i].first;
Variant &var = properties[i].second;
- WeakRef *ref = Object::cast_to<WeakRef>(var);
- if (ref) {
- var = ref->get_ref();
- }
-
RES res = var;
+ if (var.get_type() == Variant::OBJECT && var.is_ref()) {
+ REF r = var;
+ if (r.is_valid()) {
+ res = *r;
+ } else {
+ res = RES();
+ }
+ }
+
Array prop;
prop.push_back(pi.name);
prop.push_back(pi.type);
diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp
index 04ff11f20c..784d298bff 100644
--- a/scene/gui/button.cpp
+++ b/scene/gui/button.cpp
@@ -106,7 +106,7 @@ void Button::_notification(int p_what) {
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case DRAW_PRESSED: {
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index 7bac476b1e..d3027b606d 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -2959,10 +2959,10 @@ void Control::_bind_methods() {
BIND_VMETHOD(MethodInfo(Variant::BOOL, "_clips_input"));
ADD_GROUP("Anchor", "anchor_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anchor_left", PROPERTY_HINT_RANGE, "0,1,0.001,or_lesser,or_greater"), "_set_anchor", "get_anchor", MARGIN_LEFT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anchor_top", PROPERTY_HINT_RANGE, "0,1,0.001,or_lesser,or_greater"), "_set_anchor", "get_anchor", MARGIN_TOP);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anchor_right", PROPERTY_HINT_RANGE, "0,1,0.001,or_lesser,or_greater"), "_set_anchor", "get_anchor", MARGIN_RIGHT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anchor_bottom", PROPERTY_HINT_RANGE, "0,1,0.001,or_lesser,or_greater"), "_set_anchor", "get_anchor", MARGIN_BOTTOM);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anchor_left", PROPERTY_HINT_RANGE, "0,1,0.001,or_lesser,or_greater"), "_set_anchor", "get_anchor", MARGIN_LEFT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anchor_top", PROPERTY_HINT_RANGE, "0,1,0.001,or_lesser,or_greater"), "_set_anchor", "get_anchor", MARGIN_TOP);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anchor_right", PROPERTY_HINT_RANGE, "0,1,0.001,or_lesser,or_greater"), "_set_anchor", "get_anchor", MARGIN_RIGHT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anchor_bottom", PROPERTY_HINT_RANGE, "0,1,0.001,or_lesser,or_greater"), "_set_anchor", "get_anchor", MARGIN_BOTTOM);
ADD_GROUP("Margin", "margin_");
ADD_PROPERTYI(PropertyInfo(Variant::INT, "margin_left", PROPERTY_HINT_RANGE, "-4096,4096"), "set_margin", "get_margin", MARGIN_LEFT);
@@ -2979,7 +2979,7 @@ void Control::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "rect_global_position", PROPERTY_HINT_NONE, "", 0), "_set_global_position", "get_global_position");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "rect_size", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "_set_size", "get_size");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "rect_min_size"), "set_custom_minimum_size", "get_custom_minimum_size");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "rect_rotation", PROPERTY_HINT_RANGE, "-360,360,0.1,or_lesser,or_greater"), "set_rotation_degrees", "get_rotation_degrees");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rect_rotation", PROPERTY_HINT_RANGE, "-360,360,0.1,or_lesser,or_greater"), "set_rotation_degrees", "get_rotation_degrees");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "rect_scale"), "set_scale", "get_scale");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "rect_pivot_offset"), "set_pivot_offset", "get_pivot_offset");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "rect_clip_content"), "set_clip_contents", "is_clipping_contents");
@@ -3003,7 +3003,7 @@ void Control::_bind_methods() {
ADD_GROUP("Size Flags", "size_flags_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "size_flags_horizontal", PROPERTY_HINT_FLAGS, "Fill,Expand,Shrink Center,Shrink End"), "set_h_size_flags", "get_h_size_flags");
ADD_PROPERTY(PropertyInfo(Variant::INT, "size_flags_vertical", PROPERTY_HINT_FLAGS, "Fill,Expand,Shrink Center,Shrink End"), "set_v_size_flags", "get_v_size_flags");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "size_flags_stretch_ratio", PROPERTY_HINT_RANGE, "0,128,0.01"), "set_stretch_ratio", "get_stretch_ratio");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "size_flags_stretch_ratio", PROPERTY_HINT_RANGE, "0,128,0.01"), "set_stretch_ratio", "get_stretch_ratio");
ADD_GROUP("Theme", "");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "theme", PROPERTY_HINT_RESOURCE_TYPE, "Theme"), "set_theme", "get_theme");
ADD_GROUP("", "");
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp
index a325859625..a9bdede852 100644
--- a/scene/gui/graph_edit.cpp
+++ b/scene/gui/graph_edit.cpp
@@ -1315,7 +1315,7 @@ void GraphEdit::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "scroll_offset"), "set_scroll_ofs", "get_scroll_ofs");
ADD_PROPERTY(PropertyInfo(Variant::INT, "snap_distance"), "set_snap", "get_snap");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_snap"), "set_use_snap", "is_using_snap");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "zoom"), "set_zoom", "get_zoom");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "zoom"), "set_zoom", "get_zoom");
ADD_SIGNAL(MethodInfo("connection_request", PropertyInfo(Variant::STRING_NAME, "from"), PropertyInfo(Variant::INT, "from_slot"), PropertyInfo(Variant::STRING_NAME, "to"), PropertyInfo(Variant::INT, "to_slot")));
ADD_SIGNAL(MethodInfo("disconnection_request", PropertyInfo(Variant::STRING_NAME, "from"), PropertyInfo(Variant::INT, "from_slot"), PropertyInfo(Variant::STRING_NAME, "to"), PropertyInfo(Variant::INT, "to_slot")));
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index 85e7af0783..174dc65e8a 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -1561,7 +1561,7 @@ void ItemList::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "fixed_column_width", PROPERTY_HINT_RANGE, "0,100,1,or_greater"), "set_fixed_column_width", "get_fixed_column_width");
ADD_GROUP("Icon", "");
ADD_PROPERTY(PropertyInfo(Variant::INT, "icon_mode", PROPERTY_HINT_ENUM, "Top,Left"), "set_icon_mode", "get_icon_mode");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "icon_scale"), "set_icon_scale", "get_icon_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "icon_scale"), "set_icon_scale", "get_icon_scale");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "fixed_icon_size"), "set_fixed_icon_size", "get_fixed_icon_size");
BIND_ENUM_CONSTANT(ICON_MODE_TOP);
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp
index 9b542cb179..c900b35d65 100644
--- a/scene/gui/label.cpp
+++ b/scene/gui/label.cpp
@@ -687,7 +687,7 @@ void Label::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "clip_text"), "set_clip_text", "is_clipping_text");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "uppercase"), "set_uppercase", "is_uppercase");
ADD_PROPERTY(PropertyInfo(Variant::INT, "visible_characters", PROPERTY_HINT_RANGE, "-1,128000,1", PROPERTY_USAGE_EDITOR), "set_visible_characters", "get_visible_characters");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "percent_visible", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_percent_visible", "get_percent_visible");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "percent_visible", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_percent_visible", "get_percent_visible");
ADD_PROPERTY(PropertyInfo(Variant::INT, "lines_skipped", PROPERTY_HINT_RANGE, "0,999,1"), "set_lines_skipped", "get_lines_skipped");
ADD_PROPERTY(PropertyInfo(Variant::INT, "max_lines_visible", PROPERTY_HINT_RANGE, "-1,999,1"), "set_max_lines_visible", "get_max_lines_visible");
}
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index 86fe6d7630..fb8396e4ff 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -355,14 +355,23 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) {
handled = false;
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case KEY_LEFT: {
-
#ifndef APPLE_STYLE_KEYS
- if (!k->get_alt())
+ if (!k->get_alt()) {
#endif
+ if (selection.enabled && !k->get_shift()) {
+ set_cursor_position(selection.begin);
+ deselect();
+ handled = true;
+ break;
+ }
+
shift_selection_check_pre(k->get_shift());
+#ifndef APPLE_STYLE_KEYS
+ }
+#endif
#ifdef APPLE_STYLE_KEYS
if (k->get_command()) {
@@ -402,11 +411,23 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) {
handled = false;
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case KEY_RIGHT: {
+#ifndef APPLE_STYLE_KEYS
+ if (!k->get_alt()) {
+#endif
+ if (selection.enabled && !k->get_shift()) {
+ set_cursor_position(selection.end);
+ deselect();
+ handled = true;
+ break;
+ }
- shift_selection_check_pre(k->get_shift());
+ shift_selection_check_pre(k->get_shift());
+#ifndef APPLE_STYLE_KEYS
+ }
+#endif
#ifdef APPLE_STYLE_KEYS
if (k->get_command()) {
@@ -509,7 +530,7 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) {
handled = false;
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case KEY_HOME: {
@@ -522,7 +543,7 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) {
handled = false;
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case KEY_END: {
@@ -1832,10 +1853,10 @@ void LineEdit::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "right_icon", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_right_icon", "get_right_icon");
ADD_GROUP("Placeholder", "placeholder_");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "placeholder_text"), "set_placeholder", "get_placeholder");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "placeholder_alpha", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_placeholder_alpha", "get_placeholder_alpha");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "placeholder_alpha", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_placeholder_alpha", "get_placeholder_alpha");
ADD_GROUP("Caret", "caret_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "caret_blink"), "cursor_set_blink_enabled", "cursor_get_blink_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "caret_blink_speed", PROPERTY_HINT_RANGE, "0.1,10,0.01"), "cursor_set_blink_speed", "cursor_get_blink_speed");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "caret_blink_speed", PROPERTY_HINT_RANGE, "0.1,10,0.01"), "cursor_set_blink_speed", "cursor_get_blink_speed");
ADD_PROPERTY(PropertyInfo(Variant::INT, "caret_position"), "set_cursor_position", "get_cursor_position");
}
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp
index 2416931dae..659d8041a2 100644
--- a/scene/gui/popup_menu.cpp
+++ b/scene/gui/popup_menu.cpp
@@ -1477,7 +1477,7 @@ void PopupMenu::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "hide_on_item_selection"), "set_hide_on_item_selection", "is_hide_on_item_selection");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "hide_on_checkable_item_selection"), "set_hide_on_checkable_item_selection", "is_hide_on_checkable_item_selection");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "hide_on_state_item_selection"), "set_hide_on_state_item_selection", "is_hide_on_state_item_selection");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "submenu_popup_delay"), "set_submenu_popup_delay", "get_submenu_popup_delay");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "submenu_popup_delay"), "set_submenu_popup_delay", "get_submenu_popup_delay");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "allow_search"), "set_allow_search", "get_allow_search");
ADD_SIGNAL(MethodInfo("id_pressed", PropertyInfo(Variant::INT, "id")));
diff --git a/scene/gui/range.cpp b/scene/gui/range.cpp
index 6b6f5bca93..adc5f81465 100644
--- a/scene/gui/range.cpp
+++ b/scene/gui/range.cpp
@@ -267,15 +267,15 @@ void Range::_bind_methods() {
ClassDB::bind_method(D_METHOD("share", "with"), &Range::_share);
ClassDB::bind_method(D_METHOD("unshare"), &Range::unshare);
- ADD_SIGNAL(MethodInfo("value_changed", PropertyInfo(Variant::REAL, "value")));
+ ADD_SIGNAL(MethodInfo("value_changed", PropertyInfo(Variant::FLOAT, "value")));
ADD_SIGNAL(MethodInfo("changed"));
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "min_value"), "set_min", "get_min");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_value"), "set_max", "get_max");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "step"), "set_step", "get_step");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "page"), "set_page", "get_page");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "value"), "set_value", "get_value");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ratio", PROPERTY_HINT_RANGE, "0,1,0.01", 0), "set_as_ratio", "get_as_ratio");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "min_value"), "set_min", "get_min");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_value"), "set_max", "get_max");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "step"), "set_step", "get_step");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "page"), "set_page", "get_page");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "value"), "set_value", "get_value");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ratio", PROPERTY_HINT_RANGE, "0,1,0.01", 0), "set_as_ratio", "get_as_ratio");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "exp_edit"), "set_exp_ratio", "is_ratio_exp");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "rounded"), "set_use_rounded_values", "is_using_rounded_values");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "allow_greater"), "set_allow_greater", "is_greater_allowed");
diff --git a/scene/gui/rich_text_effect.cpp b/scene/gui/rich_text_effect.cpp
index c5b1685ff9..0f5926ea1c 100644
--- a/scene/gui/rich_text_effect.cpp
+++ b/scene/gui/rich_text_effect.cpp
@@ -91,7 +91,7 @@ void CharFXTransform::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "relative_index"), "set_relative_index", "get_relative_index");
ADD_PROPERTY(PropertyInfo(Variant::INT, "absolute_index"), "set_absolute_index", "get_absolute_index");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "elapsed_time"), "set_elapsed_time", "get_elapsed_time");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "elapsed_time"), "set_elapsed_time", "get_elapsed_time");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "visible"), "set_visibility", "is_visible");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "offset"), "set_offset", "get_offset");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color");
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index 3727860321..6282b26a5a 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -2781,7 +2781,7 @@ void RichTextLabel::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::STRING, "bbcode_text", PROPERTY_HINT_MULTILINE_TEXT), "set_bbcode", "get_bbcode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "visible_characters", PROPERTY_HINT_RANGE, "-1,128000,1"), "set_visible_characters", "get_visible_characters");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "percent_visible", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_percent_visible", "get_percent_visible");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "percent_visible", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_percent_visible", "get_percent_visible");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "meta_underlined"), "set_meta_underline", "is_meta_underlined");
ADD_PROPERTY(PropertyInfo(Variant::INT, "tab_size", PROPERTY_HINT_RANGE, "0,24,1"), "set_tab_size", "get_tab_size");
diff --git a/scene/gui/scroll_bar.cpp b/scene/gui/scroll_bar.cpp
index 4a27ea23ce..3d7b6b05ae 100644
--- a/scene/gui/scroll_bar.cpp
+++ b/scene/gui/scroll_bar.cpp
@@ -656,7 +656,7 @@ void ScrollBar::_bind_methods() {
ADD_SIGNAL(MethodInfo("scrolling"));
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "custom_step", PROPERTY_HINT_RANGE, "-1,4096"), "set_custom_step", "get_custom_step");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "custom_step", PROPERTY_HINT_RANGE, "-1,4096"), "set_custom_step", "get_custom_step");
}
ScrollBar::ScrollBar(Orientation p_orientation) {
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 313b82035c..2fd1ba5535 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -1844,6 +1844,42 @@ void TextEdit::_consume_pair_symbol(CharType ch) {
}
}
+ String line = text[cursor.line];
+
+ bool in_single_quote = false;
+ bool in_double_quote = false;
+
+ int c = 0;
+ while (c < line.length()) {
+ if (line[c] == '\\') {
+ c++; // Skip quoted anything.
+
+ if (cursor.column == c) {
+ break;
+ }
+ } else {
+ if (line[c] == '\'' && !in_double_quote) {
+ in_single_quote = !in_single_quote;
+ } else if (line[c] == '"' && !in_single_quote) {
+ in_double_quote = !in_double_quote;
+ }
+ }
+
+ c++;
+
+ if (cursor.column == c) {
+ break;
+ }
+ }
+
+ // Disallow inserting duplicated quotes while already in string
+ if ((in_single_quote || in_double_quote) && (ch == '"' || ch == '\'')) {
+ insert_text_at_cursor(ch_single);
+ cursor_set_column(cursor_position_to_move);
+
+ return;
+ }
+
insert_text_at_cursor(ch_pair);
cursor_set_column(cursor_position_to_move);
}
@@ -3068,7 +3104,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
scancode_handled = false;
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case KEY_LEFT: {
@@ -3144,7 +3180,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
scancode_handled = false;
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case KEY_RIGHT: {
@@ -3205,7 +3241,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
scancode_handled = false;
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case KEY_UP: {
@@ -3258,7 +3294,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
scancode_handled = false;
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case KEY_DOWN: {
@@ -3381,7 +3417,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
scancode_handled = false;
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case KEY_HOME: {
#ifdef APPLE_STYLE_KEYS
@@ -3442,7 +3478,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
scancode_handled = false;
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case KEY_END: {
#ifdef APPLE_STYLE_KEYS
@@ -3489,7 +3525,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
scancode_handled = false;
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case KEY_PAGEUP: {
@@ -3512,7 +3548,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
scancode_handled = false;
break;
}
- FALLTHROUGH;
+ [[fallthrough]];
}
case KEY_PAGEDOWN: {
@@ -7147,10 +7183,10 @@ void TextEdit::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "shortcut_keys_enabled"), "set_shortcut_keys_enabled", "is_shortcut_keys_enabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "selecting_enabled"), "set_selecting_enabled", "is_selecting_enabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "smooth_scrolling"), "set_smooth_scroll_enable", "is_smooth_scroll_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "v_scroll_speed"), "set_v_scroll_speed", "get_v_scroll_speed");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "v_scroll_speed"), "set_v_scroll_speed", "get_v_scroll_speed");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "hiding_enabled"), "set_hiding_enabled", "is_hiding_enabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "wrap_enabled"), "set_wrap_enabled", "is_wrap_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "scroll_vertical"), "set_v_scroll", "get_v_scroll");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "scroll_vertical"), "set_v_scroll", "get_v_scroll");
ADD_PROPERTY(PropertyInfo(Variant::INT, "scroll_horizontal"), "set_h_scroll", "get_h_scroll");
ADD_GROUP("Minimap", "minimap_");
@@ -7160,7 +7196,7 @@ void TextEdit::_bind_methods() {
ADD_GROUP("Caret", "caret_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "caret_block_mode"), "cursor_set_block_mode", "cursor_is_block_mode");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "caret_blink"), "cursor_set_blink_enabled", "cursor_get_blink_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "caret_blink_speed", PROPERTY_HINT_RANGE, "0.1,10,0.01"), "cursor_set_blink_speed", "cursor_get_blink_speed");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "caret_blink_speed", PROPERTY_HINT_RANGE, "0.1,10,0.01"), "cursor_set_blink_speed", "cursor_get_blink_speed");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "caret_moving_by_right_click"), "set_right_click_moves_caret", "is_right_click_moving_caret");
ADD_SIGNAL(MethodInfo("cursor_changed"));
@@ -7180,7 +7216,7 @@ void TextEdit::_bind_methods() {
BIND_ENUM_CONSTANT(MENU_MAX);
GLOBAL_DEF("gui/timers/text_edit_idle_detect_sec", 3);
- ProjectSettings::get_singleton()->set_custom_property_info("gui/timers/text_edit_idle_detect_sec", PropertyInfo(Variant::REAL, "gui/timers/text_edit_idle_detect_sec", PROPERTY_HINT_RANGE, "0,10,0.01,or_greater")); // No negative numbers.
+ ProjectSettings::get_singleton()->set_custom_property_info("gui/timers/text_edit_idle_detect_sec", PropertyInfo(Variant::FLOAT, "gui/timers/text_edit_idle_detect_sec", PROPERTY_HINT_RANGE, "0,10,0.01,or_greater")); // No negative numbers.
}
TextEdit::TextEdit() {
diff --git a/scene/gui/texture_progress.cpp b/scene/gui/texture_progress.cpp
index c5650b1795..abf6b2ed49 100644
--- a/scene/gui/texture_progress.cpp
+++ b/scene/gui/texture_progress.cpp
@@ -510,8 +510,8 @@ void TextureProgress::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "tint_over"), "set_tint_over", "get_tint_over");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "tint_progress"), "set_tint_progress", "get_tint_progress");
ADD_GROUP("Radial Fill", "radial_");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "radial_initial_angle", PROPERTY_HINT_RANGE, "0.0,360.0,0.1,slider"), "set_radial_initial_angle", "get_radial_initial_angle");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "radial_fill_degrees", PROPERTY_HINT_RANGE, "0.0,360.0,0.1,slider"), "set_fill_degrees", "get_fill_degrees");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radial_initial_angle", PROPERTY_HINT_RANGE, "0.0,360.0,0.1,slider"), "set_radial_initial_angle", "get_radial_initial_angle");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radial_fill_degrees", PROPERTY_HINT_RANGE, "0.0,360.0,0.1,slider"), "set_fill_degrees", "get_fill_degrees");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "radial_center_offset"), "set_radial_center_offset", "get_radial_center_offset");
ADD_GROUP("Stretch", "stretch_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "nine_patch_stretch"), "set_nine_patch_stretch", "get_nine_patch_stretch");
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 0a11b94f48..940692ebd7 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -1020,7 +1020,7 @@ int Tree::compute_item_height(TreeItem *p_item) const {
int check_icon_h = cache.checked->get_height();
if (height < check_icon_h)
height = check_icon_h;
- FALLTHROUGH;
+ [[fallthrough]];
}
case TreeItem::CELL_MODE_STRING:
case TreeItem::CELL_MODE_CUSTOM:
diff --git a/scene/gui/video_player.cpp b/scene/gui/video_player.cpp
index 89f8fbe648..ac1e4a5629 100644
--- a/scene/gui/video_player.cpp
+++ b/scene/gui/video_player.cpp
@@ -473,13 +473,13 @@ void VideoPlayer::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "audio_track", PROPERTY_HINT_RANGE, "0,128,1"), "set_audio_track", "get_audio_track");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "VideoStream"), "set_stream", "get_stream");
//ADD_PROPERTY( PropertyInfo(Variant::BOOL, "stream/loop"), "set_loop", "has_loop") ;
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "volume_db", PROPERTY_HINT_RANGE, "-80,24,0.01"), "set_volume_db", "get_volume_db");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "volume", PROPERTY_HINT_EXP_RANGE, "0,15,0.01", 0), "set_volume", "get_volume");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "volume_db", PROPERTY_HINT_RANGE, "-80,24,0.01"), "set_volume_db", "get_volume_db");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "volume", PROPERTY_HINT_EXP_RANGE, "0,15,0.01", 0), "set_volume", "get_volume");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autoplay"), "set_autoplay", "has_autoplay");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "paused"), "set_paused", "is_paused");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "expand"), "set_expand", "has_expand");
ADD_PROPERTY(PropertyInfo(Variant::INT, "buffering_msec", PROPERTY_HINT_RANGE, "10,1000"), "set_buffering_msec", "get_buffering_msec");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "stream_position", PROPERTY_HINT_RANGE, "0,1280000,0.1", 0), "set_stream_position", "get_stream_position");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "stream_position", PROPERTY_HINT_RANGE, "0,1280000,0.1", 0), "set_stream_position", "get_stream_position");
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus");
}
diff --git a/scene/main/canvas_layer.cpp b/scene/main/canvas_layer.cpp
index 04cf5c6338..2085fa3a60 100644
--- a/scene/main/canvas_layer.cpp
+++ b/scene/main/canvas_layer.cpp
@@ -307,15 +307,15 @@ void CanvasLayer::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "layer", PROPERTY_HINT_RANGE, "-128,128,1"), "set_layer", "get_layer");
ADD_GROUP("Transform", "");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "offset"), "set_offset", "get_offset");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "rotation_degrees", PROPERTY_HINT_RANGE, "-1080,1080,0.1,or_lesser,or_greater", PROPERTY_USAGE_EDITOR), "set_rotation_degrees", "get_rotation_degrees");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "rotation", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_rotation", "get_rotation");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rotation_degrees", PROPERTY_HINT_RANGE, "-1080,1080,0.1,or_lesser,or_greater", PROPERTY_USAGE_EDITOR), "set_rotation_degrees", "get_rotation_degrees");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rotation", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_rotation", "get_rotation");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "scale"), "set_scale", "get_scale");
ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "transform"), "set_transform", "get_transform");
ADD_GROUP("", "");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "custom_viewport", PROPERTY_HINT_RESOURCE_TYPE, "Viewport", 0), "set_custom_viewport", "get_custom_viewport");
ADD_GROUP("Follow Viewport", "follow_viewport");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "follow_viewport_enable"), "set_follow_viewport", "is_following_viewport");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "follow_viewport_scale", PROPERTY_HINT_RANGE, "0.001,1000,0.001,or_greater,or_lesser"), "set_follow_viewport_scale", "get_follow_viewport_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "follow_viewport_scale", PROPERTY_HINT_RANGE, "0.001,1000,0.001,or_greater,or_lesser"), "set_follow_viewport_scale", "get_follow_viewport_scale");
}
CanvasLayer::CanvasLayer() {
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 7b10a4dc2f..5baa59fe7c 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -2983,8 +2983,8 @@ void Node::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "custom_multiplayer", PROPERTY_HINT_RESOURCE_TYPE, "MultiplayerAPI", 0), "set_custom_multiplayer", "get_custom_multiplayer");
ADD_PROPERTY(PropertyInfo(Variant::INT, "process_priority"), "set_process_priority", "get_process_priority");
- BIND_VMETHOD(MethodInfo("_process", PropertyInfo(Variant::REAL, "delta")));
- BIND_VMETHOD(MethodInfo("_physics_process", PropertyInfo(Variant::REAL, "delta")));
+ BIND_VMETHOD(MethodInfo("_process", PropertyInfo(Variant::FLOAT, "delta")));
+ BIND_VMETHOD(MethodInfo("_physics_process", PropertyInfo(Variant::FLOAT, "delta")));
BIND_VMETHOD(MethodInfo("_enter_tree"));
BIND_VMETHOD(MethodInfo("_exit_tree"));
BIND_VMETHOD(MethodInfo("_ready"));
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index f27415ee6f..ed89b70d65 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -59,7 +59,7 @@ void SceneTreeTimer::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_time_left", "time"), &SceneTreeTimer::set_time_left);
ClassDB::bind_method(D_METHOD("get_time_left"), &SceneTreeTimer::get_time_left);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "time_left"), "set_time_left", "get_time_left");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_left"), "set_time_left", "get_time_left");
ADD_SIGNAL(MethodInfo("timeout"));
}
diff --git a/scene/main/timer.cpp b/scene/main/timer.cpp
index cb213be731..7c847095e1 100755
--- a/scene/main/timer.cpp
+++ b/scene/main/timer.cpp
@@ -206,11 +206,11 @@ void Timer::_bind_methods() {
ADD_SIGNAL(MethodInfo("timeout"));
ADD_PROPERTY(PropertyInfo(Variant::INT, "process_mode", PROPERTY_HINT_ENUM, "Physics,Idle"), "set_timer_process_mode", "get_timer_process_mode");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "wait_time", PROPERTY_HINT_EXP_RANGE, "0.001,4096,0.001,or_greater"), "set_wait_time", "get_wait_time");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wait_time", PROPERTY_HINT_EXP_RANGE, "0.001,4096,0.001,or_greater"), "set_wait_time", "get_wait_time");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_shot"), "set_one_shot", "is_one_shot");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autostart"), "set_autostart", "has_autostart");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "paused", PROPERTY_HINT_NONE, "", 0), "set_paused", "is_paused");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "time_left", PROPERTY_HINT_NONE, "", 0), "", "get_time_left");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_left", PROPERTY_HINT_NONE, "", 0), "", "get_time_left");
BIND_ENUM_CONSTANT(TIMER_PROCESS_PHYSICS);
BIND_ENUM_CONSTANT(TIMER_PROCESS_IDLE);
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index d39bbed55b..2f9c9f8a37 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -3360,7 +3360,7 @@ Viewport::Viewport() {
//gui.tooltip_timer->force_parent_owned();
gui.tooltip_delay = GLOBAL_DEF("gui/timers/tooltip_delay_sec", 0.5);
- ProjectSettings::get_singleton()->set_custom_property_info("gui/timers/tooltip_delay_sec", PropertyInfo(Variant::REAL, "gui/timers/tooltip_delay_sec", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater")); // No negative numbers
+ ProjectSettings::get_singleton()->set_custom_property_info("gui/timers/tooltip_delay_sec", PropertyInfo(Variant::FLOAT, "gui/timers/tooltip_delay_sec", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater")); // No negative numbers
gui.tooltip = NULL;
gui.tooltip_label = NULL;
diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp
index 7ffead9b86..6288598ce2 100644
--- a/scene/register_scene_types.cpp
+++ b/scene/register_scene_types.cpp
@@ -488,17 +488,20 @@ void register_scene_types() {
ClassDB::register_class<VisualShaderNodeInput>();
ClassDB::register_virtual_class<VisualShaderNodeOutput>();
ClassDB::register_class<VisualShaderNodeGroupBase>();
- ClassDB::register_class<VisualShaderNodeScalarConstant>();
+ ClassDB::register_class<VisualShaderNodeFloatConstant>();
+ ClassDB::register_class<VisualShaderNodeIntConstant>();
ClassDB::register_class<VisualShaderNodeBooleanConstant>();
ClassDB::register_class<VisualShaderNodeColorConstant>();
ClassDB::register_class<VisualShaderNodeVec3Constant>();
ClassDB::register_class<VisualShaderNodeTransformConstant>();
- ClassDB::register_class<VisualShaderNodeScalarOp>();
+ ClassDB::register_class<VisualShaderNodeFloatOp>();
+ ClassDB::register_class<VisualShaderNodeIntOp>();
ClassDB::register_class<VisualShaderNodeVectorOp>();
ClassDB::register_class<VisualShaderNodeColorOp>();
ClassDB::register_class<VisualShaderNodeTransformMult>();
ClassDB::register_class<VisualShaderNodeTransformVecMult>();
- ClassDB::register_class<VisualShaderNodeScalarFunc>();
+ ClassDB::register_class<VisualShaderNodeFloatFunc>();
+ ClassDB::register_class<VisualShaderNodeIntFunc>();
ClassDB::register_class<VisualShaderNodeVectorFunc>();
ClassDB::register_class<VisualShaderNodeColorFunc>();
ClassDB::register_class<VisualShaderNodeTransformFunc>();
@@ -527,7 +530,8 @@ void register_scene_types() {
ClassDB::register_class<VisualShaderNodeTexture>();
ClassDB::register_class<VisualShaderNodeCubemap>();
ClassDB::register_virtual_class<VisualShaderNodeUniform>();
- ClassDB::register_class<VisualShaderNodeScalarUniform>();
+ ClassDB::register_class<VisualShaderNodeFloatUniform>();
+ ClassDB::register_class<VisualShaderNodeIntUniform>();
ClassDB::register_class<VisualShaderNodeBooleanUniform>();
ClassDB::register_class<VisualShaderNodeColorUniform>();
ClassDB::register_class<VisualShaderNodeVec3Uniform>();
@@ -738,6 +742,10 @@ void register_scene_types() {
ClassDB::add_compatibility_class("SpatialMaterial", "StandardMaterial3D");
ClassDB::add_compatibility_class("Mesh", "ArrayMesh");
ClassDB::add_compatibility_class("AnimationTreePlayer", "AnimationTree");
+ ClassDB::add_compatibility_class("VisualShaderNodeScalarConstant", "VisualShaderNodeFloatConstant");
+ ClassDB::add_compatibility_class("VisualShaderNodeScalarUniform", "VisualShaderNodeFloatUniform");
+ ClassDB::add_compatibility_class("VisualShaderNodeScalarOp", "VisualShaderNodeFloatOp");
+ ClassDB::add_compatibility_class("VisualShaderNodeScalarFunc", "VisualShaderNodeFloatFunc");
#endif
OS::get_singleton()->yield(); //may take time to init
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp
index dc3b18646e..ba1f738115 100644
--- a/scene/resources/animation.cpp
+++ b/scene/resources/animation.cpp
@@ -221,7 +221,7 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) {
ERR_FAIL_COND_V(!d.has("points"), false);
Vector<float> times = d["times"];
- PackedRealArray values = d["points"];
+ PackedFloat32Array values = d["points"];
ERR_FAIL_COND_V(times.size() * 5 != values.size(), false);
@@ -373,7 +373,7 @@ bool Animation::_get(const StringName &p_name, Variant &r_ret) const {
if (track_get_type(track) == TYPE_TRANSFORM) {
- Vector<real_t> keys;
+ Vector<float> keys;
int kk = track_get_key_count(track);
keys.resize(kk * 12);
@@ -1620,7 +1620,7 @@ Variant Animation::_cubic_interpolate(const Variant &p_pre_a, const Variant &p_a
vformat |= 1 << type_pa;
vformat |= 1 << type_pb;
- if (vformat == ((1 << Variant::INT) | (1 << Variant::REAL)) || vformat == (1 << Variant::REAL)) {
+ if (vformat == ((1 << Variant::INT) | (1 << Variant::FLOAT)) || vformat == (1 << Variant::FLOAT)) {
//mix of real and int
real_t p0 = p_pre_a;
@@ -2810,9 +2810,9 @@ void Animation::_bind_methods() {
ClassDB::bind_method(D_METHOD("clear"), &Animation::clear);
ClassDB::bind_method(D_METHOD("copy_track", "track_idx", "to_animation"), &Animation::copy_track);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "length", PROPERTY_HINT_RANGE, "0.001,99999,0.001"), "set_length", "get_length");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "length", PROPERTY_HINT_RANGE, "0.001,99999,0.001"), "set_length", "get_length");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "loop"), "set_loop", "has_loop");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "step", PROPERTY_HINT_RANGE, "0,4096,0.001"), "set_step", "get_step");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "step", PROPERTY_HINT_RANGE, "0,4096,0.001"), "set_step", "get_step");
ADD_SIGNAL(MethodInfo("tracks_changed"));
diff --git a/scene/resources/capsule_shape.cpp b/scene/resources/capsule_shape.cpp
index 933129936a..dddbd7fef3 100644
--- a/scene/resources/capsule_shape.cpp
+++ b/scene/resources/capsule_shape.cpp
@@ -38,7 +38,7 @@ Vector<Vector3> CapsuleShape::get_debug_mesh_lines() {
Vector<Vector3> points;
- Vector3 d(0, 0, height * 0.5);
+ Vector3 d(0, height * 0.5, 0);
for (int i = 0; i < 360; i++) {
float ra = Math::deg2rad((float)i);
@@ -46,24 +46,24 @@ Vector<Vector3> CapsuleShape::get_debug_mesh_lines() {
Point2 a = Vector2(Math::sin(ra), Math::cos(ra)) * radius;
Point2 b = Vector2(Math::sin(rb), Math::cos(rb)) * radius;
- points.push_back(Vector3(a.x, a.y, 0) + d);
- points.push_back(Vector3(b.x, b.y, 0) + d);
+ points.push_back(Vector3(a.x, 0, a.y) + d);
+ points.push_back(Vector3(b.x, 0, b.y) + d);
- points.push_back(Vector3(a.x, a.y, 0) - d);
- points.push_back(Vector3(b.x, b.y, 0) - d);
+ points.push_back(Vector3(a.x, 0, a.y) - d);
+ points.push_back(Vector3(b.x, 0, b.y) - d);
if (i % 90 == 0) {
- points.push_back(Vector3(a.x, a.y, 0) + d);
- points.push_back(Vector3(a.x, a.y, 0) - d);
+ points.push_back(Vector3(a.x, 0, a.y) + d);
+ points.push_back(Vector3(a.x, 0, a.y) - d);
}
Vector3 dud = i < 180 ? d : -d;
- points.push_back(Vector3(0, a.y, a.x) + dud);
- points.push_back(Vector3(0, b.y, b.x) + dud);
- points.push_back(Vector3(a.y, 0, a.x) + dud);
- points.push_back(Vector3(b.y, 0, b.x) + dud);
+ points.push_back(Vector3(0, a.x, a.y) + dud);
+ points.push_back(Vector3(0, b.x, b.y) + dud);
+ points.push_back(Vector3(a.y, a.x, 0) + dud);
+ points.push_back(Vector3(b.y, b.x, 0) + dud);
}
return points;
@@ -115,8 +115,8 @@ void CapsuleShape::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_height", "height"), &CapsuleShape::set_height);
ClassDB::bind_method(D_METHOD("get_height"), &CapsuleShape::get_height);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.01,4096,0.01"), "set_radius", "get_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_RANGE, "0.01,4096,0.01"), "set_height", "get_height");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.01,4096,0.01"), "set_radius", "get_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "0.01,4096,0.01"), "set_height", "get_height");
}
CapsuleShape::CapsuleShape() :
diff --git a/scene/resources/capsule_shape_2d.cpp b/scene/resources/capsule_shape_2d.cpp
index 5658395cee..9b8083de97 100644
--- a/scene/resources/capsule_shape_2d.cpp
+++ b/scene/resources/capsule_shape_2d.cpp
@@ -109,8 +109,8 @@ void CapsuleShape2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_height", "height"), &CapsuleShape2D::set_height);
ClassDB::bind_method(D_METHOD("get_height"), &CapsuleShape2D::get_height);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius"), "set_radius", "get_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "height"), "set_height", "get_height");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius"), "set_radius", "get_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height"), "set_height", "get_height");
}
CapsuleShape2D::CapsuleShape2D() :
diff --git a/scene/resources/circle_shape_2d.cpp b/scene/resources/circle_shape_2d.cpp
index 10f8ab8a8a..37874e17ef 100644
--- a/scene/resources/circle_shape_2d.cpp
+++ b/scene/resources/circle_shape_2d.cpp
@@ -60,7 +60,7 @@ void CircleShape2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_radius", "radius"), &CircleShape2D::set_radius);
ClassDB::bind_method(D_METHOD("get_radius"), &CircleShape2D::get_radius);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.01,16384,0.5"), "set_radius", "get_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.01,16384,0.5"), "set_radius", "get_radius");
}
Rect2 CircleShape2D::get_rect() const {
diff --git a/scene/resources/curve.cpp b/scene/resources/curve.cpp
index 00c52e8a03..a68eb77378 100644
--- a/scene/resources/curve.cpp
+++ b/scene/resources/curve.cpp
@@ -392,7 +392,7 @@ void Curve::set_data(Array input) {
for (int i = 0; i < input.size(); i += ELEMS) {
ERR_FAIL_COND(input[i].get_type() != Variant::VECTOR2);
ERR_FAIL_COND(!input[i + 1].is_num());
- ERR_FAIL_COND(input[i + 2].get_type() != Variant::REAL);
+ ERR_FAIL_COND(input[i + 2].get_type() != Variant::FLOAT);
ERR_FAIL_COND(input[i + 3].get_type() != Variant::INT);
int left_mode = input[i + 3];
@@ -524,8 +524,8 @@ void Curve::_bind_methods() {
ClassDB::bind_method(D_METHOD("_get_data"), &Curve::get_data);
ClassDB::bind_method(D_METHOD("_set_data", "data"), &Curve::set_data);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "min_value", PROPERTY_HINT_RANGE, "-1024,1024,0.01"), "set_min_value", "get_min_value");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_value", PROPERTY_HINT_RANGE, "-1024,1024,0.01"), "set_max_value", "get_max_value");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "min_value", PROPERTY_HINT_RANGE, "-1024,1024,0.01"), "set_min_value", "get_min_value");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_value", PROPERTY_HINT_RANGE, "-1024,1024,0.01"), "set_max_value", "get_max_value");
ADD_PROPERTY(PropertyInfo(Variant::INT, "bake_resolution", PROPERTY_HINT_RANGE, "1,1000,1"), "set_bake_resolution", "get_bake_resolution");
ADD_PROPERTY(PropertyInfo(Variant::INT, "_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_data", "_get_data");
@@ -1001,7 +1001,7 @@ void Curve2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("_get_data"), &Curve2D::_get_data);
ClassDB::bind_method(D_METHOD("_set_data"), &Curve2D::_set_data);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "bake_interval", PROPERTY_HINT_RANGE, "0.01,512,0.01"), "set_bake_interval", "get_bake_interval");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bake_interval", PROPERTY_HINT_RANGE, "0.01,512,0.01"), "set_bake_interval", "get_bake_interval");
ADD_PROPERTY(PropertyInfo(Variant::INT, "_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_data", "_get_data");
}
@@ -1445,7 +1445,7 @@ PackedVector3Array Curve3D::get_baked_points() const {
return baked_point_cache;
}
-PackedRealArray Curve3D::get_baked_tilts() const {
+PackedFloat32Array Curve3D::get_baked_tilts() const {
if (baked_cache_dirty)
_bake();
@@ -1567,7 +1567,7 @@ Dictionary Curve3D::_get_data() const {
PackedVector3Array d;
d.resize(points.size() * 3);
Vector3 *w = d.ptrw();
- PackedRealArray t;
+ PackedFloat32Array t;
t.resize(points.size());
real_t *wt = t.ptrw();
@@ -1594,7 +1594,7 @@ void Curve3D::_set_data(const Dictionary &p_data) {
ERR_FAIL_COND(pc % 3 != 0);
points.resize(pc / 3);
const Vector3 *r = rp.ptr();
- PackedRealArray rtl = p_data["tilts"];
+ PackedFloat32Array rtl = p_data["tilts"];
const real_t *rt = rtl.ptr();
for (int i = 0; i < points.size(); i++) {
@@ -1682,7 +1682,7 @@ void Curve3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("_get_data"), &Curve3D::_get_data);
ClassDB::bind_method(D_METHOD("_set_data"), &Curve3D::_set_data);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "bake_interval", PROPERTY_HINT_RANGE, "0.01,512,0.01"), "set_bake_interval", "get_bake_interval");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bake_interval", PROPERTY_HINT_RANGE, "0.01,512,0.01"), "set_bake_interval", "get_bake_interval");
ADD_PROPERTY(PropertyInfo(Variant::INT, "_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_data", "_get_data");
ADD_GROUP("Up Vector", "up_vector_");
diff --git a/scene/resources/curve.h b/scene/resources/curve.h
index 91b744f302..7dcbf1ceff 100644
--- a/scene/resources/curve.h
+++ b/scene/resources/curve.h
@@ -235,7 +235,7 @@ class Curve3D : public Resource {
mutable bool baked_cache_dirty;
mutable PackedVector3Array baked_point_cache;
- mutable PackedRealArray baked_tilt_cache;
+ mutable PackedFloat32Array baked_tilt_cache;
mutable PackedVector3Array baked_up_vector_cache;
mutable float baked_max_ofs;
@@ -278,7 +278,7 @@ public:
float interpolate_baked_tilt(float p_offset) const;
Vector3 interpolate_baked_up_vector(float p_offset, bool p_apply_tilt = false) const;
PackedVector3Array get_baked_points() const; //useful for going through
- PackedRealArray get_baked_tilts() const; //useful for going through
+ PackedFloat32Array get_baked_tilts() const; //useful for going through
PackedVector3Array get_baked_up_vectors() const;
Vector3 get_closest_point(const Vector3 &p_to_point) const;
float get_closest_offset(const Vector3 &p_to_point) const;
diff --git a/scene/resources/cylinder_shape.cpp b/scene/resources/cylinder_shape.cpp
index b9b0d77a1b..53d368d32a 100644
--- a/scene/resources/cylinder_shape.cpp
+++ b/scene/resources/cylinder_shape.cpp
@@ -108,8 +108,8 @@ void CylinderShape::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_height", "height"), &CylinderShape::set_height);
ClassDB::bind_method(D_METHOD("get_height"), &CylinderShape::get_height);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.01,4096,0.01"), "set_radius", "get_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_RANGE, "0.01,4096,0.01"), "set_height", "get_height");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.01,4096,0.01"), "set_radius", "get_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "0.01,4096,0.01"), "set_height", "get_height");
}
CylinderShape::CylinderShape() :
diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp
index 12b2bf4bc9..d407dd3722 100644
--- a/scene/resources/environment.cpp
+++ b/scene/resources/environment.cpp
@@ -870,16 +870,16 @@ void Environment::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "background_canvas_max_layer", PROPERTY_HINT_RANGE, "-1000,1000,1"), "set_canvas_max_layer", "get_canvas_max_layer");
ADD_PROPERTY(PropertyInfo(Variant::INT, "background_camera_feed_id", PROPERTY_HINT_RANGE, "1,10,1"), "set_camera_feed_id", "get_camera_feed_id");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "background_color"), "set_bg_color", "get_bg_color");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "background_energy", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_bg_energy", "get_bg_energy");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "background_energy", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_bg_energy", "get_bg_energy");
ADD_GROUP("Sky", "sky_");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "sky", PROPERTY_HINT_RESOURCE_TYPE, "Sky"), "set_sky", "get_sky");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "sky_custom_fov", PROPERTY_HINT_RANGE, "0,180,0.1"), "set_sky_custom_fov", "get_sky_custom_fov");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sky_custom_fov", PROPERTY_HINT_RANGE, "0,180,0.1"), "set_sky_custom_fov", "get_sky_custom_fov");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "sky_rotation"), "set_sky_rotation", "get_sky_rotation");
ADD_GROUP("Ambient Light", "ambient_light_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "ambient_light_source", PROPERTY_HINT_ENUM, "Background,Disabled,Color,Sky"), "set_ambient_source", "get_ambient_source");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "ambient_light_color"), "set_ambient_light_color", "get_ambient_light_color");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ambient_light_sky_contribution", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_ambient_light_sky_contribution", "get_ambient_light_sky_contribution");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ambient_light_energy", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_ambient_light_energy", "get_ambient_light_energy");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ambient_light_sky_contribution", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_ambient_light_sky_contribution", "get_ambient_light_sky_contribution");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ambient_light_energy", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_ambient_light_energy", "get_ambient_light_energy");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "ambient_light_occlusion_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_ao_color", "get_ao_color");
ADD_GROUP("Reflected Light", "reflected_light_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "reflected_light_source", PROPERTY_HINT_ENUM, "Background,Disabled,Sky"), "set_reflection_source", "get_reflection_source");
@@ -930,17 +930,17 @@ void Environment::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fog_enabled"), "set_fog_enabled", "is_fog_enabled");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "fog_color"), "set_fog_color", "get_fog_color");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "fog_sun_color"), "set_fog_sun_color", "get_fog_sun_color");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "fog_sun_amount", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_fog_sun_amount", "get_fog_sun_amount");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fog_sun_amount", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_fog_sun_amount", "get_fog_sun_amount");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fog_depth_enabled"), "set_fog_depth_enabled", "is_fog_depth_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "fog_depth_begin", PROPERTY_HINT_RANGE, "0,4000,0.1"), "set_fog_depth_begin", "get_fog_depth_begin");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "fog_depth_end", PROPERTY_HINT_RANGE, "0,4000,0.1,or_greater"), "set_fog_depth_end", "get_fog_depth_end");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "fog_depth_curve", PROPERTY_HINT_EXP_EASING), "set_fog_depth_curve", "get_fog_depth_curve");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fog_depth_begin", PROPERTY_HINT_RANGE, "0,4000,0.1"), "set_fog_depth_begin", "get_fog_depth_begin");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fog_depth_end", PROPERTY_HINT_RANGE, "0,4000,0.1,or_greater"), "set_fog_depth_end", "get_fog_depth_end");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fog_depth_curve", PROPERTY_HINT_EXP_EASING), "set_fog_depth_curve", "get_fog_depth_curve");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fog_transmit_enabled"), "set_fog_transmit_enabled", "is_fog_transmit_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "fog_transmit_curve", PROPERTY_HINT_EXP_EASING), "set_fog_transmit_curve", "get_fog_transmit_curve");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fog_transmit_curve", PROPERTY_HINT_EXP_EASING), "set_fog_transmit_curve", "get_fog_transmit_curve");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fog_height_enabled"), "set_fog_height_enabled", "is_fog_height_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "fog_height_min", PROPERTY_HINT_RANGE, "-4000,4000,0.1,or_lesser,or_greater"), "set_fog_height_min", "get_fog_height_min");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "fog_height_max", PROPERTY_HINT_RANGE, "-4000,4000,0.1,or_lesser,or_greater"), "set_fog_height_max", "get_fog_height_max");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "fog_height_curve", PROPERTY_HINT_EXP_EASING), "set_fog_height_curve", "get_fog_height_curve");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fog_height_min", PROPERTY_HINT_RANGE, "-4000,4000,0.1,or_lesser,or_greater"), "set_fog_height_min", "get_fog_height_min");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fog_height_max", PROPERTY_HINT_RANGE, "-4000,4000,0.1,or_lesser,or_greater"), "set_fog_height_max", "get_fog_height_max");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fog_height_curve", PROPERTY_HINT_EXP_EASING), "set_fog_height_curve", "get_fog_height_curve");
ClassDB::bind_method(D_METHOD("set_tonemapper", "mode"), &Environment::set_tonemapper);
ClassDB::bind_method(D_METHOD("get_tonemapper"), &Environment::get_tonemapper);
@@ -968,14 +968,14 @@ void Environment::_bind_methods() {
ADD_GROUP("Tonemap", "tonemap_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "tonemap_mode", PROPERTY_HINT_ENUM, "Linear,Reinhard,Filmic,Aces"), "set_tonemapper", "get_tonemapper");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "tonemap_exposure", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_tonemap_exposure", "get_tonemap_exposure");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "tonemap_white", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_tonemap_white", "get_tonemap_white");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "tonemap_exposure", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_tonemap_exposure", "get_tonemap_exposure");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "tonemap_white", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_tonemap_white", "get_tonemap_white");
ADD_GROUP("Auto Exposure", "auto_exposure_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "auto_exposure_enabled"), "set_tonemap_auto_exposure", "get_tonemap_auto_exposure");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "auto_exposure_scale", PROPERTY_HINT_RANGE, "0.01,64,0.01"), "set_tonemap_auto_exposure_grey", "get_tonemap_auto_exposure_grey");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "auto_exposure_min_luma", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_tonemap_auto_exposure_min", "get_tonemap_auto_exposure_min");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "auto_exposure_max_luma", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_tonemap_auto_exposure_max", "get_tonemap_auto_exposure_max");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "auto_exposure_speed", PROPERTY_HINT_RANGE, "0.01,64,0.01"), "set_tonemap_auto_exposure_speed", "get_tonemap_auto_exposure_speed");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "auto_exposure_scale", PROPERTY_HINT_RANGE, "0.01,64,0.01"), "set_tonemap_auto_exposure_grey", "get_tonemap_auto_exposure_grey");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "auto_exposure_min_luma", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_tonemap_auto_exposure_min", "get_tonemap_auto_exposure_min");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "auto_exposure_max_luma", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_tonemap_auto_exposure_max", "get_tonemap_auto_exposure_max");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "auto_exposure_speed", PROPERTY_HINT_RANGE, "0.01,64,0.01"), "set_tonemap_auto_exposure_speed", "get_tonemap_auto_exposure_speed");
ClassDB::bind_method(D_METHOD("set_ssr_enabled", "enabled"), &Environment::set_ssr_enabled);
ClassDB::bind_method(D_METHOD("is_ssr_enabled"), &Environment::is_ssr_enabled);
@@ -998,9 +998,9 @@ void Environment::_bind_methods() {
ADD_GROUP("SS Reflections", "ss_reflections_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "ss_reflections_enabled"), "set_ssr_enabled", "is_ssr_enabled");
ADD_PROPERTY(PropertyInfo(Variant::INT, "ss_reflections_max_steps", PROPERTY_HINT_RANGE, "1,512,1"), "set_ssr_max_steps", "get_ssr_max_steps");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ss_reflections_fade_in", PROPERTY_HINT_EXP_EASING), "set_ssr_fade_in", "get_ssr_fade_in");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ss_reflections_fade_out", PROPERTY_HINT_EXP_EASING), "set_ssr_fade_out", "get_ssr_fade_out");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ss_reflections_depth_tolerance", PROPERTY_HINT_RANGE, "0.1,128,0.1"), "set_ssr_depth_tolerance", "get_ssr_depth_tolerance");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ss_reflections_fade_in", PROPERTY_HINT_EXP_EASING), "set_ssr_fade_in", "get_ssr_fade_in");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ss_reflections_fade_out", PROPERTY_HINT_EXP_EASING), "set_ssr_fade_out", "get_ssr_fade_out");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ss_reflections_depth_tolerance", PROPERTY_HINT_RANGE, "0.1,128,0.1"), "set_ssr_depth_tolerance", "get_ssr_depth_tolerance");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "ss_reflections_roughness"), "set_ssr_rough", "is_ssr_rough");
ClassDB::bind_method(D_METHOD("set_ssao_enabled", "enabled"), &Environment::set_ssao_enabled);
@@ -1029,13 +1029,13 @@ void Environment::_bind_methods() {
ADD_GROUP("SSAO", "ssao_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "ssao_enabled"), "set_ssao_enabled", "is_ssao_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_radius", PROPERTY_HINT_RANGE, "0.1,128,0.1"), "set_ssao_radius", "get_ssao_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_intensity", PROPERTY_HINT_RANGE, "0.0,128,0.1"), "set_ssao_intensity", "get_ssao_intensity");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_bias", PROPERTY_HINT_RANGE, "0.001,8,0.001"), "set_ssao_bias", "get_ssao_bias");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_light_affect", PROPERTY_HINT_RANGE, "0.00,1,0.01"), "set_ssao_direct_light_affect", "get_ssao_direct_light_affect");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_ao_channel_affect", PROPERTY_HINT_RANGE, "0.00,1,0.01"), "set_ssao_ao_channel_affect", "get_ssao_ao_channel_affect");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ssao_radius", PROPERTY_HINT_RANGE, "0.1,128,0.1"), "set_ssao_radius", "get_ssao_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ssao_intensity", PROPERTY_HINT_RANGE, "0.0,128,0.1"), "set_ssao_intensity", "get_ssao_intensity");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ssao_bias", PROPERTY_HINT_RANGE, "0.001,8,0.001"), "set_ssao_bias", "get_ssao_bias");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ssao_light_affect", PROPERTY_HINT_RANGE, "0.00,1,0.01"), "set_ssao_direct_light_affect", "get_ssao_direct_light_affect");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ssao_ao_channel_affect", PROPERTY_HINT_RANGE, "0.00,1,0.01"), "set_ssao_ao_channel_affect", "get_ssao_ao_channel_affect");
ADD_PROPERTY(PropertyInfo(Variant::INT, "ssao_blur", PROPERTY_HINT_ENUM, "Disabled,1x1,2x2,3x3"), "set_ssao_blur", "get_ssao_blur");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_edge_sharpness", PROPERTY_HINT_RANGE, "0,32,0.01"), "set_ssao_edge_sharpness", "get_ssao_edge_sharpness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ssao_edge_sharpness", PROPERTY_HINT_RANGE, "0,32,0.01"), "set_ssao_edge_sharpness", "get_ssao_edge_sharpness");
ClassDB::bind_method(D_METHOD("set_glow_enabled", "enabled"), &Environment::set_glow_enabled);
ClassDB::bind_method(D_METHOD("is_glow_enabled"), &Environment::is_glow_enabled);
@@ -1080,14 +1080,14 @@ void Environment::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "glow_levels/6"), "set_glow_level", "is_glow_level_enabled", 5);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "glow_levels/7"), "set_glow_level", "is_glow_level_enabled", 6);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "glow_intensity", PROPERTY_HINT_RANGE, "0.0,8.0,0.01"), "set_glow_intensity", "get_glow_intensity");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "glow_mix", PROPERTY_HINT_RANGE, "0.0,1.0,0.001"), "set_glow_mix", "get_glow_mix");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "glow_strength", PROPERTY_HINT_RANGE, "0.0,2.0,0.01"), "set_glow_strength", "get_glow_strength");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "glow_bloom", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_glow_bloom", "get_glow_bloom");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "glow_intensity", PROPERTY_HINT_RANGE, "0.0,8.0,0.01"), "set_glow_intensity", "get_glow_intensity");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "glow_mix", PROPERTY_HINT_RANGE, "0.0,1.0,0.001"), "set_glow_mix", "get_glow_mix");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "glow_strength", PROPERTY_HINT_RANGE, "0.0,2.0,0.01"), "set_glow_strength", "get_glow_strength");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "glow_bloom", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_glow_bloom", "get_glow_bloom");
ADD_PROPERTY(PropertyInfo(Variant::INT, "glow_blend_mode", PROPERTY_HINT_ENUM, "Additive,Screen,Softlight,Replace,Mix"), "set_glow_blend_mode", "get_glow_blend_mode");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "glow_hdr_threshold", PROPERTY_HINT_RANGE, "0.0,4.0,0.01"), "set_glow_hdr_bleed_threshold", "get_glow_hdr_bleed_threshold");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "glow_hdr_luminance_cap", PROPERTY_HINT_RANGE, "0.0,256.0,0.01"), "set_glow_hdr_luminance_cap", "get_glow_hdr_luminance_cap");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "glow_hdr_scale", PROPERTY_HINT_RANGE, "0.0,4.0,0.01"), "set_glow_hdr_bleed_scale", "get_glow_hdr_bleed_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "glow_hdr_threshold", PROPERTY_HINT_RANGE, "0.0,4.0,0.01"), "set_glow_hdr_bleed_threshold", "get_glow_hdr_bleed_threshold");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "glow_hdr_luminance_cap", PROPERTY_HINT_RANGE, "0.0,256.0,0.01"), "set_glow_hdr_luminance_cap", "get_glow_hdr_luminance_cap");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "glow_hdr_scale", PROPERTY_HINT_RANGE, "0.0,4.0,0.01"), "set_glow_hdr_bleed_scale", "get_glow_hdr_bleed_scale");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "glow_bicubic_upscale"), "set_glow_bicubic_upscale", "is_glow_bicubic_upscale_enabled");
ClassDB::bind_method(D_METHOD("set_adjustment_enable", "enabled"), &Environment::set_adjustment_enable);
@@ -1107,9 +1107,9 @@ void Environment::_bind_methods() {
ADD_GROUP("Adjustments", "adjustment_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "adjustment_enabled"), "set_adjustment_enable", "is_adjustment_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "adjustment_brightness", PROPERTY_HINT_RANGE, "0.01,8,0.01"), "set_adjustment_brightness", "get_adjustment_brightness");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "adjustment_contrast", PROPERTY_HINT_RANGE, "0.01,8,0.01"), "set_adjustment_contrast", "get_adjustment_contrast");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "adjustment_saturation", PROPERTY_HINT_RANGE, "0.01,8,0.01"), "set_adjustment_saturation", "get_adjustment_saturation");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "adjustment_brightness", PROPERTY_HINT_RANGE, "0.01,8,0.01"), "set_adjustment_brightness", "get_adjustment_brightness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "adjustment_contrast", PROPERTY_HINT_RANGE, "0.01,8,0.01"), "set_adjustment_contrast", "get_adjustment_contrast");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "adjustment_saturation", PROPERTY_HINT_RANGE, "0.01,8,0.01"), "set_adjustment_saturation", "get_adjustment_saturation");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "adjustment_color_correction", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_adjustment_color_correction", "get_adjustment_color_correction");
BIND_ENUM_CONSTANT(BG_CLEAR_COLOR);
@@ -1369,15 +1369,15 @@ void CameraEffects::_bind_methods() {
ADD_GROUP("DOF Blur", "dof_blur_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "dof_blur_far_enabled"), "set_dof_blur_far_enabled", "is_dof_blur_far_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "dof_blur_far_distance", PROPERTY_HINT_EXP_RANGE, "0.01,8192,0.01"), "set_dof_blur_far_distance", "get_dof_blur_far_distance");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "dof_blur_far_transition", PROPERTY_HINT_EXP_RANGE, "0.01,8192,0.01"), "set_dof_blur_far_transition", "get_dof_blur_far_transition");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dof_blur_far_distance", PROPERTY_HINT_EXP_RANGE, "0.01,8192,0.01"), "set_dof_blur_far_distance", "get_dof_blur_far_distance");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dof_blur_far_transition", PROPERTY_HINT_EXP_RANGE, "0.01,8192,0.01"), "set_dof_blur_far_transition", "get_dof_blur_far_transition");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "dof_blur_near_enabled"), "set_dof_blur_near_enabled", "is_dof_blur_near_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "dof_blur_near_distance", PROPERTY_HINT_EXP_RANGE, "0.01,8192,0.01"), "set_dof_blur_near_distance", "get_dof_blur_near_distance");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "dof_blur_near_transition", PROPERTY_HINT_EXP_RANGE, "0.01,8192,0.01"), "set_dof_blur_near_transition", "get_dof_blur_near_transition");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "dof_blur_amount", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_dof_blur_amount", "get_dof_blur_amount");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dof_blur_near_distance", PROPERTY_HINT_EXP_RANGE, "0.01,8192,0.01"), "set_dof_blur_near_distance", "get_dof_blur_near_distance");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dof_blur_near_transition", PROPERTY_HINT_EXP_RANGE, "0.01,8192,0.01"), "set_dof_blur_near_transition", "get_dof_blur_near_transition");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dof_blur_amount", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_dof_blur_amount", "get_dof_blur_amount");
ADD_GROUP("Override Exposure", "override_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "override_exposure_enable"), "set_override_exposure_enabled", "is_override_exposure_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "override_exposure", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_override_exposure", "get_override_exposure");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "override_exposure", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_override_exposure", "get_override_exposure");
}
CameraEffects::CameraEffects() {
diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp
index e890ff13a6..316d6f04d7 100644
--- a/scene/resources/font.cpp
+++ b/scene/resources/font.cpp
@@ -625,11 +625,11 @@ void BitmapFont::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_fallback"), &BitmapFont::get_fallback);
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "textures", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_textures", "_get_textures");
- ADD_PROPERTY(PropertyInfo(Variant::PACKED_INT_ARRAY, "chars", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_chars", "_get_chars");
- ADD_PROPERTY(PropertyInfo(Variant::PACKED_INT_ARRAY, "kernings", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_kernings", "_get_kernings");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_INT32_ARRAY, "chars", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_chars", "_get_chars");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_INT32_ARRAY, "kernings", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_kernings", "_get_kernings");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_RANGE, "1,1024,1"), "set_height", "get_height");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ascent", PROPERTY_HINT_RANGE, "0,1024,1"), "set_ascent", "get_ascent");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "1,1024,1"), "set_height", "get_height");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ascent", PROPERTY_HINT_RANGE, "0,1024,1"), "set_ascent", "get_ascent");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "distance_field"), "set_distance_field_hint", "is_distance_field_hint");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "fallback", PROPERTY_HINT_RESOURCE_TYPE, "BitmapFont"), "set_fallback", "get_fallback");
}
diff --git a/scene/resources/gradient.cpp b/scene/resources/gradient.cpp
index bfa3d05d2d..7bce04beaf 100644
--- a/scene/resources/gradient.cpp
+++ b/scene/resources/gradient.cpp
@@ -72,7 +72,7 @@ void Gradient::_bind_methods() {
ClassDB::bind_method(D_METHOD(COLOR_RAMP_SET_COLORS, "colors"), &Gradient::set_colors);
ClassDB::bind_method(D_METHOD(COLOR_RAMP_GET_COLORS), &Gradient::get_colors);
- ADD_PROPERTY(PropertyInfo(Variant::PACKED_REAL_ARRAY, "offsets"), COLOR_RAMP_SET_OFFSETS, COLOR_RAMP_GET_OFFSETS);
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_FLOAT32_ARRAY, "offsets"), COLOR_RAMP_SET_OFFSETS, COLOR_RAMP_GET_OFFSETS);
ADD_PROPERTY(PropertyInfo(Variant::PACKED_COLOR_ARRAY, "colors"), COLOR_RAMP_SET_COLORS, COLOR_RAMP_GET_COLORS);
}
diff --git a/scene/resources/height_map_shape.cpp b/scene/resources/height_map_shape.cpp
index 1d8483dfb4..fa45ddcabb 100644
--- a/scene/resources/height_map_shape.cpp
+++ b/scene/resources/height_map_shape.cpp
@@ -144,7 +144,7 @@ int HeightMapShape::get_map_depth() const {
return map_depth;
}
-void HeightMapShape::set_map_data(PackedRealArray p_new) {
+void HeightMapShape::set_map_data(PackedFloat32Array p_new) {
int size = (map_width * map_depth);
if (p_new.size() != size) {
// fail
@@ -174,7 +174,7 @@ void HeightMapShape::set_map_data(PackedRealArray p_new) {
_change_notify("map_data");
}
-PackedRealArray HeightMapShape::get_map_data() const {
+PackedFloat32Array HeightMapShape::get_map_data() const {
return map_data;
}
@@ -188,7 +188,7 @@ void HeightMapShape::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "map_width", PROPERTY_HINT_RANGE, "1,4096,1"), "set_map_width", "get_map_width");
ADD_PROPERTY(PropertyInfo(Variant::INT, "map_depth", PROPERTY_HINT_RANGE, "1,4096,1"), "set_map_depth", "get_map_depth");
- ADD_PROPERTY(PropertyInfo(Variant::PACKED_REAL_ARRAY, "map_data"), "set_map_data", "get_map_data");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_FLOAT32_ARRAY, "map_data"), "set_map_data", "get_map_data");
}
HeightMapShape::HeightMapShape() :
diff --git a/scene/resources/height_map_shape.h b/scene/resources/height_map_shape.h
index 7b17f9ee7b..b8204f6c98 100644
--- a/scene/resources/height_map_shape.h
+++ b/scene/resources/height_map_shape.h
@@ -38,7 +38,7 @@ class HeightMapShape : public Shape {
int map_width;
int map_depth;
- PackedRealArray map_data;
+ PackedFloat32Array map_data;
float min_height;
float max_height;
@@ -51,8 +51,8 @@ public:
int get_map_width() const;
void set_map_depth(int p_new);
int get_map_depth() const;
- void set_map_data(PackedRealArray p_new);
- PackedRealArray get_map_data() const;
+ void set_map_data(PackedFloat32Array p_new);
+ PackedFloat32Array get_map_data() const;
virtual Vector<Vector3> get_debug_mesh_lines();
virtual real_t get_enclosing_radius() const;
diff --git a/scene/resources/line_shape_2d.cpp b/scene/resources/line_shape_2d.cpp
index d1bb61820b..3b30b4528a 100644
--- a/scene/resources/line_shape_2d.cpp
+++ b/scene/resources/line_shape_2d.cpp
@@ -113,7 +113,7 @@ void LineShape2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_d"), &LineShape2D::get_d);
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "normal"), "set_normal", "get_normal");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "d"), "set_d", "get_d");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "d"), "set_d", "get_d");
}
LineShape2D::LineShape2D() :
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp
index 246b372eb0..ff51cab0a4 100644
--- a/scene/resources/material.cpp
+++ b/scene/resources/material.cpp
@@ -2223,7 +2223,7 @@ void BaseMaterial3D::_bind_methods() {
ADD_GROUP("Transparency", "");
ADD_PROPERTY(PropertyInfo(Variant::INT, "transparency", PROPERTY_HINT_ENUM, "Disabled,Alpha,AlphaScissor,DepthPrePass"), "set_transparency", "get_transparency");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "alpha_scissor_threshold", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_alpha_scissor_threshold", "get_alpha_scissor_threshold");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "alpha_scissor_threshold", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_alpha_scissor_threshold", "get_alpha_scissor_threshold");
ADD_PROPERTY(PropertyInfo(Variant::INT, "blend_mode", PROPERTY_HINT_ENUM, "Mix,Add,Sub,Mul"), "set_blend_mode", "get_blend_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "cull_mode", PROPERTY_HINT_ENUM, "Back,Front,Disabled"), "set_cull_mode", "get_cull_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "depth_draw_mode", PROPERTY_HINT_ENUM, "Opaque Only,Always,Never"), "set_depth_draw_mode", "get_depth_draw_mode");
@@ -2248,56 +2248,56 @@ void BaseMaterial3D::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "orm_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_ORM);
ADD_GROUP("Metallic", "metallic_");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "metallic", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_metallic", "get_metallic");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "metallic_specular", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_specular", "get_specular");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "metallic", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_metallic", "get_metallic");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "metallic_specular", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_specular", "get_specular");
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "metallic_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_METALLIC);
ADD_PROPERTY(PropertyInfo(Variant::INT, "metallic_texture_channel", PROPERTY_HINT_ENUM, "Red,Green,Blue,Alpha,Gray"), "set_metallic_texture_channel", "get_metallic_texture_channel");
ADD_GROUP("Roughness", "roughness_");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "roughness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_roughness", "get_roughness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "roughness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_roughness", "get_roughness");
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "roughness_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_ROUGHNESS);
ADD_PROPERTY(PropertyInfo(Variant::INT, "roughness_texture_channel", PROPERTY_HINT_ENUM, "Red,Green,Blue,Alpha,Gray"), "set_roughness_texture_channel", "get_roughness_texture_channel");
ADD_GROUP("Emission", "emission_");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "emission_enabled"), "set_feature", "get_feature", FEATURE_EMISSION);
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "emission", PROPERTY_HINT_COLOR_NO_ALPHA), "set_emission", "get_emission");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "emission_energy", PROPERTY_HINT_RANGE, "0,16,0.01,or_greater"), "set_emission_energy", "get_emission_energy");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "emission_energy", PROPERTY_HINT_RANGE, "0,16,0.01,or_greater"), "set_emission_energy", "get_emission_energy");
ADD_PROPERTY(PropertyInfo(Variant::INT, "emission_operator", PROPERTY_HINT_ENUM, "Add,Multiply"), "set_emission_operator", "get_emission_operator");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "emission_on_uv2"), "set_flag", "get_flag", FLAG_EMISSION_ON_UV2);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "emission_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_EMISSION);
ADD_GROUP("NormalMap", "normal_");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "normal_enabled"), "set_feature", "get_feature", FEATURE_NORMAL_MAPPING);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "normal_scale", PROPERTY_HINT_RANGE, "-16,16,0.01"), "set_normal_scale", "get_normal_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "normal_scale", PROPERTY_HINT_RANGE, "-16,16,0.01"), "set_normal_scale", "get_normal_scale");
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "normal_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_NORMAL);
ADD_GROUP("Rim", "rim_");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "rim_enabled"), "set_feature", "get_feature", FEATURE_RIM);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "rim", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_rim", "get_rim");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "rim_tint", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_rim_tint", "get_rim_tint");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rim", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_rim", "get_rim");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rim_tint", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_rim_tint", "get_rim_tint");
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "rim_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_RIM);
ADD_GROUP("Clearcoat", "clearcoat_");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "clearcoat_enabled"), "set_feature", "get_feature", FEATURE_CLEARCOAT);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "clearcoat", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_clearcoat", "get_clearcoat");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "clearcoat_gloss", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_clearcoat_gloss", "get_clearcoat_gloss");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "clearcoat", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_clearcoat", "get_clearcoat");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "clearcoat_gloss", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_clearcoat_gloss", "get_clearcoat_gloss");
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "clearcoat_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_CLEARCOAT);
ADD_GROUP("Anisotropy", "anisotropy_");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "anisotropy_enabled"), "set_feature", "get_feature", FEATURE_ANISOTROPY);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "anisotropy", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_anisotropy", "get_anisotropy");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "anisotropy", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_anisotropy", "get_anisotropy");
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "anisotropy_flowmap", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_FLOWMAP);
ADD_GROUP("Ambient Occlusion", "ao_");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "ao_enabled"), "set_feature", "get_feature", FEATURE_AMBIENT_OCCLUSION);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ao_light_affect", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_ao_light_affect", "get_ao_light_affect");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ao_light_affect", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_ao_light_affect", "get_ao_light_affect");
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "ao_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_AMBIENT_OCCLUSION);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "ao_on_uv2"), "set_flag", "get_flag", FLAG_AO_ON_UV2);
ADD_PROPERTY(PropertyInfo(Variant::INT, "ao_texture_channel", PROPERTY_HINT_ENUM, "Red,Green,Blue,Alpha,Gray"), "set_ao_texture_channel", "get_ao_texture_channel");
ADD_GROUP("Height", "heightmap_");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "heightmap_enabled"), "set_feature", "get_feature", FEATURE_HEIGHT_MAPPING);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "heightmap_scale", PROPERTY_HINT_RANGE, "-16,16,0.01"), "set_heightmap_scale", "get_heightmap_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "heightmap_scale", PROPERTY_HINT_RANGE, "-16,16,0.01"), "set_heightmap_scale", "get_heightmap_scale");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "heightmap_deep_parallax"), "set_heightmap_deep_parallax", "is_heightmap_deep_parallax_enabled");
ADD_PROPERTY(PropertyInfo(Variant::INT, "heightmap_min_layers", PROPERTY_HINT_RANGE, "1,32,1"), "set_heightmap_deep_parallax_min_layers", "get_heightmap_deep_parallax_min_layers");
ADD_PROPERTY(PropertyInfo(Variant::INT, "heightmap_max_layers", PROPERTY_HINT_RANGE, "1,32,1"), "set_heightmap_deep_parallax_max_layers", "get_heightmap_deep_parallax_max_layers");
@@ -2308,7 +2308,7 @@ void BaseMaterial3D::_bind_methods() {
ADD_GROUP("Subsurf Scatter", "subsurf_scatter_");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "subsurf_scatter_enabled"), "set_feature", "get_feature", FEATURE_SUBSURACE_SCATTERING);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "subsurf_scatter_strength", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_subsurface_scattering_strength", "get_subsurface_scattering_strength");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "subsurf_scatter_strength", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_subsurface_scattering_strength", "get_subsurface_scattering_strength");
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "subsurf_scatter_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_SUBSURFACE_SCATTERING);
ADD_GROUP("Transmission", "transmission_");
@@ -2318,7 +2318,7 @@ void BaseMaterial3D::_bind_methods() {
ADD_GROUP("Refraction", "refraction_");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "refraction_enabled"), "set_feature", "get_feature", FEATURE_REFRACTION);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "refraction_scale", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_refraction", "get_refraction");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "refraction_scale", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_refraction", "get_refraction");
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "refraction_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture", TEXTURE_REFRACTION);
ADD_PROPERTY(PropertyInfo(Variant::INT, "refraction_texture_channel", PROPERTY_HINT_ENUM, "Red,Green,Blue,Alpha,Gray"), "set_refraction_texture_channel", "get_refraction_texture_channel");
@@ -2334,14 +2334,14 @@ void BaseMaterial3D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "uv1_scale"), "set_uv1_scale", "get_uv1_scale");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "uv1_offset"), "set_uv1_offset", "get_uv1_offset");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "uv1_triplanar"), "set_flag", "get_flag", FLAG_UV1_USE_TRIPLANAR);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "uv1_triplanar_sharpness", PROPERTY_HINT_EXP_EASING), "set_uv1_triplanar_blend_sharpness", "get_uv1_triplanar_blend_sharpness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "uv1_triplanar_sharpness", PROPERTY_HINT_EXP_EASING), "set_uv1_triplanar_blend_sharpness", "get_uv1_triplanar_blend_sharpness");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "uv1_world_triplanar"), "set_flag", "get_flag", FLAG_UV1_USE_WORLD_TRIPLANAR);
ADD_GROUP("UV2", "uv2_");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "uv2_scale"), "set_uv2_scale", "get_uv2_scale");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "uv2_offset"), "set_uv2_offset", "get_uv2_offset");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "uv2_triplanar"), "set_flag", "get_flag", FLAG_UV2_USE_TRIPLANAR);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "uv2_triplanar_sharpness", PROPERTY_HINT_EXP_EASING), "set_uv2_triplanar_blend_sharpness", "get_uv2_triplanar_blend_sharpness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "uv2_triplanar_sharpness", PROPERTY_HINT_EXP_EASING), "set_uv2_triplanar_blend_sharpness", "get_uv2_triplanar_blend_sharpness");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "uv2_world_triplanar"), "set_flag", "get_flag", FLAG_UV2_USE_WORLD_TRIPLANAR);
ADD_GROUP("Sampling", "texture_");
@@ -2363,18 +2363,18 @@ void BaseMaterial3D::_bind_methods() {
ADD_GROUP("Grow", "grow_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "grow"), "set_grow_enabled", "is_grow_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "grow_amount", PROPERTY_HINT_RANGE, "-16,16,0.001"), "set_grow", "get_grow");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "grow_amount", PROPERTY_HINT_RANGE, "-16,16,0.001"), "set_grow", "get_grow");
ADD_GROUP("Transform", "");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "fixed_size"), "set_flag", "get_flag", FLAG_FIXED_SIZE);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "use_point_size"), "set_flag", "get_flag", FLAG_USE_POINT_SIZE);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "point_size", PROPERTY_HINT_RANGE, "0.1,128,0.1"), "set_point_size", "get_point_size");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "point_size", PROPERTY_HINT_RANGE, "0.1,128,0.1"), "set_point_size", "get_point_size");
ADD_GROUP("Proximity Fade", "proximity_fade_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "proximity_fade_enable"), "set_proximity_fade", "is_proximity_fade_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "proximity_fade_distance", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_proximity_fade_distance", "get_proximity_fade_distance");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "proximity_fade_distance", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_proximity_fade_distance", "get_proximity_fade_distance");
ADD_GROUP("Distance Fade", "distance_fade_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "distance_fade_mode", PROPERTY_HINT_ENUM, "Disabled,PixelAlpha,PixelDither,ObjectDither"), "set_distance_fade", "get_distance_fade");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "distance_fade_min_distance", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_distance_fade_min_distance", "get_distance_fade_min_distance");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "distance_fade_max_distance", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_distance_fade_max_distance", "get_distance_fade_max_distance");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "distance_fade_min_distance", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_distance_fade_min_distance", "get_distance_fade_min_distance");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "distance_fade_max_distance", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_distance_fade_max_distance", "get_distance_fade_max_distance");
BIND_ENUM_CONSTANT(TEXTURE_ALBEDO);
BIND_ENUM_CONSTANT(TEXTURE_METALLIC);
diff --git a/scene/resources/multimesh.cpp b/scene/resources/multimesh.cpp
index 85eab335de..aa8be326f5 100644
--- a/scene/resources/multimesh.cpp
+++ b/scene/resources/multimesh.cpp
@@ -350,7 +350,7 @@ void MultiMesh::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "instance_count", PROPERTY_HINT_RANGE, "0,16384,1,or_greater"), "set_instance_count", "get_instance_count");
ADD_PROPERTY(PropertyInfo(Variant::INT, "visible_instance_count", PROPERTY_HINT_RANGE, "-1,16384,1,or_greater"), "set_visible_instance_count", "get_visible_instance_count");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "mesh", PROPERTY_HINT_RESOURCE_TYPE, "Mesh"), "set_mesh", "get_mesh");
- ADD_PROPERTY(PropertyInfo(Variant::PACKED_REAL_ARRAY, "buffer", PROPERTY_HINT_NONE), "set_buffer", "get_buffer");
+ ADD_PROPERTY(PropertyInfo(Variant::PACKED_FLOAT32_ARRAY, "buffer", PROPERTY_HINT_NONE), "set_buffer", "get_buffer");
#ifndef DISABLE_DEPRECATED
// Kept for compatibility from 3.x to 4.0.
diff --git a/scene/resources/navigation_mesh.cpp b/scene/resources/navigation_mesh.cpp
index 809513c5ae..e0aff2182e 100644
--- a/scene/resources/navigation_mesh.cpp
+++ b/scene/resources/navigation_mesh.cpp
@@ -487,19 +487,19 @@ void NavigationMesh::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "geometry/source_geometry_mode", PROPERTY_HINT_ENUM, "Navmesh Children, Group With Children, Group Explicit"), "set_source_geometry_mode", "get_source_geometry_mode");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "geometry/source_group_name"), "set_source_group_name", "get_source_group_name");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "cell/size", PROPERTY_HINT_RANGE, "0.1,1.0,0.01,or_greater"), "set_cell_size", "get_cell_size");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "cell/height", PROPERTY_HINT_RANGE, "0.1,1.0,0.01,or_greater"), "set_cell_height", "get_cell_height");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "agent/height", PROPERTY_HINT_RANGE, "0.1,5.0,0.01,or_greater"), "set_agent_height", "get_agent_height");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "agent/radius", PROPERTY_HINT_RANGE, "0.1,5.0,0.01,or_greater"), "set_agent_radius", "get_agent_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "agent/max_climb", PROPERTY_HINT_RANGE, "0.1,5.0,0.01,or_greater"), "set_agent_max_climb", "get_agent_max_climb");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "agent/max_slope", PROPERTY_HINT_RANGE, "0.0,90.0,0.1"), "set_agent_max_slope", "get_agent_max_slope");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "region/min_size", PROPERTY_HINT_RANGE, "0.0,150.0,0.01,or_greater"), "set_region_min_size", "get_region_min_size");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "region/merge_size", PROPERTY_HINT_RANGE, "0.0,150.0,0.01,or_greater"), "set_region_merge_size", "get_region_merge_size");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "edge/max_length", PROPERTY_HINT_RANGE, "0.0,50.0,0.01,or_greater"), "set_edge_max_length", "get_edge_max_length");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "edge/max_error", PROPERTY_HINT_RANGE, "0.1,3.0,0.01,or_greater"), "set_edge_max_error", "get_edge_max_error");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "polygon/verts_per_poly", PROPERTY_HINT_RANGE, "3.0,12.0,1.0,or_greater"), "set_verts_per_poly", "get_verts_per_poly");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "detail/sample_distance", PROPERTY_HINT_RANGE, "0.0,16.0,0.01,or_greater"), "set_detail_sample_distance", "get_detail_sample_distance");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "detail/sample_max_error", PROPERTY_HINT_RANGE, "0.0,16.0,0.01,or_greater"), "set_detail_sample_max_error", "get_detail_sample_max_error");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "cell/size", PROPERTY_HINT_RANGE, "0.1,1.0,0.01,or_greater"), "set_cell_size", "get_cell_size");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "cell/height", PROPERTY_HINT_RANGE, "0.1,1.0,0.01,or_greater"), "set_cell_height", "get_cell_height");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "agent/height", PROPERTY_HINT_RANGE, "0.1,5.0,0.01,or_greater"), "set_agent_height", "get_agent_height");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "agent/radius", PROPERTY_HINT_RANGE, "0.1,5.0,0.01,or_greater"), "set_agent_radius", "get_agent_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "agent/max_climb", PROPERTY_HINT_RANGE, "0.1,5.0,0.01,or_greater"), "set_agent_max_climb", "get_agent_max_climb");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "agent/max_slope", PROPERTY_HINT_RANGE, "0.0,90.0,0.1"), "set_agent_max_slope", "get_agent_max_slope");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "region/min_size", PROPERTY_HINT_RANGE, "0.0,150.0,0.01,or_greater"), "set_region_min_size", "get_region_min_size");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "region/merge_size", PROPERTY_HINT_RANGE, "0.0,150.0,0.01,or_greater"), "set_region_merge_size", "get_region_merge_size");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "edge/max_length", PROPERTY_HINT_RANGE, "0.0,50.0,0.01,or_greater"), "set_edge_max_length", "get_edge_max_length");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "edge/max_error", PROPERTY_HINT_RANGE, "0.1,3.0,0.01,or_greater"), "set_edge_max_error", "get_edge_max_error");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "polygon/verts_per_poly", PROPERTY_HINT_RANGE, "3.0,12.0,1.0,or_greater"), "set_verts_per_poly", "get_verts_per_poly");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "detail/sample_distance", PROPERTY_HINT_RANGE, "0.0,16.0,0.01,or_greater"), "set_detail_sample_distance", "get_detail_sample_distance");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "detail/sample_max_error", PROPERTY_HINT_RANGE, "0.0,16.0,0.01,or_greater"), "set_detail_sample_max_error", "get_detail_sample_max_error");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "filter/low_hanging_obstacles"), "set_filter_low_hanging_obstacles", "get_filter_low_hanging_obstacles");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "filter/ledge_spans"), "set_filter_ledge_spans", "get_filter_ledge_spans");
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index 910f61b956..00910095c7 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -532,7 +532,7 @@ Error SceneState::_parse_node(Node *p_owner, Node *p_node, int p_parent_idx, Map
if (exists) {
//check if already exists and did not change
- if (value.get_type() == Variant::REAL && original.get_type() == Variant::REAL) {
+ if (value.get_type() == Variant::FLOAT && original.get_type() == Variant::FLOAT) {
//this must be done because, as some scenes save as text, there might be a tiny difference in floats due to numerical error
float a = value;
float b = original;
diff --git a/scene/resources/particles_material.cpp b/scene/resources/particles_material.cpp
index d852dca7fa..e820aec2ed 100644
--- a/scene/resources/particles_material.cpp
+++ b/scene/resources/particles_material.cpp
@@ -189,7 +189,7 @@ void ParticlesMaterial::_update_shader() {
} break;
case EMISSION_SHAPE_DIRECTED_POINTS: {
code += "uniform sampler2D emission_texture_normal : hint_black;\n";
- FALLTHROUGH;
+ [[fallthrough]];
}
case EMISSION_SHAPE_POINTS: {
code += "uniform sampler2D emission_texture_points : hint_black;\n";
@@ -1153,14 +1153,14 @@ void ParticlesMaterial::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_lifetime_randomness"), &ParticlesMaterial::get_lifetime_randomness);
ADD_GROUP("Time", "");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "lifetime_randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_lifetime_randomness", "get_lifetime_randomness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime_randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_lifetime_randomness", "get_lifetime_randomness");
ADD_GROUP("Trail", "trail_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "trail_divisor", PROPERTY_HINT_RANGE, "1,1000000,1"), "set_trail_divisor", "get_trail_divisor");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "trail_size_modifier", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_trail_size_modifier", "get_trail_size_modifier");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "trail_color_modifier", PROPERTY_HINT_RESOURCE_TYPE, "GradientTexture"), "set_trail_color_modifier", "get_trail_color_modifier");
ADD_GROUP("Emission Shape", "emission_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "emission_shape", PROPERTY_HINT_ENUM, "Point,Sphere,Box,Points,Directed Points"), "set_emission_shape", "get_emission_shape");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "emission_sphere_radius", PROPERTY_HINT_RANGE, "0.01,128,0.01,or_greater"), "set_emission_sphere_radius", "get_emission_sphere_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "emission_sphere_radius", PROPERTY_HINT_RANGE, "0.01,128,0.01,or_greater"), "set_emission_sphere_radius", "get_emission_sphere_radius");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "emission_box_extents"), "set_emission_box_extents", "get_emission_box_extents");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "emission_point_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_emission_point_texture", "get_emission_point_texture");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "emission_normal_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_emission_normal_texture", "get_emission_normal_texture");
@@ -1172,59 +1172,59 @@ void ParticlesMaterial::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "flag_disable_z"), "set_flag", "get_flag", FLAG_DISABLE_Z);
ADD_GROUP("Direction", "");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "direction"), "set_direction", "get_direction");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "spread", PROPERTY_HINT_RANGE, "0,180,0.01"), "set_spread", "get_spread");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "flatness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_flatness", "get_flatness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "spread", PROPERTY_HINT_RANGE, "0,180,0.01"), "set_spread", "get_spread");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "flatness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_flatness", "get_flatness");
ADD_GROUP("Gravity", "");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "gravity"), "set_gravity", "get_gravity");
ADD_GROUP("Initial Velocity", "initial_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "initial_velocity", PROPERTY_HINT_RANGE, "0,1000,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_INITIAL_LINEAR_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "initial_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_INITIAL_LINEAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity", PROPERTY_HINT_RANGE, "0,1000,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_INITIAL_LINEAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_INITIAL_LINEAR_VELOCITY);
ADD_GROUP("Angular Velocity", "angular_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_velocity", PROPERTY_HINT_RANGE, "-720,720,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGULAR_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGULAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_velocity", PROPERTY_HINT_RANGE, "-720,720,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGULAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGULAR_VELOCITY);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "angular_velocity_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_ANGULAR_VELOCITY);
ADD_GROUP("Orbit Velocity", "orbit_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "orbit_velocity", PROPERTY_HINT_RANGE, "-1000,1000,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ORBIT_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "orbit_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ORBIT_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "orbit_velocity", PROPERTY_HINT_RANGE, "-1000,1000,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ORBIT_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "orbit_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ORBIT_VELOCITY);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "orbit_velocity_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_ORBIT_VELOCITY);
ADD_GROUP("Linear Accel", "linear_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_LINEAR_ACCEL);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_LINEAR_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_LINEAR_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_LINEAR_ACCEL);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "linear_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_LINEAR_ACCEL);
ADD_GROUP("Radial Accel", "radial_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "radial_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_RADIAL_ACCEL);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "radial_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_RADIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "radial_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_RADIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "radial_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_RADIAL_ACCEL);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "radial_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_RADIAL_ACCEL);
ADD_GROUP("Tangential Accel", "tangential_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "tangential_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_TANGENTIAL_ACCEL);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "tangential_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_TANGENTIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "tangential_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_TANGENTIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "tangential_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_TANGENTIAL_ACCEL);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "tangential_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_TANGENTIAL_ACCEL);
ADD_GROUP("Damping", "");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "damping", PROPERTY_HINT_RANGE, "0,100,0.01,or_greater"), "set_param", "get_param", PARAM_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "damping_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "damping", PROPERTY_HINT_RANGE, "0,100,0.01,or_greater"), "set_param", "get_param", PARAM_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "damping_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_DAMPING);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "damping_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_DAMPING);
ADD_GROUP("Angle", "");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angle", PROPERTY_HINT_RANGE, "-720,720,0.1,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGLE);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angle_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGLE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angle", PROPERTY_HINT_RANGE, "-720,720,0.1,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGLE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angle_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGLE);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "angle_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_ANGLE);
ADD_GROUP("Scale", "");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "scale", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_SCALE);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "scale_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_SCALE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "scale", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_SCALE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "scale_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_SCALE);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "scale_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_SCALE);
ADD_GROUP("Color", "");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "color_ramp", PROPERTY_HINT_RESOURCE_TYPE, "GradientTexture"), "set_color_ramp", "get_color_ramp");
ADD_GROUP("Hue Variation", "hue_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "hue_variation", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_param", "get_param", PARAM_HUE_VARIATION);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "hue_variation_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_HUE_VARIATION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "hue_variation", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_param", "get_param", PARAM_HUE_VARIATION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "hue_variation_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_HUE_VARIATION);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "hue_variation_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_HUE_VARIATION);
ADD_GROUP("Animation", "anim_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_speed", PROPERTY_HINT_RANGE, "0,128,0.01,or_greater"), "set_param", "get_param", PARAM_ANIM_SPEED);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_speed_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_SPEED);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_speed", PROPERTY_HINT_RANGE, "0,128,0.01,or_greater"), "set_param", "get_param", PARAM_ANIM_SPEED);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_speed_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_SPEED);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "anim_speed_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_ANIM_SPEED);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_offset", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_ANIM_OFFSET);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "anim_offset_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_OFFSET);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_offset", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_ANIM_OFFSET);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_offset_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_OFFSET);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "anim_offset_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_ANIM_OFFSET);
BIND_ENUM_CONSTANT(PARAM_INITIAL_LINEAR_VELOCITY);
diff --git a/scene/resources/physics_material.cpp b/scene/resources/physics_material.cpp
index 0db115ecc0..8ac0191452 100644
--- a/scene/resources/physics_material.cpp
+++ b/scene/resources/physics_material.cpp
@@ -44,9 +44,9 @@ void PhysicsMaterial::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_absorbent", "absorbent"), &PhysicsMaterial::set_absorbent);
ClassDB::bind_method(D_METHOD("is_absorbent"), &PhysicsMaterial::is_absorbent);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "friction"), "set_friction", "get_friction");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "friction"), "set_friction", "get_friction");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "rough"), "set_rough", "is_rough");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "bounce"), "set_bounce", "get_bounce");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bounce"), "set_bounce", "get_bounce");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "absorbent"), "set_absorbent", "is_absorbent");
}
diff --git a/scene/resources/primitive_meshes.cpp b/scene/resources/primitive_meshes.cpp
index ea775ba028..00fc016ca1 100644
--- a/scene/resources/primitive_meshes.cpp
+++ b/scene/resources/primitive_meshes.cpp
@@ -303,19 +303,19 @@ void CapsuleMesh::_create_mesh_array(Array &p_arr) const {
v /= (rings + 1);
w = sin(0.5 * Math_PI * v);
- z = radius * cos(0.5 * Math_PI * v);
+ y = radius * cos(0.5 * Math_PI * v);
for (i = 0; i <= radial_segments; i++) {
u = i;
u /= radial_segments;
- x = sin(u * (Math_PI * 2.0));
- y = -cos(u * (Math_PI * 2.0));
+ x = -sin(u * (Math_PI * 2.0));
+ z = cos(u * (Math_PI * 2.0));
- Vector3 p = Vector3(x * radius * w, y * radius * w, z);
- points.push_back(p + Vector3(0.0, 0.0, 0.5 * mid_height));
+ Vector3 p = Vector3(x * radius * w, y, -z * radius * w);
+ points.push_back(p + Vector3(0.0, 0.5 * mid_height, 0.0));
normals.push_back(p.normalized());
- ADD_TANGENT(-y, x, 0.0, 1.0)
+ ADD_TANGENT(z, 0.0, x, 1.0)
uvs.push_back(Vector2(u, v * onethird));
point++;
@@ -341,20 +341,20 @@ void CapsuleMesh::_create_mesh_array(Array &p_arr) const {
v = j;
v /= (rings + 1);
- z = mid_height * v;
- z = (mid_height * 0.5) - z;
+ y = mid_height * v;
+ y = (mid_height * 0.5) - y;
for (i = 0; i <= radial_segments; i++) {
u = i;
u /= radial_segments;
- x = sin(u * (Math_PI * 2.0));
- y = -cos(u * (Math_PI * 2.0));
+ x = -sin(u * (Math_PI * 2.0));
+ z = cos(u * (Math_PI * 2.0));
- Vector3 p = Vector3(x * radius, y * radius, z);
+ Vector3 p = Vector3(x * radius, y, -z * radius);
points.push_back(p);
- normals.push_back(Vector3(x, y, 0.0));
- ADD_TANGENT(-y, x, 0.0, 1.0)
+ normals.push_back(Vector3(x, 0.0, -z));
+ ADD_TANGENT(z, 0.0, x, 1.0)
uvs.push_back(Vector2(u, onethird + (v * onethird)));
point++;
@@ -382,19 +382,19 @@ void CapsuleMesh::_create_mesh_array(Array &p_arr) const {
v /= (rings + 1);
v += 1.0;
w = sin(0.5 * Math_PI * v);
- z = radius * cos(0.5 * Math_PI * v);
+ y = radius * cos(0.5 * Math_PI * v);
for (i = 0; i <= radial_segments; i++) {
float u2 = i;
u2 /= radial_segments;
- x = sin(u2 * (Math_PI * 2.0));
- y = -cos(u2 * (Math_PI * 2.0));
+ x = -sin(u2 * (Math_PI * 2.0));
+ z = cos(u2 * (Math_PI * 2.0));
- Vector3 p = Vector3(x * radius * w, y * radius * w, z);
- points.push_back(p + Vector3(0.0, 0.0, -0.5 * mid_height));
+ Vector3 p = Vector3(x * radius * w, y, -z * radius * w);
+ points.push_back(p + Vector3(0.0, -0.5 * mid_height, 0.0));
normals.push_back(p.normalized());
- ADD_TANGENT(-y, x, 0.0, 1.0)
+ ADD_TANGENT(z, 0.0, x, 1.0)
uvs.push_back(Vector2(u2, twothirds + ((v - 1.0) * onethird)));
point++;
@@ -431,8 +431,8 @@ void CapsuleMesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_rings", "rings"), &CapsuleMesh::set_rings);
ClassDB::bind_method(D_METHOD("get_rings"), &CapsuleMesh::get_rings);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_radius", "get_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "mid_height", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_mid_height", "get_mid_height");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_radius", "get_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mid_height", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_mid_height", "get_mid_height");
ADD_PROPERTY(PropertyInfo(Variant::INT, "radial_segments", PROPERTY_HINT_RANGE, "1,100,1,or_greater"), "set_radial_segments", "get_radial_segments");
ADD_PROPERTY(PropertyInfo(Variant::INT, "rings", PROPERTY_HINT_RANGE, "1,100,1,or_greater"), "set_rings", "get_rings");
}
@@ -891,9 +891,9 @@ void CylinderMesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_rings", "rings"), &CylinderMesh::set_rings);
ClassDB::bind_method(D_METHOD("get_rings"), &CylinderMesh::get_rings);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "top_radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_top_radius", "get_top_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "bottom_radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_bottom_radius", "get_bottom_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_height", "get_height");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "top_radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_top_radius", "get_top_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bottom_radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_bottom_radius", "get_bottom_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_height", "get_height");
ADD_PROPERTY(PropertyInfo(Variant::INT, "radial_segments", PROPERTY_HINT_RANGE, "1,100,1,or_greater"), "set_radial_segments", "get_radial_segments");
ADD_PROPERTY(PropertyInfo(Variant::INT, "rings", PROPERTY_HINT_RANGE, "1,100,1,or_greater"), "set_rings", "get_rings");
}
@@ -1291,7 +1291,7 @@ void PrismMesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_subdivide_depth", "segments"), &PrismMesh::set_subdivide_depth);
ClassDB::bind_method(D_METHOD("get_subdivide_depth"), &PrismMesh::get_subdivide_depth);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "left_to_right", PROPERTY_HINT_RANGE, "-2.0,2.0,0.1"), "set_left_to_right", "get_left_to_right");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "left_to_right", PROPERTY_HINT_RANGE, "-2.0,2.0,0.1"), "set_left_to_right", "get_left_to_right");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "size"), "set_size", "get_size");
ADD_PROPERTY(PropertyInfo(Variant::INT, "subdivide_width", PROPERTY_HINT_RANGE, "0,100,1,or_greater"), "set_subdivide_width", "get_subdivide_width");
ADD_PROPERTY(PropertyInfo(Variant::INT, "subdivide_height", PROPERTY_HINT_RANGE, "0,100,1,or_greater"), "set_subdivide_height", "get_subdivide_height");
@@ -1515,8 +1515,8 @@ void SphereMesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_is_hemisphere", "is_hemisphere"), &SphereMesh::set_is_hemisphere);
ClassDB::bind_method(D_METHOD("get_is_hemisphere"), &SphereMesh::get_is_hemisphere);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_radius", "get_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_height", "get_height");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_radius", "get_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_height", "get_height");
ADD_PROPERTY(PropertyInfo(Variant::INT, "radial_segments", PROPERTY_HINT_RANGE, "1,100,1,or_greater"), "set_radial_segments", "get_radial_segments");
ADD_PROPERTY(PropertyInfo(Variant::INT, "rings", PROPERTY_HINT_RANGE, "1,100,1,or_greater"), "set_rings", "get_rings");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "is_hemisphere"), "set_is_hemisphere", "get_is_hemisphere");
diff --git a/scene/resources/ray_shape.cpp b/scene/resources/ray_shape.cpp
index 1a9b7e6dd2..906abaf60c 100644
--- a/scene/resources/ray_shape.cpp
+++ b/scene/resources/ray_shape.cpp
@@ -87,7 +87,7 @@ void RayShape::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_slips_on_slope", "active"), &RayShape::set_slips_on_slope);
ClassDB::bind_method(D_METHOD("get_slips_on_slope"), &RayShape::get_slips_on_slope);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "length", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_length", "get_length");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "length", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_length", "get_length");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "slips_on_slope"), "set_slips_on_slope", "get_slips_on_slope");
}
diff --git a/scene/resources/segment_shape_2d.cpp b/scene/resources/segment_shape_2d.cpp
index 3094d0f9bd..2e78a4fccf 100644
--- a/scene/resources/segment_shape_2d.cpp
+++ b/scene/resources/segment_shape_2d.cpp
@@ -154,7 +154,7 @@ void RayShape2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_slips_on_slope", "active"), &RayShape2D::set_slips_on_slope);
ClassDB::bind_method(D_METHOD("get_slips_on_slope"), &RayShape2D::get_slips_on_slope);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "length"), "set_length", "get_length");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "length"), "set_length", "get_length");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "slips_on_slope"), "set_slips_on_slope", "get_slips_on_slope");
}
diff --git a/scene/resources/shape.cpp b/scene/resources/shape.cpp
index 988ff0d4f0..4a6da18f2b 100644
--- a/scene/resources/shape.cpp
+++ b/scene/resources/shape.cpp
@@ -106,7 +106,7 @@ void Shape::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_margin", "margin"), &Shape::set_margin);
ClassDB::bind_method(D_METHOD("get_margin"), &Shape::get_margin);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "margin", PROPERTY_HINT_RANGE, "0.001,10,0.001"), "set_margin", "get_margin");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "margin", PROPERTY_HINT_RANGE, "0.001,10,0.001"), "set_margin", "get_margin");
}
Shape::Shape() :
diff --git a/scene/resources/shape_2d.cpp b/scene/resources/shape_2d.cpp
index 9e97c65a3c..64930c3117 100644
--- a/scene/resources/shape_2d.cpp
+++ b/scene/resources/shape_2d.cpp
@@ -105,7 +105,7 @@ void Shape2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("collide_and_get_contacts", "local_xform", "with_shape", "shape_xform"), &Shape2D::collide_and_get_contacts);
ClassDB::bind_method(D_METHOD("collide_with_motion_and_get_contacts", "local_xform", "local_motion", "with_shape", "shape_xform", "shape_motion"), &Shape2D::collide_with_motion_and_get_contacts);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "custom_solver_bias", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_custom_solver_bias", "get_custom_solver_bias");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "custom_solver_bias", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_custom_solver_bias", "get_custom_solver_bias");
}
Shape2D::Shape2D(const RID &p_rid) {
diff --git a/scene/resources/sky.cpp b/scene/resources/sky.cpp
index 7a54828639..54648e8af7 100644
--- a/scene/resources/sky.cpp
+++ b/scene/resources/sky.cpp
@@ -509,23 +509,23 @@ void ProceduralSky::_bind_methods() {
ADD_GROUP("Sky", "sky_");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "sky_top_color"), "set_sky_top_color", "get_sky_top_color");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "sky_horizon_color"), "set_sky_horizon_color", "get_sky_horizon_color");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "sky_curve", PROPERTY_HINT_EXP_EASING), "set_sky_curve", "get_sky_curve");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "sky_energy", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_sky_energy", "get_sky_energy");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sky_curve", PROPERTY_HINT_EXP_EASING), "set_sky_curve", "get_sky_curve");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sky_energy", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_sky_energy", "get_sky_energy");
ADD_GROUP("Ground", "ground_");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "ground_bottom_color"), "set_ground_bottom_color", "get_ground_bottom_color");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "ground_horizon_color"), "set_ground_horizon_color", "get_ground_horizon_color");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ground_curve", PROPERTY_HINT_EXP_EASING), "set_ground_curve", "get_ground_curve");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ground_energy", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_ground_energy", "get_ground_energy");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ground_curve", PROPERTY_HINT_EXP_EASING), "set_ground_curve", "get_ground_curve");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ground_energy", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_ground_energy", "get_ground_energy");
ADD_GROUP("Sun", "sun_");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "sun_color"), "set_sun_color", "get_sun_color");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "sun_latitude", PROPERTY_HINT_RANGE, "-180,180,0.01"), "set_sun_latitude", "get_sun_latitude");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "sun_longitude", PROPERTY_HINT_RANGE, "-180,180,0.01"), "set_sun_longitude", "get_sun_longitude");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "sun_angle_min", PROPERTY_HINT_RANGE, "0,360,0.01"), "set_sun_angle_min", "get_sun_angle_min");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "sun_angle_max", PROPERTY_HINT_RANGE, "0,360,0.01"), "set_sun_angle_max", "get_sun_angle_max");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "sun_curve", PROPERTY_HINT_EXP_EASING), "set_sun_curve", "get_sun_curve");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "sun_energy", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_sun_energy", "get_sun_energy");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sun_latitude", PROPERTY_HINT_RANGE, "-180,180,0.01"), "set_sun_latitude", "get_sun_latitude");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sun_longitude", PROPERTY_HINT_RANGE, "-180,180,0.01"), "set_sun_longitude", "get_sun_longitude");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sun_angle_min", PROPERTY_HINT_RANGE, "0,360,0.01"), "set_sun_angle_min", "get_sun_angle_min");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sun_angle_max", PROPERTY_HINT_RANGE, "0,360,0.01"), "set_sun_angle_max", "get_sun_angle_max");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sun_curve", PROPERTY_HINT_EXP_EASING), "set_sun_curve", "get_sun_curve");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sun_energy", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_sun_energy", "get_sun_energy");
ADD_GROUP("Texture2D", "texture_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "texture_size", PROPERTY_HINT_ENUM, "256,512,1024,2048,4096"), "set_texture_size", "get_texture_size");
diff --git a/scene/resources/sphere_shape.cpp b/scene/resources/sphere_shape.cpp
index 56121b6941..825708d1e2 100644
--- a/scene/resources/sphere_shape.cpp
+++ b/scene/resources/sphere_shape.cpp
@@ -83,7 +83,7 @@ void SphereShape::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_radius", "radius"), &SphereShape::set_radius);
ClassDB::bind_method(D_METHOD("get_radius"), &SphereShape::get_radius);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_radius", "get_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_radius", "get_radius");
}
SphereShape::SphereShape() :
diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp
index 1766b531d5..119cbcd098 100644
--- a/scene/resources/style_box.cpp
+++ b/scene/resources/style_box.cpp
@@ -104,10 +104,10 @@ void StyleBox::_bind_methods() {
ClassDB::bind_method(D_METHOD("draw", "canvas_item", "rect"), &StyleBox::draw);
ADD_GROUP("Content Margin", "content_margin_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "content_margin_left", PROPERTY_HINT_RANGE, "-1,2048,1"), "set_default_margin", "get_default_margin", MARGIN_LEFT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "content_margin_right", PROPERTY_HINT_RANGE, "-1,2048,1"), "set_default_margin", "get_default_margin", MARGIN_RIGHT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "content_margin_top", PROPERTY_HINT_RANGE, "-1,2048,1"), "set_default_margin", "get_default_margin", MARGIN_TOP);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "content_margin_bottom", PROPERTY_HINT_RANGE, "-1,2048,1"), "set_default_margin", "get_default_margin", MARGIN_BOTTOM);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "content_margin_left", PROPERTY_HINT_RANGE, "-1,2048,1"), "set_default_margin", "get_default_margin", MARGIN_LEFT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "content_margin_right", PROPERTY_HINT_RANGE, "-1,2048,1"), "set_default_margin", "get_default_margin", MARGIN_RIGHT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "content_margin_top", PROPERTY_HINT_RANGE, "-1,2048,1"), "set_default_margin", "get_default_margin", MARGIN_TOP);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "content_margin_bottom", PROPERTY_HINT_RANGE, "-1,2048,1"), "set_default_margin", "get_default_margin", MARGIN_BOTTOM);
}
StyleBox::StyleBox() {
@@ -339,15 +339,15 @@ void StyleBoxTexture::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "normal_map", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_normal_map", "get_normal_map");
ADD_PROPERTY(PropertyInfo(Variant::RECT2, "region_rect"), "set_region_rect", "get_region_rect");
ADD_GROUP("Margin", "margin_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "margin_left", PROPERTY_HINT_RANGE, "0,2048,1"), "set_margin_size", "get_margin_size", MARGIN_LEFT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "margin_right", PROPERTY_HINT_RANGE, "0,2048,1"), "set_margin_size", "get_margin_size", MARGIN_RIGHT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "margin_top", PROPERTY_HINT_RANGE, "0,2048,1"), "set_margin_size", "get_margin_size", MARGIN_TOP);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "margin_bottom", PROPERTY_HINT_RANGE, "0,2048,1"), "set_margin_size", "get_margin_size", MARGIN_BOTTOM);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "margin_left", PROPERTY_HINT_RANGE, "0,2048,1"), "set_margin_size", "get_margin_size", MARGIN_LEFT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "margin_right", PROPERTY_HINT_RANGE, "0,2048,1"), "set_margin_size", "get_margin_size", MARGIN_RIGHT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "margin_top", PROPERTY_HINT_RANGE, "0,2048,1"), "set_margin_size", "get_margin_size", MARGIN_TOP);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "margin_bottom", PROPERTY_HINT_RANGE, "0,2048,1"), "set_margin_size", "get_margin_size", MARGIN_BOTTOM);
ADD_GROUP("Expand Margin", "expand_margin_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "expand_margin_left", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin_size", "get_expand_margin_size", MARGIN_LEFT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "expand_margin_right", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin_size", "get_expand_margin_size", MARGIN_RIGHT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "expand_margin_top", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin_size", "get_expand_margin_size", MARGIN_TOP);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "expand_margin_bottom", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin_size", "get_expand_margin_size", MARGIN_BOTTOM);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "expand_margin_left", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin_size", "get_expand_margin_size", MARGIN_LEFT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "expand_margin_right", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin_size", "get_expand_margin_size", MARGIN_RIGHT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "expand_margin_top", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin_size", "get_expand_margin_size", MARGIN_TOP);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "expand_margin_bottom", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin_size", "get_expand_margin_size", MARGIN_BOTTOM);
ADD_GROUP("Axis Stretch", "axis_stretch_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "axis_stretch_horizontal", PROPERTY_HINT_ENUM, "Stretch,Tile,Tile Fit"), "set_h_axis_stretch_mode", "get_h_axis_stretch_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "axis_stretch_vertical", PROPERTY_HINT_ENUM, "Stretch,Tile,Tile Fit"), "set_v_axis_stretch_mode", "get_v_axis_stretch_mode");
@@ -933,10 +933,10 @@ void StyleBoxFlat::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "corner_detail", PROPERTY_HINT_RANGE, "1,20,1"), "set_corner_detail", "get_corner_detail");
ADD_GROUP("Expand Margin", "expand_margin_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "expand_margin_left", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin", "get_expand_margin", MARGIN_LEFT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "expand_margin_right", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin", "get_expand_margin", MARGIN_RIGHT);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "expand_margin_top", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin", "get_expand_margin", MARGIN_TOP);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "expand_margin_bottom", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin", "get_expand_margin", MARGIN_BOTTOM);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "expand_margin_left", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin", "get_expand_margin", MARGIN_LEFT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "expand_margin_right", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin", "get_expand_margin", MARGIN_RIGHT);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "expand_margin_top", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin", "get_expand_margin", MARGIN_TOP);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "expand_margin_bottom", PROPERTY_HINT_RANGE, "0,2048,1"), "set_expand_margin", "get_expand_margin", MARGIN_BOTTOM);
ADD_GROUP("Shadow", "shadow_");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "shadow_color"), "set_shadow_color", "get_shadow_color");
@@ -1035,8 +1035,8 @@ void StyleBoxLine::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_vertical"), &StyleBoxLine::is_vertical);
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "grow_begin", PROPERTY_HINT_RANGE, "-300,300,1"), "set_grow_begin", "get_grow_begin");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "grow_end", PROPERTY_HINT_RANGE, "-300,300,1"), "set_grow_end", "get_grow_end");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "grow_begin", PROPERTY_HINT_RANGE, "-300,300,1"), "set_grow_begin", "get_grow_begin");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "grow_end", PROPERTY_HINT_RANGE, "-300,300,1"), "set_grow_end", "get_grow_end");
ADD_PROPERTY(PropertyInfo(Variant::INT, "thickness", PROPERTY_HINT_RANGE, "0,10"), "set_thickness", "get_thickness");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "vertical"), "set_vertical", "is_vertical");
}
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index 160061ed05..64de19c197 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -1846,11 +1846,11 @@ void AnimatedTexture::_bind_methods() {
ClassDB::bind_method(D_METHOD("_update_proxy"), &AnimatedTexture::_update_proxy);
ADD_PROPERTY(PropertyInfo(Variant::INT, "frames", PROPERTY_HINT_RANGE, "1," + itos(MAX_FRAMES), PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), "set_frames", "get_frames");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "fps", PROPERTY_HINT_RANGE, "0,1024,0.1"), "set_fps", "get_fps");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fps", PROPERTY_HINT_RANGE, "0,1024,0.1"), "set_fps", "get_fps");
for (int i = 0; i < MAX_FRAMES; i++) {
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "frame_" + itos(i) + "/texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), "set_frame_texture", "get_frame_texture", i);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "frame_" + itos(i) + "/delay_sec", PROPERTY_HINT_RANGE, "0.0,16.0,0.01", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), "set_frame_delay", "get_frame_delay", i);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "frame_" + itos(i) + "/delay_sec", PROPERTY_HINT_RANGE, "0.0,16.0,0.01", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), "set_frame_delay", "get_frame_delay", i);
}
BIND_CONSTANT(MAX_FRAMES);
diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp
index 7383e18473..f42b56bc83 100644
--- a/scene/resources/tile_set.cpp
+++ b/scene/resources/tile_set.cpp
@@ -360,7 +360,7 @@ void TileSet::_get_property_list(List<PropertyInfo> *p_list) const {
p_list->push_back(PropertyInfo(Variant::VECTOR2, pre + "shape_transform", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR));
p_list->push_back(PropertyInfo(Variant::OBJECT, pre + "shape", PROPERTY_HINT_RESOURCE_TYPE, "Shape2D", PROPERTY_USAGE_NOEDITOR));
p_list->push_back(PropertyInfo(Variant::BOOL, pre + "shape_one_way", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR));
- p_list->push_back(PropertyInfo(Variant::REAL, pre + "shape_one_way_margin", PROPERTY_HINT_RANGE, "0,128,0.01", PROPERTY_USAGE_NOEDITOR));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, pre + "shape_one_way_margin", PROPERTY_HINT_RANGE, "0,128,0.01", PROPERTY_USAGE_NOEDITOR));
p_list->push_back(PropertyInfo(Variant::ARRAY, pre + "shapes", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR));
p_list->push_back(PropertyInfo(Variant::INT, pre + "z_index", PROPERTY_HINT_RANGE, itos(VS::CANVAS_ITEM_Z_MIN) + "," + itos(VS::CANVAS_ITEM_Z_MAX) + ",1", PROPERTY_USAGE_NOEDITOR));
}
diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp
index edd65f60e2..556d299198 100644
--- a/scene/resources/visual_shader.cpp
+++ b/scene/resources/visual_shader.cpp
@@ -32,6 +32,7 @@
#include "core/vmap.h"
#include "servers/visual/shader_types.h"
+#include "visual_shader_nodes.h"
bool VisualShaderNode::is_simple_decl() const {
return simple_decl;
@@ -127,6 +128,7 @@ void VisualShaderNode::_bind_methods() {
ADD_SIGNAL(MethodInfo("editor_refresh_request"));
BIND_ENUM_CONSTANT(PORT_TYPE_SCALAR);
+ BIND_ENUM_CONSTANT(PORT_TYPE_SCALAR_INT);
BIND_ENUM_CONSTANT(PORT_TYPE_VECTOR);
BIND_ENUM_CONSTANT(PORT_TYPE_BOOLEAN);
BIND_ENUM_CONSTANT(PORT_TYPE_TRANSFORM);
@@ -284,6 +286,49 @@ VisualShaderNodeCustom::VisualShaderNodeCustom() {
/////////////////////////////////////////////////////////
+void VisualShader::set_version(const String &p_version) {
+ version = p_version;
+}
+
+String VisualShader::get_version() const {
+ return version;
+}
+
+void VisualShader::update_version(const String &p_new_version) {
+ if (version == "") {
+ for (int i = 0; i < TYPE_MAX; i++) {
+ for (Map<int, Node>::Element *E = graph[i].nodes.front(); E; E = E->next()) {
+ Ref<VisualShaderNodeExpression> expression = Object::cast_to<VisualShaderNodeExpression>(E->get().node.ptr());
+ if (expression.is_valid()) {
+ for (int j = 0; j < expression->get_input_port_count(); j++) {
+ int type = expression->get_input_port_type(j);
+ if (type > 0) { // + PORT_TYPE_SCALAR_INT
+ type += 1;
+ }
+ expression->set_input_port_type(j, type);
+ }
+ for (int j = 0; j < expression->get_output_port_count(); j++) {
+ int type = expression->get_output_port_type(j);
+ if (type > 0) { // + PORT_TYPE_SCALAR_INT
+ type += 1;
+ }
+ expression->set_output_port_type(j, type);
+ }
+ }
+ Ref<VisualShaderNodeCompare> compare = Object::cast_to<VisualShaderNodeCompare>(E->get().node.ptr());
+ if (compare.is_valid()) {
+ int ctype = int(compare->get_comparison_type());
+ if (int(ctype) > 0) { // + PORT_TYPE_SCALAR_INT
+ ctype += 1;
+ }
+ compare->set_comparison_type(VisualShaderNodeCompare::ComparisonType(ctype));
+ }
+ }
+ }
+ }
+ set_version(p_new_version);
+}
+
void VisualShader::add_node(Type p_type, const Ref<VisualShaderNode> &p_node, const Vector2 &p_position, int p_id) {
ERR_FAIL_COND(p_node.is_null());
ERR_FAIL_COND(p_id < 2);
@@ -469,7 +514,7 @@ bool VisualShader::can_connect_nodes(Type p_type, int p_from_node, int p_from_po
}
bool VisualShader::is_port_types_compatible(int p_a, int p_b) const {
- return MAX(0, p_a - 2) == (MAX(0, p_b - 2));
+ return MAX(0, p_a - 3) == (MAX(0, p_b - 3));
}
void VisualShader::connect_nodes_forced(Type p_type, int p_from_node, int p_from_port, int p_to_node, int p_to_port) {
@@ -697,9 +742,11 @@ String VisualShader::generate_preview_shader(Type p_type, int p_node, int p_port
ERR_FAIL_COND_V(err != OK, String());
if (node->get_output_port_type(p_port) == VisualShaderNode::PORT_TYPE_SCALAR) {
- code += "\tCOLOR.rgb = vec3( n_out" + itos(p_node) + "p" + itos(p_port) + " );\n";
+ code += "\tCOLOR.rgb = vec3(n_out" + itos(p_node) + "p" + itos(p_port) + " );\n";
+ } else if (node->get_output_port_type(p_port) == VisualShaderNode::PORT_TYPE_SCALAR_INT) {
+ code += "\tCOLOR.rgb = vec3(float(n_out" + itos(p_node) + "p" + itos(p_port) + "));\n";
} else if (node->get_output_port_type(p_port) == VisualShaderNode::PORT_TYPE_BOOLEAN) {
- code += "\tCOLOR.rgb = vec3( n_out" + itos(p_node) + "p" + itos(p_port) + " ? 1.0 : 0.0 );\n";
+ code += "\tCOLOR.rgb = vec3(n_out" + itos(p_node) + "p" + itos(p_port) + " ? 1.0 : 0.0);\n";
} else {
code += "\tCOLOR.rgb = n_out" + itos(p_node) + "p" + itos(p_port) + ";\n";
}
@@ -984,8 +1031,8 @@ bool VisualShader::_get(const StringName &p_name, Variant &r_ret) const {
}
return false;
}
-void VisualShader::_get_property_list(List<PropertyInfo> *p_list) const {
+void VisualShader::_get_property_list(List<PropertyInfo> *p_list) const {
//mode
p_list->push_back(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Spatial,CanvasItem,Particles"));
//render modes
@@ -994,7 +1041,6 @@ void VisualShader::_get_property_list(List<PropertyInfo> *p_list) const {
Set<String> toggles;
for (int i = 0; i < ShaderTypes::get_singleton()->get_modes(VisualServer::ShaderMode(shader_mode)).size(); i++) {
-
String mode = ShaderTypes::get_singleton()->get_modes(VisualServer::ShaderMode(shader_mode))[i];
int idx = 0;
bool in_enum = false;
@@ -1019,7 +1065,6 @@ void VisualShader::_get_property_list(List<PropertyInfo> *p_list) const {
}
for (Map<String, String>::Element *E = blend_mode_enums.front(); E; E = E->next()) {
-
p_list->push_back(PropertyInfo(Variant::INT, "modes/" + E->key(), PROPERTY_HINT_ENUM, E->get()));
}
@@ -1049,7 +1094,7 @@ void VisualShader::_get_property_list(List<PropertyInfo> *p_list) const {
p_list->push_back(PropertyInfo(Variant::STRING, prop_name + "/expression", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR));
}
}
- p_list->push_back(PropertyInfo(Variant::PACKED_INT_ARRAY, "nodes/" + String(type_string[i]) + "/connections", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR));
+ p_list->push_back(PropertyInfo(Variant::PACKED_INT32_ARRAY, "nodes/" + String(type_string[i]) + "/connections", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR));
}
}
@@ -1112,24 +1157,40 @@ Error VisualShader::_write_node(Type type, StringBuilder &global_code, StringBui
inputs[i] = src_var;
} else if (in_type == VisualShaderNode::PORT_TYPE_SCALAR && out_type == VisualShaderNode::PORT_TYPE_VECTOR) {
inputs[i] = "dot(" + src_var + ", vec3(0.333333, 0.333333, 0.333333))";
+ } else if (in_type == VisualShaderNode::PORT_TYPE_SCALAR_INT && out_type == VisualShaderNode::PORT_TYPE_VECTOR) {
+ inputs[i] = "dot(float(" + src_var + "), vec3(0.333333, 0.333333, 0.333333))";
} else if (in_type == VisualShaderNode::PORT_TYPE_VECTOR && out_type == VisualShaderNode::PORT_TYPE_SCALAR) {
inputs[i] = "vec3(" + src_var + ")";
+ } else if (in_type == VisualShaderNode::PORT_TYPE_VECTOR && out_type == VisualShaderNode::PORT_TYPE_SCALAR_INT) {
+ inputs[i] = "vec3(float(" + src_var + "))";
} else if (in_type == VisualShaderNode::PORT_TYPE_BOOLEAN && out_type == VisualShaderNode::PORT_TYPE_VECTOR) {
inputs[i] = "all(bvec3(" + src_var + "))";
} else if (in_type == VisualShaderNode::PORT_TYPE_BOOLEAN && out_type == VisualShaderNode::PORT_TYPE_SCALAR) {
inputs[i] = src_var + " > 0.0 ? true : false";
+ } else if (in_type == VisualShaderNode::PORT_TYPE_BOOLEAN && out_type == VisualShaderNode::PORT_TYPE_SCALAR_INT) {
+ inputs[i] = src_var + " > 0 ? true : false";
} else if (in_type == VisualShaderNode::PORT_TYPE_SCALAR && out_type == VisualShaderNode::PORT_TYPE_BOOLEAN) {
inputs[i] = src_var + " ? 1.0 : 0.0";
+ } else if (in_type == VisualShaderNode::PORT_TYPE_SCALAR_INT && out_type == VisualShaderNode::PORT_TYPE_BOOLEAN) {
+ inputs[i] = src_var + " ? 1 : 0";
} else if (in_type == VisualShaderNode::PORT_TYPE_VECTOR && out_type == VisualShaderNode::PORT_TYPE_BOOLEAN) {
inputs[i] = "vec3(" + src_var + " ? 1.0 : 0.0)";
+ } else if (in_type == VisualShaderNode::PORT_TYPE_SCALAR && out_type == VisualShaderNode::PORT_TYPE_SCALAR_INT) {
+ inputs[i] = "float(" + src_var + ")";
+ } else if (in_type == VisualShaderNode::PORT_TYPE_SCALAR_INT && out_type == VisualShaderNode::PORT_TYPE_SCALAR) {
+ inputs[i] = "int(" + src_var + ")";
}
} else {
Variant defval = vsnode->get_input_port_default_value(i);
- if (defval.get_type() == Variant::REAL || defval.get_type() == Variant::INT) {
+ if (defval.get_type() == Variant::FLOAT) {
float val = defval;
inputs[i] = "n_in" + itos(node) + "p" + itos(i);
code += "\tfloat " + inputs[i] + " = " + vformat("%.5f", val) + ";\n";
+ } else if (defval.get_type() == Variant::INT) {
+ int val = defval;
+ inputs[i] = "n_in" + itos(node) + "p" + itos(i);
+ code += "\tint " + inputs[i] + " = " + itos(val) + ";\n";
} else if (defval.get_type() == Variant::BOOL) {
bool val = defval;
inputs[i] = "n_in" + itos(node) + "p" + itos(i);
@@ -1169,6 +1230,7 @@ Error VisualShader::_write_node(Type type, StringBuilder &global_code, StringBui
String var_name = "n_out" + itos(node) + "p" + itos(i);
switch (vsnode->get_output_port_type(i)) {
case VisualShaderNode::PORT_TYPE_SCALAR: outputs[i] = "float " + var_name; break;
+ case VisualShaderNode::PORT_TYPE_SCALAR_INT: outputs[i] = "int " + var_name; break;
case VisualShaderNode::PORT_TYPE_VECTOR: outputs[i] = "vec3 " + var_name; break;
case VisualShaderNode::PORT_TYPE_BOOLEAN: outputs[i] = "bool " + var_name; break;
case VisualShaderNode::PORT_TYPE_TRANSFORM: outputs[i] = "mat4 " + var_name; break;
@@ -1182,6 +1244,7 @@ Error VisualShader::_write_node(Type type, StringBuilder &global_code, StringBui
outputs[i] = "n_out" + itos(node) + "p" + itos(i);
switch (vsnode->get_output_port_type(i)) {
case VisualShaderNode::PORT_TYPE_SCALAR: code += String() + "\tfloat " + outputs[i] + ";\n"; break;
+ case VisualShaderNode::PORT_TYPE_SCALAR_INT: code += String() + "\tint " + outputs[i] + ";\n"; break;
case VisualShaderNode::PORT_TYPE_VECTOR: code += String() + "\tvec3 " + outputs[i] + ";\n"; break;
case VisualShaderNode::PORT_TYPE_BOOLEAN: code += String() + "\tbool " + outputs[i] + ";\n"; break;
case VisualShaderNode::PORT_TYPE_TRANSFORM: code += String() + "\tmat4 " + outputs[i] + ";\n"; break;
@@ -1411,6 +1474,9 @@ void VisualShader::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_node_connections", "type"), &VisualShader::_get_node_connections);
+ ClassDB::bind_method(D_METHOD("set_version", "version"), &VisualShader::set_version);
+ ClassDB::bind_method(D_METHOD("get_version"), &VisualShader::get_version);
+
ClassDB::bind_method(D_METHOD("set_graph_offset", "offset"), &VisualShader::set_graph_offset);
ClassDB::bind_method(D_METHOD("get_graph_offset"), &VisualShader::get_graph_offset);
@@ -1420,6 +1486,7 @@ void VisualShader::_bind_methods() {
ClassDB::bind_method(D_METHOD("_input_type_changed"), &VisualShader::_input_type_changed);
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "graph_offset", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_graph_offset", "get_graph_offset");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING, "version", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_version", "get_version");
BIND_ENUM_CONSTANT(TYPE_VERTEX);
BIND_ENUM_CONSTANT(TYPE_FRAGMENT);
@@ -1575,7 +1642,7 @@ const VisualShaderNodeInput::Port VisualShaderNodeInput::ports[] = {
{ Shader::MODE_PARTICLES, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_SCALAR, "delta", "DELTA" },
{ Shader::MODE_PARTICLES, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_SCALAR, "lifetime", "LIFETIME" },
- { Shader::MODE_PARTICLES, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_SCALAR, "index", "float(INDEX)" },
+ { Shader::MODE_PARTICLES, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_SCALAR_INT, "index", "INDEX" },
{ Shader::MODE_PARTICLES, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_TRANSFORM, "emission_transform", "EMISSION_TRANSFORM" },
{ Shader::MODE_PARTICLES, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_SCALAR, "time", "TIME" },
@@ -1683,17 +1750,20 @@ String VisualShaderNodeInput::generate_code(Shader::Mode p_mode, VisualShader::T
switch (get_output_port_type(0)) {
case PORT_TYPE_SCALAR: {
code = "\t" + p_output_vars[0] + " = 0.0;\n";
- } break; //default (none found) is scalar
+ } break;
+ case PORT_TYPE_SCALAR_INT: {
+ code = "\t" + p_output_vars[0] + " = 0;\n";
+ } break;
case PORT_TYPE_VECTOR: {
code = "\t" + p_output_vars[0] + " = vec3(0.0);\n";
- } break; //default (none found) is scalar
+ } break;
case PORT_TYPE_TRANSFORM: {
code = "\t" + p_output_vars[0] + " = mat4( vec4(1.0,0.0,0.0,0.0), vec4(0.0,1.0,0.0,0.0), vec4(0.0,0.0,1.0,0.0), vec4(0.0,0.0,0.0,1.0) );\n";
- } break; //default (none found) is scalar
+ } break;
case PORT_TYPE_BOOLEAN: {
code = "\t" + p_output_vars[0] + " = false;\n";
} break;
- default:
+ default: //default (none found) is scalar
break;
}
}
@@ -2625,6 +2695,9 @@ String VisualShaderNodeExpression::generate_code(Shader::Mode p_mode, VisualShad
case PORT_TYPE_SCALAR:
tk = "0.0";
break;
+ case PORT_TYPE_SCALAR_INT:
+ tk = "0";
+ break;
case PORT_TYPE_VECTOR:
tk = "vec3(0.0, 0.0, 0.0)";
break;
diff --git a/scene/resources/visual_shader.h b/scene/resources/visual_shader.h
index 1ee75a4cb7..450dcfa081 100644
--- a/scene/resources/visual_shader.h
+++ b/scene/resources/visual_shader.h
@@ -41,6 +41,10 @@ class VisualShaderNode;
class VisualShader : public Shader {
GDCLASS(VisualShader, Shader);
+ friend class VisualShaderNodeVersionChecker;
+
+ String version = "";
+
public:
enum Type {
TYPE_VERTEX,
@@ -118,6 +122,11 @@ protected:
void _get_property_list(List<PropertyInfo> *p_list) const;
public:
+ void set_version(const String &p_version);
+ String get_version() const;
+
+ void update_version(const String &p_new_version);
+
enum {
NODE_ID_INVALID = -1,
NODE_ID_OUTPUT = 0,
@@ -182,6 +191,7 @@ protected:
public:
enum PortType {
PORT_TYPE_SCALAR,
+ PORT_TYPE_SCALAR_INT,
PORT_TYPE_VECTOR,
PORT_TYPE_BOOLEAN,
PORT_TYPE_TRANSFORM,
diff --git a/scene/resources/visual_shader_nodes.cpp b/scene/resources/visual_shader_nodes.cpp
index 95a8155c31..2064ca10f3 100644
--- a/scene/resources/visual_shader_nodes.cpp
+++ b/scene/resources/visual_shader_nodes.cpp
@@ -30,66 +30,127 @@
#include "visual_shader_nodes.h"
-////////////// Scalar
+////////////// Scalar(Float)
-String VisualShaderNodeScalarConstant::get_caption() const {
- return "Scalar";
+String VisualShaderNodeFloatConstant::get_caption() const {
+ return "ScalarFloat";
}
-int VisualShaderNodeScalarConstant::get_input_port_count() const {
+int VisualShaderNodeFloatConstant::get_input_port_count() const {
return 0;
}
-VisualShaderNodeScalarConstant::PortType VisualShaderNodeScalarConstant::get_input_port_type(int p_port) const {
+VisualShaderNodeFloatConstant::PortType VisualShaderNodeFloatConstant::get_input_port_type(int p_port) const {
return PORT_TYPE_SCALAR;
}
-String VisualShaderNodeScalarConstant::get_input_port_name(int p_port) const {
+String VisualShaderNodeFloatConstant::get_input_port_name(int p_port) const {
return String();
}
-int VisualShaderNodeScalarConstant::get_output_port_count() const {
+int VisualShaderNodeFloatConstant::get_output_port_count() const {
return 1;
}
-VisualShaderNodeScalarConstant::PortType VisualShaderNodeScalarConstant::get_output_port_type(int p_port) const {
+VisualShaderNodeFloatConstant::PortType VisualShaderNodeFloatConstant::get_output_port_type(int p_port) const {
return PORT_TYPE_SCALAR;
}
-String VisualShaderNodeScalarConstant::get_output_port_name(int p_port) const {
+String VisualShaderNodeFloatConstant::get_output_port_name(int p_port) const {
return ""; //no output port means the editor will be used as port
}
-String VisualShaderNodeScalarConstant::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
+String VisualShaderNodeFloatConstant::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
return "\t" + p_output_vars[0] + " = " + vformat("%.6f", constant) + ";\n";
}
-void VisualShaderNodeScalarConstant::set_constant(float p_value) {
+void VisualShaderNodeFloatConstant::set_constant(float p_value) {
constant = p_value;
emit_changed();
}
-float VisualShaderNodeScalarConstant::get_constant() const {
+float VisualShaderNodeFloatConstant::get_constant() const {
return constant;
}
-Vector<StringName> VisualShaderNodeScalarConstant::get_editable_properties() const {
+Vector<StringName> VisualShaderNodeFloatConstant::get_editable_properties() const {
Vector<StringName> props;
props.push_back("constant");
return props;
}
-void VisualShaderNodeScalarConstant::_bind_methods() {
+void VisualShaderNodeFloatConstant::_bind_methods() {
- ClassDB::bind_method(D_METHOD("set_constant", "value"), &VisualShaderNodeScalarConstant::set_constant);
- ClassDB::bind_method(D_METHOD("get_constant"), &VisualShaderNodeScalarConstant::get_constant);
+ ClassDB::bind_method(D_METHOD("set_constant", "value"), &VisualShaderNodeFloatConstant::set_constant);
+ ClassDB::bind_method(D_METHOD("get_constant"), &VisualShaderNodeFloatConstant::get_constant);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "constant"), "set_constant", "get_constant");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "constant"), "set_constant", "get_constant");
}
-VisualShaderNodeScalarConstant::VisualShaderNodeScalarConstant() {
+VisualShaderNodeFloatConstant::VisualShaderNodeFloatConstant() {
+ constant = 0.0;
+}
+
+////////////// Scalar(Int)
+
+String VisualShaderNodeIntConstant::get_caption() const {
+ return "ScalarInt";
+}
+
+int VisualShaderNodeIntConstant::get_input_port_count() const {
+ return 0;
+}
+
+VisualShaderNodeIntConstant::PortType VisualShaderNodeIntConstant::get_input_port_type(int p_port) const {
+ return PORT_TYPE_SCALAR_INT;
+}
+
+String VisualShaderNodeIntConstant::get_input_port_name(int p_port) const {
+ return String();
+}
+
+int VisualShaderNodeIntConstant::get_output_port_count() const {
+ return 1;
+}
+
+VisualShaderNodeIntConstant::PortType VisualShaderNodeIntConstant::get_output_port_type(int p_port) const {
+ return PORT_TYPE_SCALAR_INT;
+}
+
+String VisualShaderNodeIntConstant::get_output_port_name(int p_port) const {
+ return ""; //no output port means the editor will be used as port
+}
+
+String VisualShaderNodeIntConstant::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
+ return "\t" + p_output_vars[0] + " = " + itos(constant) + ";\n";
+}
+
+void VisualShaderNodeIntConstant::set_constant(int p_value) {
+ constant = p_value;
+ emit_changed();
+}
+
+int VisualShaderNodeIntConstant::get_constant() const {
+ return constant;
+}
+
+Vector<StringName> VisualShaderNodeIntConstant::get_editable_properties() const {
+ Vector<StringName> props;
+ props.push_back("constant");
+ return props;
+}
+
+void VisualShaderNodeIntConstant::_bind_methods() {
+
+ ClassDB::bind_method(D_METHOD("set_constant", "value"), &VisualShaderNodeIntConstant::set_constant);
+ ClassDB::bind_method(D_METHOD("get_constant"), &VisualShaderNodeIntConstant::get_constant);
+
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "constant"), "set_constant", "get_constant");
+}
+
+VisualShaderNodeIntConstant::VisualShaderNodeIntConstant() {
constant = 0;
}
@@ -936,37 +997,37 @@ VisualShaderNodeCubemap::VisualShaderNodeCubemap() {
simple_decl = false;
}
-////////////// Scalar Op
+////////////// Float Op
-String VisualShaderNodeScalarOp::get_caption() const {
- return "ScalarOp";
+String VisualShaderNodeFloatOp::get_caption() const {
+ return "FloatOp";
}
-int VisualShaderNodeScalarOp::get_input_port_count() const {
+int VisualShaderNodeFloatOp::get_input_port_count() const {
return 2;
}
-VisualShaderNodeScalarOp::PortType VisualShaderNodeScalarOp::get_input_port_type(int p_port) const {
+VisualShaderNodeFloatOp::PortType VisualShaderNodeFloatOp::get_input_port_type(int p_port) const {
return PORT_TYPE_SCALAR;
}
-String VisualShaderNodeScalarOp::get_input_port_name(int p_port) const {
+String VisualShaderNodeFloatOp::get_input_port_name(int p_port) const {
return p_port == 0 ? "a" : "b";
}
-int VisualShaderNodeScalarOp::get_output_port_count() const {
+int VisualShaderNodeFloatOp::get_output_port_count() const {
return 1;
}
-VisualShaderNodeScalarOp::PortType VisualShaderNodeScalarOp::get_output_port_type(int p_port) const {
+VisualShaderNodeFloatOp::PortType VisualShaderNodeFloatOp::get_output_port_type(int p_port) const {
return PORT_TYPE_SCALAR;
}
-String VisualShaderNodeScalarOp::get_output_port_name(int p_port) const {
+String VisualShaderNodeFloatOp::get_output_port_name(int p_port) const {
return "op"; //no output port means the editor will be used as port
}
-String VisualShaderNodeScalarOp::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
+String VisualShaderNodeFloatOp::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
String code = "\t" + p_output_vars[0] + " = ";
switch (op) {
@@ -986,27 +1047,27 @@ String VisualShaderNodeScalarOp::generate_code(Shader::Mode p_mode, VisualShader
return code;
}
-void VisualShaderNodeScalarOp::set_operator(Operator p_op) {
+void VisualShaderNodeFloatOp::set_operator(Operator p_op) {
op = p_op;
emit_changed();
}
-VisualShaderNodeScalarOp::Operator VisualShaderNodeScalarOp::get_operator() const {
+VisualShaderNodeFloatOp::Operator VisualShaderNodeFloatOp::get_operator() const {
return op;
}
-Vector<StringName> VisualShaderNodeScalarOp::get_editable_properties() const {
+Vector<StringName> VisualShaderNodeFloatOp::get_editable_properties() const {
Vector<StringName> props;
props.push_back("operator");
return props;
}
-void VisualShaderNodeScalarOp::_bind_methods() {
+void VisualShaderNodeFloatOp::_bind_methods() {
- ClassDB::bind_method(D_METHOD("set_operator", "op"), &VisualShaderNodeScalarOp::set_operator);
- ClassDB::bind_method(D_METHOD("get_operator"), &VisualShaderNodeScalarOp::get_operator);
+ ClassDB::bind_method(D_METHOD("set_operator", "op"), &VisualShaderNodeFloatOp::set_operator);
+ ClassDB::bind_method(D_METHOD("get_operator"), &VisualShaderNodeFloatOp::get_operator);
ADD_PROPERTY(PropertyInfo(Variant::INT, "operator", PROPERTY_HINT_ENUM, "Add,Sub,Multiply,Divide,Remainder,Power,Max,Min,Atan2,Step"), "set_operator", "get_operator");
@@ -1022,12 +1083,97 @@ void VisualShaderNodeScalarOp::_bind_methods() {
BIND_ENUM_CONSTANT(OP_STEP);
}
-VisualShaderNodeScalarOp::VisualShaderNodeScalarOp() {
+VisualShaderNodeFloatOp::VisualShaderNodeFloatOp() {
op = OP_ADD;
set_input_port_default_value(0, 0.0);
set_input_port_default_value(1, 0.0);
}
+////////////// Integer Op
+
+String VisualShaderNodeIntOp::get_caption() const {
+ return "IntOp";
+}
+
+int VisualShaderNodeIntOp::get_input_port_count() const {
+ return 2;
+}
+
+VisualShaderNodeIntOp::PortType VisualShaderNodeIntOp::get_input_port_type(int p_port) const {
+ return PORT_TYPE_SCALAR_INT;
+}
+
+String VisualShaderNodeIntOp::get_input_port_name(int p_port) const {
+ return p_port == 0 ? "a" : "b";
+}
+
+int VisualShaderNodeIntOp::get_output_port_count() const {
+ return 1;
+}
+
+VisualShaderNodeIntOp::PortType VisualShaderNodeIntOp::get_output_port_type(int p_port) const {
+ return PORT_TYPE_SCALAR_INT;
+}
+
+String VisualShaderNodeIntOp::get_output_port_name(int p_port) const {
+ return "op"; //no output port means the editor will be used as port
+}
+
+String VisualShaderNodeIntOp::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
+
+ String code = "\t" + p_output_vars[0] + " = ";
+ switch (op) {
+
+ case OP_ADD: code += p_input_vars[0] + " + " + p_input_vars[1] + ";\n"; break;
+ case OP_SUB: code += p_input_vars[0] + " - " + p_input_vars[1] + ";\n"; break;
+ case OP_MUL: code += p_input_vars[0] + " * " + p_input_vars[1] + ";\n"; break;
+ case OP_DIV: code += p_input_vars[0] + " / " + p_input_vars[1] + ";\n"; break;
+ case OP_MOD: code += p_input_vars[0] + " % " + p_input_vars[1] + ";\n"; break;
+ case OP_MAX: code += "max(" + p_input_vars[0] + ", " + p_input_vars[1] + ");\n"; break;
+ case OP_MIN: code += "min(" + p_input_vars[0] + ", " + p_input_vars[1] + ");\n"; break;
+ }
+
+ return code;
+}
+
+void VisualShaderNodeIntOp::set_operator(Operator p_op) {
+
+ op = p_op;
+ emit_changed();
+}
+
+VisualShaderNodeIntOp::Operator VisualShaderNodeIntOp::get_operator() const {
+ return op;
+}
+
+Vector<StringName> VisualShaderNodeIntOp::get_editable_properties() const {
+ Vector<StringName> props;
+ props.push_back("operator");
+ return props;
+}
+
+void VisualShaderNodeIntOp::_bind_methods() {
+
+ ClassDB::bind_method(D_METHOD("set_operator", "op"), &VisualShaderNodeIntOp::set_operator);
+ ClassDB::bind_method(D_METHOD("get_operator"), &VisualShaderNodeIntOp::get_operator);
+
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "operator", PROPERTY_HINT_ENUM, "Add,Sub,Multiply,Divide,Remainder,Max,Min"), "set_operator", "get_operator");
+
+ BIND_ENUM_CONSTANT(OP_ADD);
+ BIND_ENUM_CONSTANT(OP_SUB);
+ BIND_ENUM_CONSTANT(OP_MUL);
+ BIND_ENUM_CONSTANT(OP_DIV);
+ BIND_ENUM_CONSTANT(OP_MOD);
+ BIND_ENUM_CONSTANT(OP_MAX);
+ BIND_ENUM_CONSTANT(OP_MIN);
+}
+
+VisualShaderNodeIntOp::VisualShaderNodeIntOp() {
+ op = OP_ADD;
+ set_input_port_default_value(0, 0);
+ set_input_port_default_value(1, 0);
+}
+
////////////// Vector Op
String VisualShaderNodeVectorOp::get_caption() const {
@@ -1462,37 +1608,37 @@ VisualShaderNodeTransformVecMult::VisualShaderNodeTransformVecMult() {
set_input_port_default_value(1, Vector3());
}
-////////////// Scalar Func
+////////////// Float Func
-String VisualShaderNodeScalarFunc::get_caption() const {
- return "ScalarFunc";
+String VisualShaderNodeFloatFunc::get_caption() const {
+ return "FloatFunc";
}
-int VisualShaderNodeScalarFunc::get_input_port_count() const {
+int VisualShaderNodeFloatFunc::get_input_port_count() const {
return 1;
}
-VisualShaderNodeScalarFunc::PortType VisualShaderNodeScalarFunc::get_input_port_type(int p_port) const {
+VisualShaderNodeFloatFunc::PortType VisualShaderNodeFloatFunc::get_input_port_type(int p_port) const {
return PORT_TYPE_SCALAR;
}
-String VisualShaderNodeScalarFunc::get_input_port_name(int p_port) const {
+String VisualShaderNodeFloatFunc::get_input_port_name(int p_port) const {
return "";
}
-int VisualShaderNodeScalarFunc::get_output_port_count() const {
+int VisualShaderNodeFloatFunc::get_output_port_count() const {
return 1;
}
-VisualShaderNodeScalarFunc::PortType VisualShaderNodeScalarFunc::get_output_port_type(int p_port) const {
+VisualShaderNodeFloatFunc::PortType VisualShaderNodeFloatFunc::get_output_port_type(int p_port) const {
return PORT_TYPE_SCALAR;
}
-String VisualShaderNodeScalarFunc::get_output_port_name(int p_port) const {
+String VisualShaderNodeFloatFunc::get_output_port_name(int p_port) const {
return ""; //no output port means the editor will be used as port
}
-String VisualShaderNodeScalarFunc::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
+String VisualShaderNodeFloatFunc::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
static const char *scalar_func_id[FUNC_ONEMINUS + 1] = {
"sin($)",
@@ -1532,27 +1678,27 @@ String VisualShaderNodeScalarFunc::generate_code(Shader::Mode p_mode, VisualShad
return "\t" + p_output_vars[0] + " = " + String(scalar_func_id[func]).replace("$", p_input_vars[0]) + ";\n";
}
-void VisualShaderNodeScalarFunc::set_function(Function p_func) {
+void VisualShaderNodeFloatFunc::set_function(Function p_func) {
func = p_func;
emit_changed();
}
-VisualShaderNodeScalarFunc::Function VisualShaderNodeScalarFunc::get_function() const {
+VisualShaderNodeFloatFunc::Function VisualShaderNodeFloatFunc::get_function() const {
return func;
}
-Vector<StringName> VisualShaderNodeScalarFunc::get_editable_properties() const {
+Vector<StringName> VisualShaderNodeFloatFunc::get_editable_properties() const {
Vector<StringName> props;
props.push_back("function");
return props;
}
-void VisualShaderNodeScalarFunc::_bind_methods() {
+void VisualShaderNodeFloatFunc::_bind_methods() {
- ClassDB::bind_method(D_METHOD("set_function", "func"), &VisualShaderNodeScalarFunc::set_function);
- ClassDB::bind_method(D_METHOD("get_function"), &VisualShaderNodeScalarFunc::get_function);
+ ClassDB::bind_method(D_METHOD("set_function", "func"), &VisualShaderNodeFloatFunc::set_function);
+ ClassDB::bind_method(D_METHOD("get_function"), &VisualShaderNodeFloatFunc::get_function);
ADD_PROPERTY(PropertyInfo(Variant::INT, "function", PROPERTY_HINT_ENUM, "Sin,Cos,Tan,ASin,ACos,ATan,SinH,CosH,TanH,Log,Exp,Sqrt,Abs,Sign,Floor,Round,Ceil,Frac,Saturate,Negate,ACosH,ASinH,ATanH,Degrees,Exp2,InverseSqrt,Log2,Radians,Reciprocal,RoundEven,Trunc,OneMinus"), "set_function", "get_function");
@@ -1590,11 +1736,108 @@ void VisualShaderNodeScalarFunc::_bind_methods() {
BIND_ENUM_CONSTANT(FUNC_ONEMINUS);
}
-VisualShaderNodeScalarFunc::VisualShaderNodeScalarFunc() {
+VisualShaderNodeFloatFunc::VisualShaderNodeFloatFunc() {
func = FUNC_SIGN;
set_input_port_default_value(0, 0.0);
}
+////////////// Int Func
+
+String VisualShaderNodeIntFunc::get_caption() const {
+ return "IntFunc";
+}
+
+int VisualShaderNodeIntFunc::get_input_port_count() const {
+ if (func == FUNC_CLAMP) {
+ return 3;
+ }
+ return 1;
+}
+
+VisualShaderNodeIntFunc::PortType VisualShaderNodeIntFunc::get_input_port_type(int p_port) const {
+ return PORT_TYPE_SCALAR_INT;
+}
+
+String VisualShaderNodeIntFunc::get_input_port_name(int p_port) const {
+ if (func == FUNC_CLAMP) {
+ if (p_port == 0) {
+ return "";
+ } else if (p_port == 1) {
+ return "min";
+ } else if (p_port == 2) {
+ return "max";
+ }
+ }
+ return "";
+}
+
+int VisualShaderNodeIntFunc::get_output_port_count() const {
+ return 1;
+}
+
+VisualShaderNodeIntFunc::PortType VisualShaderNodeIntFunc::get_output_port_type(int p_port) const {
+ return PORT_TYPE_SCALAR_INT;
+}
+
+String VisualShaderNodeIntFunc::get_output_port_name(int p_port) const {
+ return ""; //no output port means the editor will be used as port
+}
+
+String VisualShaderNodeIntFunc::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
+ if (func == FUNC_CLAMP) {
+ return "\t" + p_output_vars[0] + " = clamp(" + p_input_vars[0] + ", " + p_input_vars[1] + ", " + p_input_vars[2] + ");\n";
+ }
+
+ static const char *int_func_id[FUNC_SIGN + 1] = {
+ "abs($)",
+ "",
+ "-($)",
+ "sign($)"
+ };
+
+ return "\t" + p_output_vars[0] + " = " + String(int_func_id[func]).replace("$", p_input_vars[0]) + ";\n";
+}
+
+void VisualShaderNodeIntFunc::set_function(Function p_func) {
+ if (func != p_func) {
+ if (p_func == FUNC_CLAMP) {
+ set_input_port_default_value(1, 0);
+ set_input_port_default_value(2, 0);
+ }
+ }
+ func = p_func;
+ emit_changed();
+}
+
+VisualShaderNodeIntFunc::Function VisualShaderNodeIntFunc::get_function() const {
+
+ return func;
+}
+
+Vector<StringName> VisualShaderNodeIntFunc::get_editable_properties() const {
+ Vector<StringName> props;
+ props.push_back("function");
+ return props;
+}
+
+void VisualShaderNodeIntFunc::_bind_methods() {
+
+ ClassDB::bind_method(D_METHOD("set_function", "func"), &VisualShaderNodeIntFunc::set_function);
+ ClassDB::bind_method(D_METHOD("get_function"), &VisualShaderNodeIntFunc::get_function);
+
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "function", PROPERTY_HINT_ENUM, "Abs,Clamp,Negate,Sign"), "set_function", "get_function");
+
+ BIND_ENUM_CONSTANT(FUNC_ABS);
+ BIND_ENUM_CONSTANT(FUNC_CLAMP);
+ BIND_ENUM_CONSTANT(FUNC_NEGATE);
+ BIND_ENUM_CONSTANT(FUNC_SIGN);
+}
+
+VisualShaderNodeIntFunc::VisualShaderNodeIntFunc() {
+ func = FUNC_SIGN;
+ set_input_port_default_value(0, 0);
+}
+
////////////// Vector Func
String VisualShaderNodeVectorFunc::get_caption() const {
@@ -3008,37 +3251,37 @@ VisualShaderNodeTransformDecompose::VisualShaderNodeTransformDecompose() {
set_input_port_default_value(0, Transform());
}
-////////////// Scalar Uniform
+////////////// Float Uniform
-String VisualShaderNodeScalarUniform::get_caption() const {
- return "ScalarUniform";
+String VisualShaderNodeFloatUniform::get_caption() const {
+ return "FloatUniform";
}
-int VisualShaderNodeScalarUniform::get_input_port_count() const {
+int VisualShaderNodeFloatUniform::get_input_port_count() const {
return 0;
}
-VisualShaderNodeScalarUniform::PortType VisualShaderNodeScalarUniform::get_input_port_type(int p_port) const {
+VisualShaderNodeFloatUniform::PortType VisualShaderNodeFloatUniform::get_input_port_type(int p_port) const {
return PORT_TYPE_SCALAR;
}
-String VisualShaderNodeScalarUniform::get_input_port_name(int p_port) const {
+String VisualShaderNodeFloatUniform::get_input_port_name(int p_port) const {
return String();
}
-int VisualShaderNodeScalarUniform::get_output_port_count() const {
+int VisualShaderNodeFloatUniform::get_output_port_count() const {
return 1;
}
-VisualShaderNodeScalarUniform::PortType VisualShaderNodeScalarUniform::get_output_port_type(int p_port) const {
+VisualShaderNodeFloatUniform::PortType VisualShaderNodeFloatUniform::get_output_port_type(int p_port) const {
return PORT_TYPE_SCALAR;
}
-String VisualShaderNodeScalarUniform::get_output_port_name(int p_port) const {
+String VisualShaderNodeFloatUniform::get_output_port_name(int p_port) const {
return ""; //no output port means the editor will be used as port
}
-String VisualShaderNodeScalarUniform::generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const {
+String VisualShaderNodeFloatUniform::generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const {
if (hint == HINT_RANGE) {
return "uniform float " + get_uniform_name() + " : hint_range(" + rtos(hint_range_min) + ", " + rtos(hint_range_max) + ");\n";
} else if (hint == HINT_RANGE_STEP) {
@@ -3047,70 +3290,70 @@ String VisualShaderNodeScalarUniform::generate_global(Shader::Mode p_mode, Visua
return "uniform float " + get_uniform_name() + ";\n";
}
-String VisualShaderNodeScalarUniform::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
+String VisualShaderNodeFloatUniform::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
return "\t" + p_output_vars[0] + " = " + get_uniform_name() + ";\n";
}
-void VisualShaderNodeScalarUniform::set_hint(Hint p_hint) {
+void VisualShaderNodeFloatUniform::set_hint(Hint p_hint) {
hint = p_hint;
emit_changed();
}
-VisualShaderNodeScalarUniform::Hint VisualShaderNodeScalarUniform::get_hint() const {
+VisualShaderNodeFloatUniform::Hint VisualShaderNodeFloatUniform::get_hint() const {
return hint;
}
-void VisualShaderNodeScalarUniform::set_min(float p_value) {
+void VisualShaderNodeFloatUniform::set_min(float p_value) {
hint_range_min = p_value;
emit_changed();
}
-float VisualShaderNodeScalarUniform::get_min() const {
+float VisualShaderNodeFloatUniform::get_min() const {
return hint_range_min;
}
-void VisualShaderNodeScalarUniform::set_max(float p_value) {
+void VisualShaderNodeFloatUniform::set_max(float p_value) {
hint_range_max = p_value;
emit_changed();
}
-float VisualShaderNodeScalarUniform::get_max() const {
+float VisualShaderNodeFloatUniform::get_max() const {
return hint_range_max;
}
-void VisualShaderNodeScalarUniform::set_step(float p_value) {
+void VisualShaderNodeFloatUniform::set_step(float p_value) {
hint_range_step = p_value;
emit_changed();
}
-float VisualShaderNodeScalarUniform::get_step() const {
+float VisualShaderNodeFloatUniform::get_step() const {
return hint_range_step;
}
-void VisualShaderNodeScalarUniform::_bind_methods() {
- ClassDB::bind_method(D_METHOD("set_hint", "hint"), &VisualShaderNodeScalarUniform::set_hint);
- ClassDB::bind_method(D_METHOD("get_hint"), &VisualShaderNodeScalarUniform::get_hint);
+void VisualShaderNodeFloatUniform::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_hint", "hint"), &VisualShaderNodeFloatUniform::set_hint);
+ ClassDB::bind_method(D_METHOD("get_hint"), &VisualShaderNodeFloatUniform::get_hint);
- ClassDB::bind_method(D_METHOD("set_min", "value"), &VisualShaderNodeScalarUniform::set_min);
- ClassDB::bind_method(D_METHOD("get_min"), &VisualShaderNodeScalarUniform::get_min);
+ ClassDB::bind_method(D_METHOD("set_min", "value"), &VisualShaderNodeFloatUniform::set_min);
+ ClassDB::bind_method(D_METHOD("get_min"), &VisualShaderNodeFloatUniform::get_min);
- ClassDB::bind_method(D_METHOD("set_max", "value"), &VisualShaderNodeScalarUniform::set_max);
- ClassDB::bind_method(D_METHOD("get_max"), &VisualShaderNodeScalarUniform::get_max);
+ ClassDB::bind_method(D_METHOD("set_max", "value"), &VisualShaderNodeFloatUniform::set_max);
+ ClassDB::bind_method(D_METHOD("get_max"), &VisualShaderNodeFloatUniform::get_max);
- ClassDB::bind_method(D_METHOD("set_step", "value"), &VisualShaderNodeScalarUniform::set_step);
- ClassDB::bind_method(D_METHOD("get_step"), &VisualShaderNodeScalarUniform::get_step);
+ ClassDB::bind_method(D_METHOD("set_step", "value"), &VisualShaderNodeFloatUniform::set_step);
+ ClassDB::bind_method(D_METHOD("get_step"), &VisualShaderNodeFloatUniform::get_step);
ADD_PROPERTY(PropertyInfo(Variant::INT, "hint", PROPERTY_HINT_ENUM, "None,Range,Range+Step"), "set_hint", "get_hint");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "min"), "set_min", "get_min");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "max"), "set_max", "get_max");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "step"), "set_step", "get_step");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "min"), "set_min", "get_min");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max"), "set_max", "get_max");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "step"), "set_step", "get_step");
BIND_ENUM_CONSTANT(HINT_NONE);
BIND_ENUM_CONSTANT(HINT_RANGE);
BIND_ENUM_CONSTANT(HINT_RANGE_STEP);
}
-Vector<StringName> VisualShaderNodeScalarUniform::get_editable_properties() const {
+Vector<StringName> VisualShaderNodeFloatUniform::get_editable_properties() const {
Vector<StringName> props;
props.push_back("hint");
if (hint == HINT_RANGE || hint == HINT_RANGE_STEP) {
@@ -3123,13 +3366,135 @@ Vector<StringName> VisualShaderNodeScalarUniform::get_editable_properties() cons
return props;
}
-VisualShaderNodeScalarUniform::VisualShaderNodeScalarUniform() {
+VisualShaderNodeFloatUniform::VisualShaderNodeFloatUniform() {
hint = HINT_NONE;
hint_range_min = 0.0;
hint_range_max = 1.0;
hint_range_step = 0.1;
}
+////////////// Integer Uniform
+
+String VisualShaderNodeIntUniform::get_caption() const {
+ return "IntUniform";
+}
+
+int VisualShaderNodeIntUniform::get_input_port_count() const {
+ return 0;
+}
+
+VisualShaderNodeIntUniform::PortType VisualShaderNodeIntUniform::get_input_port_type(int p_port) const {
+ return PORT_TYPE_SCALAR_INT;
+}
+
+String VisualShaderNodeIntUniform::get_input_port_name(int p_port) const {
+ return String();
+}
+
+int VisualShaderNodeIntUniform::get_output_port_count() const {
+ return 1;
+}
+
+VisualShaderNodeIntUniform::PortType VisualShaderNodeIntUniform::get_output_port_type(int p_port) const {
+ return PORT_TYPE_SCALAR_INT;
+}
+
+String VisualShaderNodeIntUniform::get_output_port_name(int p_port) const {
+ return ""; //no output port means the editor will be used as port
+}
+
+String VisualShaderNodeIntUniform::generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const {
+ if (hint == HINT_RANGE) {
+ return "uniform int " + get_uniform_name() + " : hint_range(" + rtos(hint_range_min) + ", " + rtos(hint_range_max) + ");\n";
+ } else if (hint == HINT_RANGE_STEP) {
+ return "uniform int " + get_uniform_name() + " : hint_range(" + rtos(hint_range_min) + ", " + rtos(hint_range_max) + ", " + rtos(hint_range_step) + ");\n";
+ }
+ return "uniform int " + get_uniform_name() + ";\n";
+}
+
+String VisualShaderNodeIntUniform::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
+ return "\t" + p_output_vars[0] + " = " + get_uniform_name() + ";\n";
+}
+
+void VisualShaderNodeIntUniform::set_hint(Hint p_hint) {
+ hint = p_hint;
+ emit_changed();
+}
+
+VisualShaderNodeIntUniform::Hint VisualShaderNodeIntUniform::get_hint() const {
+ return hint;
+}
+
+void VisualShaderNodeIntUniform::set_min(int p_value) {
+ hint_range_min = p_value;
+ emit_changed();
+}
+
+int VisualShaderNodeIntUniform::get_min() const {
+ return hint_range_min;
+}
+
+void VisualShaderNodeIntUniform::set_max(int p_value) {
+ hint_range_max = p_value;
+ emit_changed();
+}
+
+int VisualShaderNodeIntUniform::get_max() const {
+ return hint_range_max;
+}
+
+void VisualShaderNodeIntUniform::set_step(int p_value) {
+ hint_range_step = p_value;
+ emit_changed();
+}
+
+int VisualShaderNodeIntUniform::get_step() const {
+ return hint_range_step;
+}
+
+void VisualShaderNodeIntUniform::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_hint", "hint"), &VisualShaderNodeIntUniform::set_hint);
+ ClassDB::bind_method(D_METHOD("get_hint"), &VisualShaderNodeIntUniform::get_hint);
+
+ ClassDB::bind_method(D_METHOD("set_min", "value"), &VisualShaderNodeIntUniform::set_min);
+ ClassDB::bind_method(D_METHOD("get_min"), &VisualShaderNodeIntUniform::get_min);
+
+ ClassDB::bind_method(D_METHOD("set_max", "value"), &VisualShaderNodeIntUniform::set_max);
+ ClassDB::bind_method(D_METHOD("get_max"), &VisualShaderNodeIntUniform::get_max);
+
+ ClassDB::bind_method(D_METHOD("set_step", "value"), &VisualShaderNodeIntUniform::set_step);
+ ClassDB::bind_method(D_METHOD("get_step"), &VisualShaderNodeIntUniform::get_step);
+
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "hint", PROPERTY_HINT_ENUM, "None,Range,Range+Step"), "set_hint", "get_hint");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "min"), "set_min", "get_min");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "max"), "set_max", "get_max");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "step"), "set_step", "get_step");
+
+ BIND_ENUM_CONSTANT(HINT_NONE);
+ BIND_ENUM_CONSTANT(HINT_RANGE);
+ BIND_ENUM_CONSTANT(HINT_RANGE_STEP);
+}
+
+Vector<StringName> VisualShaderNodeIntUniform::get_editable_properties() const {
+ Vector<StringName> props;
+ props.push_back("hint");
+ if (hint == HINT_RANGE || hint == HINT_RANGE_STEP) {
+ props.push_back("min");
+ props.push_back("max");
+ }
+ if (hint == HINT_RANGE_STEP) {
+ props.push_back("step");
+ }
+ return props;
+}
+
+VisualShaderNodeIntUniform::VisualShaderNodeIntUniform() {
+ hint = HINT_NONE;
+ hint_range_min = 0;
+ hint_range_max = 100;
+ hint_range_step = 1;
+}
+
////////////// Boolean Uniform
String VisualShaderNodeBooleanUniform::get_caption() const {
@@ -3968,6 +4333,8 @@ VisualShaderNodeCompare::PortType VisualShaderNodeCompare::get_input_port_type(i
switch (ctype) {
case CTYPE_SCALAR:
return PORT_TYPE_SCALAR;
+ case CTYPE_SCALAR_INT:
+ return PORT_TYPE_SCALAR_INT;
case CTYPE_VECTOR:
return PORT_TYPE_VECTOR;
case CTYPE_BOOLEAN:
@@ -4046,10 +4413,14 @@ String VisualShaderNodeCompare::generate_code(Shader::Mode p_mode, VisualShader:
} else if (func == FUNC_NOT_EQUAL) {
code += "\t" + p_output_vars[0] + " = !(abs(" + p_input_vars[0] + " - " + p_input_vars[1] + ") < " + p_input_vars[2] + ");";
} else {
- code += "\t" + p_output_vars[0] + " = " + (p_input_vars[0] + "$" + p_input_vars[1]).replace("$", ops[func]) + ";\n";
+ code += "\t" + p_output_vars[0] + " = " + (p_input_vars[0] + " $ " + p_input_vars[1]).replace("$", ops[func]) + ";\n";
}
break;
+ case CTYPE_SCALAR_INT:
+ code += "\t" + p_output_vars[0] + " = " + (p_input_vars[0] + " $ " + p_input_vars[1]).replace("$", ops[func]) + ";\n";
+ break;
+
case CTYPE_VECTOR:
code += "\t{\n";
code += "\t\tbvec3 _bv = " + String(funcs[func]).replace("$", p_input_vars[0] + ", " + p_input_vars[1]) + ";\n";
@@ -4085,6 +4456,11 @@ void VisualShaderNodeCompare::set_comparison_type(ComparisonType p_type) {
set_input_port_default_value(1, 0.0);
simple_decl = true;
break;
+ case CTYPE_SCALAR_INT:
+ set_input_port_default_value(0, 0);
+ set_input_port_default_value(1, 0);
+ simple_decl = true;
+ break;
case CTYPE_VECTOR:
set_input_port_default_value(0, Vector3(0.0, 0.0, 0.0));
set_input_port_default_value(1, Vector3(0.0, 0.0, 0.0));
@@ -4151,11 +4527,12 @@ void VisualShaderNodeCompare::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_condition", "condition"), &VisualShaderNodeCompare::set_condition);
ClassDB::bind_method(D_METHOD("get_condition"), &VisualShaderNodeCompare::get_condition);
- ADD_PROPERTY(PropertyInfo(Variant::INT, "type", PROPERTY_HINT_ENUM, "Scalar,Vector,Boolean,Transform"), "set_comparison_type", "get_comparison_type");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "type", PROPERTY_HINT_ENUM, "Float,Int,Vector,Boolean,Transform"), "set_comparison_type", "get_comparison_type");
ADD_PROPERTY(PropertyInfo(Variant::INT, "function", PROPERTY_HINT_ENUM, "a == b,a != b,a > b,a >= b,a < b,a <= b"), "set_function", "get_function");
ADD_PROPERTY(PropertyInfo(Variant::INT, "condition", PROPERTY_HINT_ENUM, "All,Any"), "set_condition", "get_condition");
BIND_ENUM_CONSTANT(CTYPE_SCALAR);
+ BIND_ENUM_CONSTANT(CTYPE_SCALAR_INT);
BIND_ENUM_CONSTANT(CTYPE_VECTOR);
BIND_ENUM_CONSTANT(CTYPE_BOOLEAN);
BIND_ENUM_CONSTANT(CTYPE_TRANSFORM);
diff --git a/scene/resources/visual_shader_nodes.h b/scene/resources/visual_shader_nodes.h
index 85782bc509..035e39230c 100644
--- a/scene/resources/visual_shader_nodes.h
+++ b/scene/resources/visual_shader_nodes.h
@@ -37,8 +37,8 @@
/// CONSTANTS
///////////////////////////////////////
-class VisualShaderNodeScalarConstant : public VisualShaderNode {
- GDCLASS(VisualShaderNodeScalarConstant, VisualShaderNode);
+class VisualShaderNodeFloatConstant : public VisualShaderNode {
+ GDCLASS(VisualShaderNodeFloatConstant, VisualShaderNode);
float constant;
protected:
@@ -62,7 +62,37 @@ public:
virtual Vector<StringName> get_editable_properties() const;
- VisualShaderNodeScalarConstant();
+ VisualShaderNodeFloatConstant();
+};
+
+///////////////////////////////////////
+
+class VisualShaderNodeIntConstant : public VisualShaderNode {
+ GDCLASS(VisualShaderNodeIntConstant, VisualShaderNode);
+ int constant;
+
+protected:
+ static void _bind_methods();
+
+public:
+ virtual String get_caption() const;
+
+ virtual int get_input_port_count() const;
+ virtual PortType get_input_port_type(int p_port) const;
+ virtual String get_input_port_name(int p_port) const;
+
+ virtual int get_output_port_count() const;
+ virtual PortType get_output_port_type(int p_port) const;
+ virtual String get_output_port_name(int p_port) const;
+
+ virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
+
+ void set_constant(int p_value);
+ int get_constant() const;
+
+ virtual Vector<StringName> get_editable_properties() const;
+
+ VisualShaderNodeIntConstant();
};
///////////////////////////////////////
@@ -314,8 +344,8 @@ VARIANT_ENUM_CAST(VisualShaderNodeCubemap::Source)
/// OPS
///////////////////////////////////////
-class VisualShaderNodeScalarOp : public VisualShaderNode {
- GDCLASS(VisualShaderNodeScalarOp, VisualShaderNode);
+class VisualShaderNodeFloatOp : public VisualShaderNode {
+ GDCLASS(VisualShaderNodeFloatOp, VisualShaderNode);
public:
enum Operator {
@@ -354,10 +384,52 @@ public:
virtual Vector<StringName> get_editable_properties() const;
- VisualShaderNodeScalarOp();
+ VisualShaderNodeFloatOp();
};
-VARIANT_ENUM_CAST(VisualShaderNodeScalarOp::Operator)
+VARIANT_ENUM_CAST(VisualShaderNodeFloatOp::Operator)
+
+class VisualShaderNodeIntOp : public VisualShaderNode {
+ GDCLASS(VisualShaderNodeIntOp, VisualShaderNode);
+
+public:
+ enum Operator {
+ OP_ADD,
+ OP_SUB,
+ OP_MUL,
+ OP_DIV,
+ OP_MOD,
+ OP_MAX,
+ OP_MIN,
+ };
+
+protected:
+ Operator op;
+
+ static void _bind_methods();
+
+public:
+ virtual String get_caption() const;
+
+ virtual int get_input_port_count() const;
+ virtual PortType get_input_port_type(int p_port) const;
+ virtual String get_input_port_name(int p_port) const;
+
+ virtual int get_output_port_count() const;
+ virtual PortType get_output_port_type(int p_port) const;
+ virtual String get_output_port_name(int p_port) const;
+
+ virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
+
+ void set_operator(Operator p_op);
+ Operator get_operator() const;
+
+ virtual Vector<StringName> get_editable_properties() const;
+
+ VisualShaderNodeIntOp();
+};
+
+VARIANT_ENUM_CAST(VisualShaderNodeIntOp::Operator)
class VisualShaderNodeVectorOp : public VisualShaderNode {
GDCLASS(VisualShaderNodeVectorOp, VisualShaderNode);
@@ -539,11 +611,11 @@ public:
VARIANT_ENUM_CAST(VisualShaderNodeTransformVecMult::Operator)
///////////////////////////////////////
-/// SCALAR FUNC
+/// FLOAT FUNC
///////////////////////////////////////
-class VisualShaderNodeScalarFunc : public VisualShaderNode {
- GDCLASS(VisualShaderNodeScalarFunc, VisualShaderNode);
+class VisualShaderNodeFloatFunc : public VisualShaderNode {
+ GDCLASS(VisualShaderNodeFloatFunc, VisualShaderNode);
public:
enum Function {
@@ -604,10 +676,53 @@ public:
virtual Vector<StringName> get_editable_properties() const;
- VisualShaderNodeScalarFunc();
+ VisualShaderNodeFloatFunc();
+};
+
+VARIANT_ENUM_CAST(VisualShaderNodeFloatFunc::Function)
+
+///////////////////////////////////////
+/// INT FUNC
+///////////////////////////////////////
+
+class VisualShaderNodeIntFunc : public VisualShaderNode {
+ GDCLASS(VisualShaderNodeIntFunc, VisualShaderNode);
+
+public:
+ enum Function {
+ FUNC_ABS,
+ FUNC_CLAMP,
+ FUNC_NEGATE,
+ FUNC_SIGN,
+ };
+
+protected:
+ Function func;
+
+ static void _bind_methods();
+
+public:
+ virtual String get_caption() const;
+
+ virtual int get_input_port_count() const;
+ virtual PortType get_input_port_type(int p_port) const;
+ virtual String get_input_port_name(int p_port) const;
+
+ virtual int get_output_port_count() const;
+ virtual PortType get_output_port_type(int p_port) const;
+ virtual String get_output_port_name(int p_port) const;
+
+ virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
+
+ void set_function(Function p_func);
+ Function get_function() const;
+
+ virtual Vector<StringName> get_editable_properties() const;
+
+ VisualShaderNodeIntFunc();
};
-VARIANT_ENUM_CAST(VisualShaderNodeScalarFunc::Function)
+VARIANT_ENUM_CAST(VisualShaderNodeIntFunc::Function)
///////////////////////////////////////
/// VECTOR FUNC
@@ -1297,8 +1412,8 @@ public:
/// UNIFORMS
///////////////////////////////////////
-class VisualShaderNodeScalarUniform : public VisualShaderNodeUniform {
- GDCLASS(VisualShaderNodeScalarUniform, VisualShaderNodeUniform);
+class VisualShaderNodeFloatUniform : public VisualShaderNodeUniform {
+ GDCLASS(VisualShaderNodeFloatUniform, VisualShaderNodeUniform);
public:
enum Hint {
@@ -1344,10 +1459,62 @@ public:
virtual Vector<StringName> get_editable_properties() const;
- VisualShaderNodeScalarUniform();
+ VisualShaderNodeFloatUniform();
+};
+
+VARIANT_ENUM_CAST(VisualShaderNodeFloatUniform::Hint)
+
+class VisualShaderNodeIntUniform : public VisualShaderNodeUniform {
+ GDCLASS(VisualShaderNodeIntUniform, VisualShaderNodeUniform);
+
+public:
+ enum Hint {
+ HINT_NONE,
+ HINT_RANGE,
+ HINT_RANGE_STEP,
+ };
+
+private:
+ Hint hint;
+ int hint_range_min;
+ int hint_range_max;
+ int hint_range_step;
+
+protected:
+ static void _bind_methods();
+
+public:
+ virtual String get_caption() const;
+
+ virtual int get_input_port_count() const;
+ virtual PortType get_input_port_type(int p_port) const;
+ virtual String get_input_port_name(int p_port) const;
+
+ virtual int get_output_port_count() const;
+ virtual PortType get_output_port_type(int p_port) const;
+ virtual String get_output_port_name(int p_port) const;
+
+ virtual String generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const;
+ virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
+
+ void set_hint(Hint p_hint);
+ Hint get_hint() const;
+
+ void set_min(int p_value);
+ int get_min() const;
+
+ void set_max(int p_value);
+ int get_max() const;
+
+ void set_step(int p_value);
+ int get_step() const;
+
+ virtual Vector<StringName> get_editable_properties() const;
+
+ VisualShaderNodeIntUniform();
};
-VARIANT_ENUM_CAST(VisualShaderNodeScalarUniform::Hint)
+VARIANT_ENUM_CAST(VisualShaderNodeIntUniform::Hint)
///////////////////////////////////////
@@ -1669,9 +1836,10 @@ class VisualShaderNodeCompare : public VisualShaderNode {
public:
enum ComparisonType {
CTYPE_SCALAR,
+ CTYPE_SCALAR_INT,
CTYPE_VECTOR,
CTYPE_BOOLEAN,
- CTYPE_TRANSFORM
+ CTYPE_TRANSFORM,
};
enum Function {
diff --git a/scene/resources/world.cpp b/scene/resources/world.cpp
index 78c08080b5..a7e519479f 100644
--- a/scene/resources/world.cpp
+++ b/scene/resources/world.cpp
@@ -360,9 +360,9 @@ World::World() {
PhysicsServer::get_singleton()->area_set_param(space, PhysicsServer::AREA_PARAM_GRAVITY, GLOBAL_DEF("physics/3d/default_gravity", 9.8));
PhysicsServer::get_singleton()->area_set_param(space, PhysicsServer::AREA_PARAM_GRAVITY_VECTOR, GLOBAL_DEF("physics/3d/default_gravity_vector", Vector3(0, -1, 0)));
PhysicsServer::get_singleton()->area_set_param(space, PhysicsServer::AREA_PARAM_LINEAR_DAMP, GLOBAL_DEF("physics/3d/default_linear_damp", 0.1));
- ProjectSettings::get_singleton()->set_custom_property_info("physics/3d/default_linear_damp", PropertyInfo(Variant::REAL, "physics/3d/default_linear_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"));
+ ProjectSettings::get_singleton()->set_custom_property_info("physics/3d/default_linear_damp", PropertyInfo(Variant::FLOAT, "physics/3d/default_linear_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"));
PhysicsServer::get_singleton()->area_set_param(space, PhysicsServer::AREA_PARAM_ANGULAR_DAMP, GLOBAL_DEF("physics/3d/default_angular_damp", 0.1));
- ProjectSettings::get_singleton()->set_custom_property_info("physics/3d/default_angular_damp", PropertyInfo(Variant::REAL, "physics/3d/default_angular_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"));
+ ProjectSettings::get_singleton()->set_custom_property_info("physics/3d/default_angular_damp", PropertyInfo(Variant::FLOAT, "physics/3d/default_angular_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"));
#ifdef _3D_DISABLED
indexer = NULL;
diff --git a/scene/resources/world_2d.cpp b/scene/resources/world_2d.cpp
index 5cc809d8e3..6bdc4cf6f0 100644
--- a/scene/resources/world_2d.cpp
+++ b/scene/resources/world_2d.cpp
@@ -394,9 +394,9 @@ World2D::World2D() {
Physics2DServer::get_singleton()->area_set_param(space, Physics2DServer::AREA_PARAM_GRAVITY, GLOBAL_DEF("physics/2d/default_gravity", 98));
Physics2DServer::get_singleton()->area_set_param(space, Physics2DServer::AREA_PARAM_GRAVITY_VECTOR, GLOBAL_DEF("physics/2d/default_gravity_vector", Vector2(0, 1)));
Physics2DServer::get_singleton()->area_set_param(space, Physics2DServer::AREA_PARAM_LINEAR_DAMP, GLOBAL_DEF("physics/2d/default_linear_damp", 0.1));
- ProjectSettings::get_singleton()->set_custom_property_info("physics/2d/default_linear_damp", PropertyInfo(Variant::REAL, "physics/2d/default_linear_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"));
+ ProjectSettings::get_singleton()->set_custom_property_info("physics/2d/default_linear_damp", PropertyInfo(Variant::FLOAT, "physics/2d/default_linear_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"));
Physics2DServer::get_singleton()->area_set_param(space, Physics2DServer::AREA_PARAM_ANGULAR_DAMP, GLOBAL_DEF("physics/2d/default_angular_damp", 1.0));
- ProjectSettings::get_singleton()->set_custom_property_info("physics/2d/default_angular_damp", PropertyInfo(Variant::REAL, "physics/2d/default_angular_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"));
+ ProjectSettings::get_singleton()->set_custom_property_info("physics/2d/default_angular_damp", PropertyInfo(Variant::FLOAT, "physics/2d/default_angular_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"));
indexer = memnew(SpatialIndexer2D);
}
diff --git a/servers/arvr/arvr_positional_tracker.cpp b/servers/arvr/arvr_positional_tracker.cpp
index 4438475d44..9acc36a139 100644
--- a/servers/arvr/arvr_positional_tracker.cpp
+++ b/servers/arvr/arvr_positional_tracker.cpp
@@ -58,7 +58,7 @@ void ARVRPositionalTracker::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_rumble"), &ARVRPositionalTracker::get_rumble);
ClassDB::bind_method(D_METHOD("set_rumble", "rumble"), &ARVRPositionalTracker::set_rumble);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "rumble"), "set_rumble", "get_rumble");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rumble"), "set_rumble", "get_rumble");
};
void ARVRPositionalTracker::set_type(ARVRServer::TrackerType p_type) {
diff --git a/servers/arvr_server.cpp b/servers/arvr_server.cpp
index 96f1ff049b..4b3417db6c 100644
--- a/servers/arvr_server.cpp
+++ b/servers/arvr_server.cpp
@@ -46,7 +46,7 @@ void ARVRServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("center_on_hmd", "rotation_mode", "keep_height"), &ARVRServer::center_on_hmd);
ClassDB::bind_method(D_METHOD("get_hmd_transform"), &ARVRServer::get_hmd_transform);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "world_scale"), "set_world_scale", "get_world_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "world_scale"), "set_world_scale", "get_world_scale");
ClassDB::bind_method(D_METHOD("get_interface_count"), &ARVRServer::get_interface_count);
ClassDB::bind_method(D_METHOD("get_interface", "idx"), &ARVRServer::get_interface);
diff --git a/servers/audio/audio_stream.cpp b/servers/audio/audio_stream.cpp
index 259c5487e9..46e674fd9b 100644
--- a/servers/audio/audio_stream.cpp
+++ b/servers/audio/audio_stream.cpp
@@ -300,7 +300,7 @@ void AudioStreamRandomPitch::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_random_pitch"), &AudioStreamRandomPitch::get_random_pitch);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "audio_stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream"), "set_audio_stream", "get_audio_stream");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "random_pitch", PROPERTY_HINT_RANGE, "1,16,0.01"), "set_random_pitch", "get_random_pitch");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "random_pitch", PROPERTY_HINT_RANGE, "1,16,0.01"), "set_random_pitch", "get_random_pitch");
}
AudioStreamRandomPitch::AudioStreamRandomPitch() {
diff --git a/servers/audio/effects/audio_effect_amplify.cpp b/servers/audio/effects/audio_effect_amplify.cpp
index 938d29f764..8ad2ecc5ce 100644
--- a/servers/audio/effects/audio_effect_amplify.cpp
+++ b/servers/audio/effects/audio_effect_amplify.cpp
@@ -67,7 +67,7 @@ void AudioEffectAmplify::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_volume_db", "volume"), &AudioEffectAmplify::set_volume_db);
ClassDB::bind_method(D_METHOD("get_volume_db"), &AudioEffectAmplify::get_volume_db);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "volume_db", PROPERTY_HINT_RANGE, "-80,24,0.01"), "set_volume_db", "get_volume_db");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "volume_db", PROPERTY_HINT_RANGE, "-80,24,0.01"), "set_volume_db", "get_volume_db");
}
AudioEffectAmplify::AudioEffectAmplify() {
diff --git a/servers/audio/effects/audio_effect_chorus.cpp b/servers/audio/effects/audio_effect_chorus.cpp
index 58943582c9..34c03dca8d 100644
--- a/servers/audio/effects/audio_effect_chorus.cpp
+++ b/servers/audio/effects/audio_effect_chorus.cpp
@@ -326,36 +326,36 @@ void AudioEffectChorus::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_dry"), &AudioEffectChorus::get_dry);
ADD_PROPERTY(PropertyInfo(Variant::INT, "voice_count", PROPERTY_HINT_RANGE, "1,4,1"), "set_voice_count", "get_voice_count");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "dry", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_dry", "get_dry");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "wet", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_wet", "get_wet");
-
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/1/delay_ms", PROPERTY_HINT_RANGE, "0,50,0.01"), "set_voice_delay_ms", "get_voice_delay_ms", 0);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/1/rate_hz", PROPERTY_HINT_RANGE, "0.1,20,0.1"), "set_voice_rate_hz", "get_voice_rate_hz", 0);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/1/depth_ms", PROPERTY_HINT_RANGE, "0,20,0.01"), "set_voice_depth_ms", "get_voice_depth_ms", 0);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/1/level_db", PROPERTY_HINT_RANGE, "-60,24,0.1"), "set_voice_level_db", "get_voice_level_db", 0);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/1/cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_voice_cutoff_hz", "get_voice_cutoff_hz", 0);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/1/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_voice_pan", "get_voice_pan", 0);
-
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/2/delay_ms", PROPERTY_HINT_RANGE, "0,50,0.01"), "set_voice_delay_ms", "get_voice_delay_ms", 1);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/2/rate_hz", PROPERTY_HINT_RANGE, "0.1,20,0.1"), "set_voice_rate_hz", "get_voice_rate_hz", 1);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/2/depth_ms", PROPERTY_HINT_RANGE, "0,20,0.01"), "set_voice_depth_ms", "get_voice_depth_ms", 1);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/2/level_db", PROPERTY_HINT_RANGE, "-60,24,0.1"), "set_voice_level_db", "get_voice_level_db", 1);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/2/cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_voice_cutoff_hz", "get_voice_cutoff_hz", 1);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/2/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_voice_pan", "get_voice_pan", 1);
-
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/3/delay_ms", PROPERTY_HINT_RANGE, "0,50,0.01"), "set_voice_delay_ms", "get_voice_delay_ms", 2);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/3/rate_hz", PROPERTY_HINT_RANGE, "0.1,20,0.1"), "set_voice_rate_hz", "get_voice_rate_hz", 2);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/3/depth_ms", PROPERTY_HINT_RANGE, "0,20,0.01"), "set_voice_depth_ms", "get_voice_depth_ms", 2);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/3/level_db", PROPERTY_HINT_RANGE, "-60,24,0.1"), "set_voice_level_db", "get_voice_level_db", 2);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/3/cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_voice_cutoff_hz", "get_voice_cutoff_hz", 2);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/3/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_voice_pan", "get_voice_pan", 2);
-
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/4/delay_ms", PROPERTY_HINT_RANGE, "0,50,0.01"), "set_voice_delay_ms", "get_voice_delay_ms", 3);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/4/rate_hz", PROPERTY_HINT_RANGE, "0.1,20,0.1"), "set_voice_rate_hz", "get_voice_rate_hz", 3);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/4/depth_ms", PROPERTY_HINT_RANGE, "0,20,0.01"), "set_voice_depth_ms", "get_voice_depth_ms", 3);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/4/level_db", PROPERTY_HINT_RANGE, "-60,24,0.1"), "set_voice_level_db", "get_voice_level_db", 3);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/4/cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_voice_cutoff_hz", "get_voice_cutoff_hz", 3);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "voice/4/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_voice_pan", "get_voice_pan", 3);
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dry", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_dry", "get_dry");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wet", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_wet", "get_wet");
+
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/1/delay_ms", PROPERTY_HINT_RANGE, "0,50,0.01"), "set_voice_delay_ms", "get_voice_delay_ms", 0);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/1/rate_hz", PROPERTY_HINT_RANGE, "0.1,20,0.1"), "set_voice_rate_hz", "get_voice_rate_hz", 0);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/1/depth_ms", PROPERTY_HINT_RANGE, "0,20,0.01"), "set_voice_depth_ms", "get_voice_depth_ms", 0);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/1/level_db", PROPERTY_HINT_RANGE, "-60,24,0.1"), "set_voice_level_db", "get_voice_level_db", 0);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/1/cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_voice_cutoff_hz", "get_voice_cutoff_hz", 0);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/1/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_voice_pan", "get_voice_pan", 0);
+
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/2/delay_ms", PROPERTY_HINT_RANGE, "0,50,0.01"), "set_voice_delay_ms", "get_voice_delay_ms", 1);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/2/rate_hz", PROPERTY_HINT_RANGE, "0.1,20,0.1"), "set_voice_rate_hz", "get_voice_rate_hz", 1);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/2/depth_ms", PROPERTY_HINT_RANGE, "0,20,0.01"), "set_voice_depth_ms", "get_voice_depth_ms", 1);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/2/level_db", PROPERTY_HINT_RANGE, "-60,24,0.1"), "set_voice_level_db", "get_voice_level_db", 1);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/2/cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_voice_cutoff_hz", "get_voice_cutoff_hz", 1);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/2/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_voice_pan", "get_voice_pan", 1);
+
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/3/delay_ms", PROPERTY_HINT_RANGE, "0,50,0.01"), "set_voice_delay_ms", "get_voice_delay_ms", 2);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/3/rate_hz", PROPERTY_HINT_RANGE, "0.1,20,0.1"), "set_voice_rate_hz", "get_voice_rate_hz", 2);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/3/depth_ms", PROPERTY_HINT_RANGE, "0,20,0.01"), "set_voice_depth_ms", "get_voice_depth_ms", 2);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/3/level_db", PROPERTY_HINT_RANGE, "-60,24,0.1"), "set_voice_level_db", "get_voice_level_db", 2);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/3/cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_voice_cutoff_hz", "get_voice_cutoff_hz", 2);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/3/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_voice_pan", "get_voice_pan", 2);
+
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/4/delay_ms", PROPERTY_HINT_RANGE, "0,50,0.01"), "set_voice_delay_ms", "get_voice_delay_ms", 3);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/4/rate_hz", PROPERTY_HINT_RANGE, "0.1,20,0.1"), "set_voice_rate_hz", "get_voice_rate_hz", 3);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/4/depth_ms", PROPERTY_HINT_RANGE, "0,20,0.01"), "set_voice_depth_ms", "get_voice_depth_ms", 3);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/4/level_db", PROPERTY_HINT_RANGE, "-60,24,0.1"), "set_voice_level_db", "get_voice_level_db", 3);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/4/cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_voice_cutoff_hz", "get_voice_cutoff_hz", 3);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "voice/4/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_voice_pan", "get_voice_pan", 3);
}
AudioEffectChorus::AudioEffectChorus() {
diff --git a/servers/audio/effects/audio_effect_compressor.cpp b/servers/audio/effects/audio_effect_compressor.cpp
index 701e17e0d6..8d54bd8e36 100644
--- a/servers/audio/effects/audio_effect_compressor.cpp
+++ b/servers/audio/effects/audio_effect_compressor.cpp
@@ -230,12 +230,12 @@ void AudioEffectCompressor::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_sidechain", "sidechain"), &AudioEffectCompressor::set_sidechain);
ClassDB::bind_method(D_METHOD("get_sidechain"), &AudioEffectCompressor::get_sidechain);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "threshold", PROPERTY_HINT_RANGE, "-60,0,0.1"), "set_threshold", "get_threshold");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ratio", PROPERTY_HINT_RANGE, "1,48,0.1"), "set_ratio", "get_ratio");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "gain", PROPERTY_HINT_RANGE, "-20,20,0.1"), "set_gain", "get_gain");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "attack_us", PROPERTY_HINT_RANGE, "20,2000,1"), "set_attack_us", "get_attack_us");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "release_ms", PROPERTY_HINT_RANGE, "20,2000,1"), "set_release_ms", "get_release_ms");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "mix", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_mix", "get_mix");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "threshold", PROPERTY_HINT_RANGE, "-60,0,0.1"), "set_threshold", "get_threshold");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ratio", PROPERTY_HINT_RANGE, "1,48,0.1"), "set_ratio", "get_ratio");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gain", PROPERTY_HINT_RANGE, "-20,20,0.1"), "set_gain", "get_gain");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "attack_us", PROPERTY_HINT_RANGE, "20,2000,1"), "set_attack_us", "get_attack_us");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "release_ms", PROPERTY_HINT_RANGE, "20,2000,1"), "set_release_ms", "get_release_ms");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mix", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_mix", "get_mix");
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "sidechain", PROPERTY_HINT_ENUM), "set_sidechain", "get_sidechain");
}
diff --git a/servers/audio/effects/audio_effect_delay.cpp b/servers/audio/effects/audio_effect_delay.cpp
index 21d979a78c..fa57a94977 100644
--- a/servers/audio/effects/audio_effect_delay.cpp
+++ b/servers/audio/effects/audio_effect_delay.cpp
@@ -305,22 +305,22 @@ void AudioEffectDelay::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_feedback_lowpass", "amount"), &AudioEffectDelay::set_feedback_lowpass);
ClassDB::bind_method(D_METHOD("get_feedback_lowpass"), &AudioEffectDelay::get_feedback_lowpass);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "dry", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_dry", "get_dry");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dry", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_dry", "get_dry");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "tap1/active"), "set_tap1_active", "is_tap1_active");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "tap1/delay_ms", PROPERTY_HINT_RANGE, "0,1500,1"), "set_tap1_delay_ms", "get_tap1_delay_ms");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "tap1/level_db", PROPERTY_HINT_RANGE, "-60,0,0.01"), "set_tap1_level_db", "get_tap1_level_db");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "tap1/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_tap1_pan", "get_tap1_pan");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "tap1/delay_ms", PROPERTY_HINT_RANGE, "0,1500,1"), "set_tap1_delay_ms", "get_tap1_delay_ms");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "tap1/level_db", PROPERTY_HINT_RANGE, "-60,0,0.01"), "set_tap1_level_db", "get_tap1_level_db");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "tap1/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_tap1_pan", "get_tap1_pan");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "tap2/active"), "set_tap2_active", "is_tap2_active");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "tap2/delay_ms", PROPERTY_HINT_RANGE, "0,1500,1"), "set_tap2_delay_ms", "get_tap2_delay_ms");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "tap2/level_db", PROPERTY_HINT_RANGE, "-60,0,0.01"), "set_tap2_level_db", "get_tap2_level_db");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "tap2/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_tap2_pan", "get_tap2_pan");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "tap2/delay_ms", PROPERTY_HINT_RANGE, "0,1500,1"), "set_tap2_delay_ms", "get_tap2_delay_ms");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "tap2/level_db", PROPERTY_HINT_RANGE, "-60,0,0.01"), "set_tap2_level_db", "get_tap2_level_db");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "tap2/pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_tap2_pan", "get_tap2_pan");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "feedback/active"), "set_feedback_active", "is_feedback_active");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "feedback/delay_ms", PROPERTY_HINT_RANGE, "0,1500,1"), "set_feedback_delay_ms", "get_feedback_delay_ms");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "feedback/level_db", PROPERTY_HINT_RANGE, "-60,0,0.01"), "set_feedback_level_db", "get_feedback_level_db");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "feedback/lowpass", PROPERTY_HINT_RANGE, "1,16000,1"), "set_feedback_lowpass", "get_feedback_lowpass");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "feedback/delay_ms", PROPERTY_HINT_RANGE, "0,1500,1"), "set_feedback_delay_ms", "get_feedback_delay_ms");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "feedback/level_db", PROPERTY_HINT_RANGE, "-60,0,0.01"), "set_feedback_level_db", "get_feedback_level_db");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "feedback/lowpass", PROPERTY_HINT_RANGE, "1,16000,1"), "set_feedback_lowpass", "get_feedback_lowpass");
}
AudioEffectDelay::AudioEffectDelay() {
diff --git a/servers/audio/effects/audio_effect_distortion.cpp b/servers/audio/effects/audio_effect_distortion.cpp
index 8f2c0743ef..bc4fc7ecd6 100644
--- a/servers/audio/effects/audio_effect_distortion.cpp
+++ b/servers/audio/effects/audio_effect_distortion.cpp
@@ -172,10 +172,10 @@ void AudioEffectDistortion::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_post_gain"), &AudioEffectDistortion::get_post_gain);
ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Clip,ATan,LoFi,Overdrive,WaveShape"), "set_mode", "get_mode");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "pre_gain", PROPERTY_HINT_RANGE, "-60,60,0.01"), "set_pre_gain", "get_pre_gain");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "keep_hf_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_keep_hf_hz", "get_keep_hf_hz");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "drive", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drive", "get_drive");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "post_gain", PROPERTY_HINT_RANGE, "-80,24,0.01"), "set_post_gain", "get_post_gain");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pre_gain", PROPERTY_HINT_RANGE, "-60,60,0.01"), "set_pre_gain", "get_pre_gain");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "keep_hf_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_keep_hf_hz", "get_keep_hf_hz");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "drive", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drive", "get_drive");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "post_gain", PROPERTY_HINT_RANGE, "-80,24,0.01"), "set_post_gain", "get_post_gain");
BIND_ENUM_CONSTANT(MODE_CLIP);
BIND_ENUM_CONSTANT(MODE_ATAN);
diff --git a/servers/audio/effects/audio_effect_eq.cpp b/servers/audio/effects/audio_effect_eq.cpp
index ecd5f04d5f..b315fdc3bb 100644
--- a/servers/audio/effects/audio_effect_eq.cpp
+++ b/servers/audio/effects/audio_effect_eq.cpp
@@ -117,7 +117,7 @@ void AudioEffectEQ::_get_property_list(List<PropertyInfo> *p_list) const {
for (int i = 0; i < band_names.size(); i++) {
- p_list->push_back(PropertyInfo(Variant::REAL, band_names[i], PROPERTY_HINT_RANGE, "-60,24,0.1"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, band_names[i], PROPERTY_HINT_RANGE, "-60,24,0.1"));
}
}
diff --git a/servers/audio/effects/audio_effect_filter.cpp b/servers/audio/effects/audio_effect_filter.cpp
index 9ba5ceb500..18047bc99e 100644
--- a/servers/audio/effects/audio_effect_filter.cpp
+++ b/servers/audio/effects/audio_effect_filter.cpp
@@ -156,9 +156,9 @@ void AudioEffectFilter::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_db", "amount"), &AudioEffectFilter::set_db);
ClassDB::bind_method(D_METHOD("get_db"), &AudioEffectFilter::get_db);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_cutoff", "get_cutoff");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "resonance", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_resonance", "get_resonance");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "gain", PROPERTY_HINT_RANGE, "0,4,0.01"), "set_gain", "get_gain");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "cutoff_hz", PROPERTY_HINT_RANGE, "1,20500,1"), "set_cutoff", "get_cutoff");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "resonance", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_resonance", "get_resonance");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gain", PROPERTY_HINT_RANGE, "0,4,0.01"), "set_gain", "get_gain");
ADD_PROPERTY(PropertyInfo(Variant::INT, "db", PROPERTY_HINT_ENUM, "6 dB,12 dB,18 dB,24 dB"), "set_db", "get_db");
BIND_ENUM_CONSTANT(FILTER_6DB);
diff --git a/servers/audio/effects/audio_effect_limiter.cpp b/servers/audio/effects/audio_effect_limiter.cpp
index d495964719..40a4243168 100644
--- a/servers/audio/effects/audio_effect_limiter.cpp
+++ b/servers/audio/effects/audio_effect_limiter.cpp
@@ -128,10 +128,10 @@ void AudioEffectLimiter::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_soft_clip_ratio", "soft_clip"), &AudioEffectLimiter::set_soft_clip_ratio);
ClassDB::bind_method(D_METHOD("get_soft_clip_ratio"), &AudioEffectLimiter::get_soft_clip_ratio);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ceiling_db", PROPERTY_HINT_RANGE, "-20,-0.1,0.1"), "set_ceiling_db", "get_ceiling_db");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "threshold_db", PROPERTY_HINT_RANGE, "-30,0,0.1"), "set_threshold_db", "get_threshold_db");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "soft_clip_db", PROPERTY_HINT_RANGE, "0,6,0.1"), "set_soft_clip_db", "get_soft_clip_db");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "soft_clip_ratio", PROPERTY_HINT_RANGE, "3,20,0.1"), "set_soft_clip_ratio", "get_soft_clip_ratio");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "ceiling_db", PROPERTY_HINT_RANGE, "-20,-0.1,0.1"), "set_ceiling_db", "get_ceiling_db");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "threshold_db", PROPERTY_HINT_RANGE, "-30,0,0.1"), "set_threshold_db", "get_threshold_db");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "soft_clip_db", PROPERTY_HINT_RANGE, "0,6,0.1"), "set_soft_clip_db", "get_soft_clip_db");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "soft_clip_ratio", PROPERTY_HINT_RANGE, "3,20,0.1"), "set_soft_clip_ratio", "get_soft_clip_ratio");
}
AudioEffectLimiter::AudioEffectLimiter() {
diff --git a/servers/audio/effects/audio_effect_panner.cpp b/servers/audio/effects/audio_effect_panner.cpp
index b9e95f44df..10724175e5 100644
--- a/servers/audio/effects/audio_effect_panner.cpp
+++ b/servers/audio/effects/audio_effect_panner.cpp
@@ -63,7 +63,7 @@ void AudioEffectPanner::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_pan", "cpanume"), &AudioEffectPanner::set_pan);
ClassDB::bind_method(D_METHOD("get_pan"), &AudioEffectPanner::get_pan);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_pan", "get_pan");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pan", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_pan", "get_pan");
}
AudioEffectPanner::AudioEffectPanner() {
diff --git a/servers/audio/effects/audio_effect_phaser.cpp b/servers/audio/effects/audio_effect_phaser.cpp
index d811522576..3709b69d45 100644
--- a/servers/audio/effects/audio_effect_phaser.cpp
+++ b/servers/audio/effects/audio_effect_phaser.cpp
@@ -154,11 +154,11 @@ void AudioEffectPhaser::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_depth", "depth"), &AudioEffectPhaser::set_depth);
ClassDB::bind_method(D_METHOD("get_depth"), &AudioEffectPhaser::get_depth);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "range_min_hz", PROPERTY_HINT_RANGE, "10,10000"), "set_range_min_hz", "get_range_min_hz");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "range_max_hz", PROPERTY_HINT_RANGE, "10,10000"), "set_range_max_hz", "get_range_max_hz");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "rate_hz", PROPERTY_HINT_RANGE, "0.01,20"), "set_rate_hz", "get_rate_hz");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "feedback", PROPERTY_HINT_RANGE, "0.1,0.9,0.1"), "set_feedback", "get_feedback");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "depth", PROPERTY_HINT_RANGE, "0.1,4,0.1"), "set_depth", "get_depth");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "range_min_hz", PROPERTY_HINT_RANGE, "10,10000"), "set_range_min_hz", "get_range_min_hz");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "range_max_hz", PROPERTY_HINT_RANGE, "10,10000"), "set_range_max_hz", "get_range_max_hz");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rate_hz", PROPERTY_HINT_RANGE, "0.01,20"), "set_rate_hz", "get_rate_hz");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "feedback", PROPERTY_HINT_RANGE, "0.1,0.9,0.1"), "set_feedback", "get_feedback");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "depth", PROPERTY_HINT_RANGE, "0.1,4,0.1"), "set_depth", "get_depth");
}
AudioEffectPhaser::AudioEffectPhaser() {
diff --git a/servers/audio/effects/audio_effect_pitch_shift.cpp b/servers/audio/effects/audio_effect_pitch_shift.cpp
index 28185e591f..56529e208e 100644
--- a/servers/audio/effects/audio_effect_pitch_shift.cpp
+++ b/servers/audio/effects/audio_effect_pitch_shift.cpp
@@ -347,8 +347,8 @@ void AudioEffectPitchShift::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_fft_size", "size"), &AudioEffectPitchShift::set_fft_size);
ClassDB::bind_method(D_METHOD("get_fft_size"), &AudioEffectPitchShift::get_fft_size);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "pitch_scale", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_pitch_scale", "get_pitch_scale");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "oversampling", PROPERTY_HINT_RANGE, "4,32,1"), "set_oversampling", "get_oversampling");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pitch_scale", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_pitch_scale", "get_pitch_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "oversampling", PROPERTY_HINT_RANGE, "4,32,1"), "set_oversampling", "get_oversampling");
ADD_PROPERTY(PropertyInfo(Variant::INT, "fft_size", PROPERTY_HINT_ENUM, "256,512,1024,2048,4096"), "set_fft_size", "get_fft_size");
BIND_ENUM_CONSTANT(FFT_SIZE_256);
diff --git a/servers/audio/effects/audio_effect_reverb.cpp b/servers/audio/effects/audio_effect_reverb.cpp
index caa2d8ab26..6dccb2945b 100644
--- a/servers/audio/effects/audio_effect_reverb.cpp
+++ b/servers/audio/effects/audio_effect_reverb.cpp
@@ -184,15 +184,15 @@ void AudioEffectReverb::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_hpf"), &AudioEffectReverb::get_hpf);
ADD_GROUP("Predelay", "predelay_");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "predelay_msec", PROPERTY_HINT_RANGE, "20,500,1"), "set_predelay_msec", "get_predelay_msec");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "predelay_feedback", PROPERTY_HINT_RANGE, "0,0.98,0.01"), "set_predelay_feedback", "get_predelay_feedback");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "predelay_msec", PROPERTY_HINT_RANGE, "20,500,1"), "set_predelay_msec", "get_predelay_msec");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "predelay_feedback", PROPERTY_HINT_RANGE, "0,0.98,0.01"), "set_predelay_feedback", "get_predelay_feedback");
ADD_GROUP("", "");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "room_size", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_room_size", "get_room_size");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "damping", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_damping", "get_damping");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "spread", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_spread", "get_spread");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "hipass", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_hpf", "get_hpf");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "dry", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_dry", "get_dry");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "wet", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_wet", "get_wet");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "room_size", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_room_size", "get_room_size");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "damping", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_damping", "get_damping");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "spread", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_spread", "get_spread");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "hipass", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_hpf", "get_hpf");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "dry", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_dry", "get_dry");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wet", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_wet", "get_wet");
}
AudioEffectReverb::AudioEffectReverb() {
diff --git a/servers/audio/effects/audio_effect_spectrum_analyzer.cpp b/servers/audio/effects/audio_effect_spectrum_analyzer.cpp
index d4bd3e2461..47aee02de2 100644
--- a/servers/audio/effects/audio_effect_spectrum_analyzer.cpp
+++ b/servers/audio/effects/audio_effect_spectrum_analyzer.cpp
@@ -268,8 +268,8 @@ void AudioEffectSpectrumAnalyzer::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_fft_size", "size"), &AudioEffectSpectrumAnalyzer::set_fft_size);
ClassDB::bind_method(D_METHOD("get_fft_size"), &AudioEffectSpectrumAnalyzer::get_fft_size);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "buffer_length", PROPERTY_HINT_RANGE, "0.1,4,0.1"), "set_buffer_length", "get_buffer_length");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "tap_back_pos", PROPERTY_HINT_RANGE, "0.1,4,0.1"), "set_tap_back_pos", "get_tap_back_pos");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "buffer_length", PROPERTY_HINT_RANGE, "0.1,4,0.1"), "set_buffer_length", "get_buffer_length");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "tap_back_pos", PROPERTY_HINT_RANGE, "0.1,4,0.1"), "set_tap_back_pos", "get_tap_back_pos");
ADD_PROPERTY(PropertyInfo(Variant::INT, "fft_size", PROPERTY_HINT_ENUM, "256,512,1024,2048,4096"), "set_fft_size", "get_fft_size");
BIND_ENUM_CONSTANT(FFT_SIZE_256);
diff --git a/servers/audio/effects/audio_effect_stereo_enhance.cpp b/servers/audio/effects/audio_effect_stereo_enhance.cpp
index e8b8f47676..a10aca02b2 100644
--- a/servers/audio/effects/audio_effect_stereo_enhance.cpp
+++ b/servers/audio/effects/audio_effect_stereo_enhance.cpp
@@ -146,9 +146,9 @@ void AudioEffectStereoEnhance::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_surround", "amount"), &AudioEffectStereoEnhance::set_surround);
ClassDB::bind_method(D_METHOD("get_surround"), &AudioEffectStereoEnhance::get_surround);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "pan_pullout", PROPERTY_HINT_RANGE, "0,4,0.01"), "set_pan_pullout", "get_pan_pullout");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "time_pullout_ms", PROPERTY_HINT_RANGE, "0,50,0.01"), "set_time_pullout", "get_time_pullout");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "surround", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_surround", "get_surround");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pan_pullout", PROPERTY_HINT_RANGE, "0,4,0.01"), "set_pan_pullout", "get_pan_pullout");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_pullout_ms", PROPERTY_HINT_RANGE, "0,50,0.01"), "set_time_pullout", "get_time_pullout");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "surround", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_surround", "get_surround");
}
AudioEffectStereoEnhance::AudioEffectStereoEnhance() {
diff --git a/servers/audio/effects/audio_stream_generator.cpp b/servers/audio/effects/audio_stream_generator.cpp
index 101dcddae7..5f24cf3d6b 100644
--- a/servers/audio/effects/audio_stream_generator.cpp
+++ b/servers/audio/effects/audio_stream_generator.cpp
@@ -74,8 +74,8 @@ void AudioStreamGenerator::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_buffer_length", "seconds"), &AudioStreamGenerator::set_buffer_length);
ClassDB::bind_method(D_METHOD("get_buffer_length"), &AudioStreamGenerator::get_buffer_length);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "mix_rate", PROPERTY_HINT_RANGE, "20,192000,1"), "set_mix_rate", "get_mix_rate");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "buffer_length", PROPERTY_HINT_RANGE, "0.01,10,0.01"), "set_buffer_length", "get_buffer_length");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mix_rate", PROPERTY_HINT_RANGE, "20,192000,1"), "set_mix_rate", "get_mix_rate");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "buffer_length", PROPERTY_HINT_RANGE, "0.01,10,0.01"), "set_buffer_length", "get_buffer_length");
}
AudioStreamGenerator::AudioStreamGenerator() {
diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp
index 2a5a5040b6..abf351135a 100644
--- a/servers/audio_server.cpp
+++ b/servers/audio_server.cpp
@@ -971,7 +971,7 @@ void AudioServer::init() {
channel_disable_threshold_db = GLOBAL_DEF_RST("audio/channel_disable_threshold_db", -60.0);
channel_disable_frames = float(GLOBAL_DEF_RST("audio/channel_disable_time", 2.0)) * get_mix_rate();
- ProjectSettings::get_singleton()->set_custom_property_info("audio/channel_disable_time", PropertyInfo(Variant::REAL, "audio/channel_disable_time", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater"));
+ ProjectSettings::get_singleton()->set_custom_property_info("audio/channel_disable_time", PropertyInfo(Variant::FLOAT, "audio/channel_disable_time", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater"));
buffer_size = 1024; //hardcoded for now
init_channels_and_buffers();
@@ -1384,7 +1384,7 @@ void AudioServer::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "bus_count"), "set_bus_count", "get_bus_count");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "device"), "set_device", "get_device");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "global_rate_scale"), "set_global_rate_scale", "get_global_rate_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "global_rate_scale"), "set_global_rate_scale", "get_global_rate_scale");
ADD_SIGNAL(MethodInfo("bus_layout_changed"));
@@ -1531,8 +1531,8 @@ void AudioBusLayout::_get_property_list(List<PropertyInfo> *p_list) const {
p_list->push_back(PropertyInfo(Variant::BOOL, "bus/" + itos(i) + "/solo", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL));
p_list->push_back(PropertyInfo(Variant::BOOL, "bus/" + itos(i) + "/mute", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL));
p_list->push_back(PropertyInfo(Variant::BOOL, "bus/" + itos(i) + "/bypass_fx", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL));
- p_list->push_back(PropertyInfo(Variant::REAL, "bus/" + itos(i) + "/volume_db", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL));
- p_list->push_back(PropertyInfo(Variant::REAL, "bus/" + itos(i) + "/send", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "bus/" + itos(i) + "/volume_db", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "bus/" + itos(i) + "/send", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL));
for (int j = 0; j < buses[i].effects.size(); j++) {
p_list->push_back(PropertyInfo(Variant::OBJECT, "bus/" + itos(i) + "/effect/" + itos(j) + "/effect", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL));
diff --git a/servers/navigation_server.cpp b/servers/navigation_server.cpp
index f31795fb35..f2b727ac47 100644
--- a/servers/navigation_server.cpp
+++ b/servers/navigation_server.cpp
@@ -75,7 +75,7 @@ void NavigationServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("free", "object"), &NavigationServer::free);
ClassDB::bind_method(D_METHOD("set_active", "active"), &NavigationServer::set_active);
- ClassDB::bind_method(D_METHOD("step", "delta_time"), &NavigationServer::step);
+ ClassDB::bind_method(D_METHOD("process", "delta_time"), &NavigationServer::process);
}
const NavigationServer *NavigationServer::get_singleton() {
diff --git a/servers/navigation_server.h b/servers/navigation_server.h
index d4d95d72d4..2587e53ab2 100644
--- a/servers/navigation_server.h
+++ b/servers/navigation_server.h
@@ -175,9 +175,11 @@ public:
/// Control activation of this server.
virtual void set_active(bool p_active) const = 0;
- /// Step the server
- /// NOTE: This function is not Threadsafe and MUST be called in single thread.
- virtual void step(real_t delta_time) = 0;
+ /// Process the collision avoidance agents.
+ /// The result of this process is needed by the physics server,
+ /// so this must be called in the main thread.
+ /// Note: This function is not thread safe.
+ virtual void process(real_t delta_time) = 0;
NavigationServer();
virtual ~NavigationServer();
diff --git a/servers/physics/space_sw.cpp b/servers/physics/space_sw.cpp
index 03dca8b9ec..110520db5a 100644
--- a/servers/physics/space_sw.cpp
+++ b/servers/physics/space_sw.cpp
@@ -1220,7 +1220,7 @@ SpaceSW::SpaceSW() {
body_linear_velocity_sleep_threshold = GLOBAL_DEF("physics/3d/sleep_threshold_linear", 0.1);
body_angular_velocity_sleep_threshold = GLOBAL_DEF("physics/3d/sleep_threshold_angular", (8.0 / 180.0 * Math_PI));
body_time_to_sleep = GLOBAL_DEF("physics/3d/time_before_sleep", 0.5);
- ProjectSettings::get_singleton()->set_custom_property_info("physics/3d/time_before_sleep", PropertyInfo(Variant::REAL, "physics/3d/time_before_sleep", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater"));
+ ProjectSettings::get_singleton()->set_custom_property_info("physics/3d/time_before_sleep", PropertyInfo(Variant::FLOAT, "physics/3d/time_before_sleep", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater"));
body_angular_velocity_damp_ratio = 10;
broadphase = BroadPhaseSW::create_func();
diff --git a/servers/physics_2d/shape_2d_sw.cpp b/servers/physics_2d/shape_2d_sw.cpp
index 86057e4078..5fefb9595f 100644
--- a/servers/physics_2d/shape_2d_sw.cpp
+++ b/servers/physics_2d/shape_2d_sw.cpp
@@ -639,7 +639,7 @@ real_t ConvexPolygonShape2DSW::get_moment_of_inertia(real_t p_mass, const Size2
void ConvexPolygonShape2DSW::set_data(const Variant &p_data) {
- ERR_FAIL_COND(p_data.get_type() != Variant::PACKED_VECTOR2_ARRAY && p_data.get_type() != Variant::PACKED_REAL_ARRAY);
+ ERR_FAIL_COND(p_data.get_type() != Variant::PACKED_VECTOR2_ARRAY && p_data.get_type() != Variant::PACKED_FLOAT32_ARRAY);
if (points)
memdelete_arr(points);
@@ -899,7 +899,7 @@ int ConcavePolygonShape2DSW::_generate_bvh(BVH *p_bvh, int p_len, int p_depth) {
void ConcavePolygonShape2DSW::set_data(const Variant &p_data) {
- ERR_FAIL_COND(p_data.get_type() != Variant::PACKED_VECTOR2_ARRAY && p_data.get_type() != Variant::PACKED_REAL_ARRAY);
+ ERR_FAIL_COND(p_data.get_type() != Variant::PACKED_VECTOR2_ARRAY && p_data.get_type() != Variant::PACKED_FLOAT32_ARRAY);
Rect2 aabb;
diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp
index 83bcae4607..2009cb823d 100644
--- a/servers/physics_2d/space_2d_sw.cpp
+++ b/servers/physics_2d/space_2d_sw.cpp
@@ -1346,7 +1346,7 @@ Space2DSW::Space2DSW() {
body_linear_velocity_sleep_threshold = GLOBAL_DEF("physics/2d/sleep_threshold_linear", 2.0);
body_angular_velocity_sleep_threshold = GLOBAL_DEF("physics/2d/sleep_threshold_angular", (8.0 / 180.0 * Math_PI));
body_time_to_sleep = GLOBAL_DEF("physics/2d/time_before_sleep", 0.5);
- ProjectSettings::get_singleton()->set_custom_property_info("physics/2d/time_before_sleep", PropertyInfo(Variant::REAL, "physics/2d/time_before_sleep", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater"));
+ ProjectSettings::get_singleton()->set_custom_property_info("physics/2d/time_before_sleep", PropertyInfo(Variant::FLOAT, "physics/2d/time_before_sleep", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater"));
broadphase = BroadPhase2DSW::create_func();
broadphase->set_pair_callback(_broadphase_pair, this);
diff --git a/servers/physics_2d_server.cpp b/servers/physics_2d_server.cpp
index 925af52eeb..1f92d6e419 100644
--- a/servers/physics_2d_server.cpp
+++ b/servers/physics_2d_server.cpp
@@ -118,13 +118,13 @@ void Physics2DDirectBodyState::_bind_methods() {
ClassDB::bind_method(D_METHOD("integrate_forces"), &Physics2DDirectBodyState::integrate_forces);
ClassDB::bind_method(D_METHOD("get_space_state"), &Physics2DDirectBodyState::get_space_state);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "step"), "", "get_step");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "inverse_mass"), "", "get_inverse_mass");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "inverse_inertia"), "", "get_inverse_inertia");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "total_angular_damp"), "", "get_total_angular_damp");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "total_linear_damp"), "", "get_total_linear_damp");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "step"), "", "get_step");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "inverse_mass"), "", "get_inverse_mass");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "inverse_inertia"), "", "get_inverse_inertia");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "total_angular_damp"), "", "get_total_angular_damp");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "total_linear_damp"), "", "get_total_linear_damp");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "total_gravity"), "", "get_total_gravity");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "angular_velocity"), "set_angular_velocity", "get_angular_velocity");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_velocity"), "set_angular_velocity", "get_angular_velocity");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "linear_velocity"), "set_linear_velocity", "get_linear_velocity");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "sleeping"), "set_sleep_state", "is_sleeping");
ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "transform"), "set_transform", "get_transform");
@@ -249,7 +249,7 @@ void Physics2DShapeQueryParameters::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_layer", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_collision_layer", "get_collision_layer");
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "exclude", PROPERTY_HINT_NONE, itos(Variant::_RID) + ":"), "set_exclude", "get_exclude");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "margin", PROPERTY_HINT_RANGE, "0,100,0.01"), "set_margin", "get_margin");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "margin", PROPERTY_HINT_RANGE, "0,100,0.01"), "set_margin", "get_margin");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "motion"), "set_motion", "get_motion");
//ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "shape", PROPERTY_HINT_RESOURCE_TYPE, "Shape2D"), "set_shape", ""); // FIXME: Lacks a getter
ADD_PROPERTY(PropertyInfo(Variant::_RID, "shape_rid"), "set_shape_rid", "get_shape_rid");
diff --git a/servers/physics_server.cpp b/servers/physics_server.cpp
index 94bcf1f76e..57f3a7979e 100644
--- a/servers/physics_server.cpp
+++ b/servers/physics_server.cpp
@@ -120,10 +120,10 @@ void PhysicsDirectBodyState::_bind_methods() {
ClassDB::bind_method(D_METHOD("integrate_forces"), &PhysicsDirectBodyState::integrate_forces);
ClassDB::bind_method(D_METHOD("get_space_state"), &PhysicsDirectBodyState::get_space_state);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "step"), "", "get_step");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "inverse_mass"), "", "get_inverse_mass");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "total_angular_damp"), "", "get_total_angular_damp");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "total_linear_damp"), "", "get_total_linear_damp");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "step"), "", "get_step");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "inverse_mass"), "", "get_inverse_mass");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "total_angular_damp"), "", "get_total_angular_damp");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "total_linear_damp"), "", "get_total_linear_damp");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "inverse_inertia"), "", "get_inverse_inertia");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "total_gravity"), "", "get_total_gravity");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "center_of_mass"), "", "get_center_of_mass");
@@ -242,7 +242,7 @@ void PhysicsShapeQueryParameters::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_mask", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_collision_mask", "get_collision_mask");
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "exclude", PROPERTY_HINT_NONE, itos(Variant::_RID) + ":"), "set_exclude", "get_exclude");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "margin", PROPERTY_HINT_RANGE, "0,100,0.01"), "set_margin", "get_margin");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "margin", PROPERTY_HINT_RANGE, "0,100,0.01"), "set_margin", "get_margin");
//ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "shape", PROPERTY_HINT_RESOURCE_TYPE, "Shape2D"), "set_shape", ""); // FIXME: Lacks a getter
ADD_PROPERTY(PropertyInfo(Variant::_RID, "shape_rid"), "set_shape_rid", "get_shape_rid");
ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM, "transform"), "set_transform", "get_transform");
diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h
index 3274b15975..3a219ec7e3 100644
--- a/servers/visual/rasterizer.h
+++ b/servers/visual/rasterizer.h
@@ -1080,7 +1080,7 @@ public:
const Item::CommandTransform *transform = static_cast<const Item::CommandTransform *>(c);
xf = transform->xform;
found_xform = true;
- FALLTHROUGH;
+ [[fallthrough]];
}
default: {
c = c->next;
diff --git a/servers/visual/rasterizer_rd/rasterizer_scene_high_end_rd.cpp b/servers/visual/rasterizer_rd/rasterizer_scene_high_end_rd.cpp
index a33c94fbcd..dd6bece11d 100644
--- a/servers/visual/rasterizer_rd/rasterizer_scene_high_end_rd.cpp
+++ b/servers/visual/rasterizer_rd/rasterizer_scene_high_end_rd.cpp
@@ -1894,8 +1894,16 @@ void RasterizerSceneHighEndRD::_render_scene(RID p_render_buffer, const Transfor
if (draw_sky) {
RENDER_TIMESTAMP("Render Sky");
+
+ CameraMatrix projection = p_cam_projection;
+ if (p_reflection_probe.is_valid()) {
+ CameraMatrix correction;
+ correction.set_depth_correction(true);
+ projection = correction * p_cam_projection;
+ }
+
RD::DrawListID draw_list = RD::get_singleton()->draw_list_begin(opaque_framebuffer, RD::INITIAL_ACTION_CONTINUE, can_continue ? RD::FINAL_ACTION_CONTINUE : RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_CONTINUE, can_continue ? RD::FINAL_ACTION_CONTINUE : RD::FINAL_ACTION_READ);
- _draw_sky(draw_list, RD::get_singleton()->framebuffer_get_format(opaque_framebuffer), p_environment, p_cam_projection, p_cam_transform, 1.0);
+ _draw_sky(draw_list, RD::get_singleton()->framebuffer_get_format(opaque_framebuffer), p_environment, projection, p_cam_transform, 1.0);
RD::get_singleton()->draw_list_end();
if (using_separate_specular && !can_continue) {
diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp
index 438ec2079c..97a18e6d86 100644
--- a/servers/visual/shader_language.cpp
+++ b/servers/visual/shader_language.cpp
@@ -2657,10 +2657,10 @@ PropertyInfo ShaderLanguage::uniform_to_property_info(const ShaderNode::Uniform
case ShaderLanguage::TYPE_UVEC3:
case ShaderLanguage::TYPE_UVEC4: {
- pi.type = Variant::PACKED_INT_ARRAY;
+ pi.type = Variant::PACKED_INT32_ARRAY;
} break;
case ShaderLanguage::TYPE_FLOAT: {
- pi.type = Variant::REAL;
+ pi.type = Variant::FLOAT;
if (p_uniform.hint == ShaderLanguage::ShaderNode::Uniform::HINT_RANGE) {
pi.hint = PROPERTY_HINT_RANGE;
pi.hint_string = rtos(p_uniform.hint_range[0]) + "," + rtos(p_uniform.hint_range[1]) + "," + rtos(p_uniform.hint_range[2]);
diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp
index 1e6d5b7eea..d493c20e9a 100644
--- a/servers/visual_server.cpp
+++ b/servers/visual_server.cpp
@@ -445,7 +445,7 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_
case VS::ARRAY_TANGENT: {
- ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::PACKED_REAL_ARRAY, ERR_INVALID_PARAMETER);
+ ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::PACKED_FLOAT32_ARRAY, ERR_INVALID_PARAMETER);
Vector<real_t> array = p_arrays[ai];
@@ -571,7 +571,7 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_
} break;
case VS::ARRAY_WEIGHTS: {
- ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::PACKED_REAL_ARRAY, ERR_INVALID_PARAMETER);
+ ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::PACKED_FLOAT32_ARRAY, ERR_INVALID_PARAMETER);
Vector<real_t> array = p_arrays[ai];
@@ -595,7 +595,7 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_
} break;
case VS::ARRAY_BONES: {
- ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::PACKED_INT_ARRAY && p_arrays[ai].get_type() != Variant::PACKED_REAL_ARRAY, ERR_INVALID_PARAMETER);
+ ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::PACKED_INT32_ARRAY && p_arrays[ai].get_type() != Variant::PACKED_FLOAT32_ARRAY, ERR_INVALID_PARAMETER);
Vector<int> array = p_arrays[ai];
@@ -618,7 +618,7 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_
case VS::ARRAY_INDEX: {
ERR_FAIL_COND_V(p_index_array_len <= 0, ERR_INVALID_DATA);
- ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::PACKED_INT_ARRAY, ERR_INVALID_PARAMETER);
+ ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::PACKED_INT32_ARRAY, ERR_INVALID_PARAMETER);
Vector<int> indices = p_arrays[ai];
ERR_FAIL_COND_V(indices.size() == 0, ERR_INVALID_PARAMETER);
@@ -867,7 +867,7 @@ Error VisualServer::mesh_create_surface_data_from_arrays(SurfaceData *r_surface_
ERR_FAIL_COND_V(array_len == 0, ERR_INVALID_DATA);
} else if (i == VS::ARRAY_INDEX) {
- index_array_len = PackedIntArray(p_arrays[i]).size();
+ index_array_len = PackedInt32Array(p_arrays[i]).size();
}
}
@@ -2352,7 +2352,7 @@ VisualServer::VisualServer() {
GLOBAL_DEF("rendering/quality/filters/screen_space_roughness_limiter", 0);
ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/filters/screen_space_roughness_limiter", PropertyInfo(Variant::INT, "rendering/quality/filters/screen_space_roughness_limiter", PROPERTY_HINT_ENUM, "Disabled,Enabled (Small Cost)"));
GLOBAL_DEF("rendering/quality/filters/screen_space_roughness_limiter_curve", 1.0);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/filters/screen_space_roughness_limiter_curve", PropertyInfo(Variant::REAL, "rendering/quality/filters/screen_space_roughness_limiter_curve", PROPERTY_HINT_EXP_EASING, "0.01,8,0.01"));
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/filters/screen_space_roughness_limiter_curve", PropertyInfo(Variant::FLOAT, "rendering/quality/filters/screen_space_roughness_limiter_curve", PROPERTY_HINT_EXP_EASING, "0.01,8,0.01"));
}
VisualServer::~VisualServer() {