From 9b8e8b2220b4e2bac3310262d3d1cd7a8eb3b0a5 Mon Sep 17 00:00:00 2001 From: Bojidar Marinov Date: Fri, 12 Jan 2018 00:35:12 +0200 Subject: Bind many more properties to scripts Notable potentially breaking changes: - PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL - Some properties were renamed, and sometimes even shadowed by new ones - New getter methods (some virtual) were added --- core/bind/core_bind.cpp | 23 ++++ core/io/http_client.cpp | 3 + core/io/networked_multiplayer_peer.cpp | 4 + core/io/networked_multiplayer_peer.h | 1 + core/io/packet_peer.cpp | 12 +++ core/io/packet_peer.h | 1 + core/io/stream_peer.cpp | 5 + core/object.cpp | 4 +- core/object.h | 2 +- core/script_language.cpp | 2 + core/translation.cpp | 2 +- editor/editor_settings.cpp | 2 +- editor/plugins/animation_player_editor_plugin.cpp | 6 +- modules/enet/networked_multiplayer_enet.cpp | 6 ++ modules/enet/networked_multiplayer_enet.h | 1 + modules/gdscript/gdscript.cpp | 2 +- modules/gridmap/grid_map.cpp | 60 +++-------- modules/mono/csharp_script.cpp | 2 +- modules/regex/regex.cpp | 4 + modules/stb_vorbis/audio_stream_ogg_vorbis.cpp | 6 +- modules/theora/video_stream_theora.cpp | 2 +- modules/visual_script/visual_script.cpp | 4 +- modules/visual_script/visual_script_func_nodes.cpp | 14 +-- modules/visual_script/visual_script_nodes.cpp | 6 +- modules/webm/video_stream_webm.cpp | 2 +- scene/2d/animated_sprite.cpp | 2 +- scene/2d/camera_2d.cpp | 7 ++ scene/2d/canvas_item.cpp | 6 +- scene/2d/navigation_polygon.cpp | 6 +- scene/2d/path_2d.cpp | 80 ++++---------- scene/2d/path_2d.h | 4 +- scene/2d/physics_body_2d.cpp | 4 + scene/2d/polygon_2d.cpp | 3 +- scene/2d/tile_map.cpp | 8 +- scene/3d/baked_lightmap.cpp | 4 +- scene/3d/bone_attachment.cpp | 48 +++------ scene/3d/bone_attachment.h | 4 +- scene/3d/navigation_mesh.cpp | 4 +- scene/3d/path.cpp | 71 +++---------- scene/3d/path.h | 4 +- scene/3d/proximity_group.cpp | 35 ++++-- scene/3d/proximity_group.h | 12 ++- scene/3d/reflection_probe.cpp | 2 +- scene/3d/spatial.cpp | 4 +- scene/3d/spatial_velocity_tracker.cpp | 2 + scene/animation/animation_player.cpp | 118 +++++++++++---------- scene/animation/animation_player.h | 1 + scene/animation/tween.cpp | 2 + scene/gui/color_picker.cpp | 4 + scene/gui/control.cpp | 3 + scene/gui/file_dialog.cpp | 15 +-- scene/gui/graph_edit.cpp | 6 ++ scene/gui/graph_node.cpp | 4 + scene/gui/item_list.cpp | 3 +- scene/gui/label.cpp | 3 + scene/gui/line_edit.cpp | 3 +- scene/gui/menu_button.cpp | 2 +- scene/gui/option_button.cpp | 2 +- scene/gui/popup_menu.cpp | 3 +- scene/gui/range.cpp | 1 + scene/gui/rich_text_label.cpp | 9 ++ scene/gui/scroll_container.cpp | 6 +- scene/gui/tabs.cpp | 1 + scene/gui/text_edit.cpp | 16 ++- scene/gui/text_edit.h | 3 + scene/gui/tree.cpp | 24 +++++ scene/gui/tree.h | 2 + scene/gui/video_player.cpp | 4 + scene/main/canvas_layer.cpp | 5 +- scene/main/http_request.cpp | 1 + scene/main/node.cpp | 7 +- scene/main/resource_preloader.cpp | 2 +- scene/main/scene_tree.cpp | 20 ++++ scene/main/scene_tree.h | 1 + scene/main/timer.cpp | 2 + scene/main/viewport.cpp | 4 +- scene/resources/animation.cpp | 31 +++--- scene/resources/audio_stream_sample.cpp | 6 +- scene/resources/bit_mask.cpp | 2 +- scene/resources/concave_polygon_shape.cpp | 24 +---- scene/resources/concave_polygon_shape.h | 3 - scene/resources/curve.cpp | 6 +- scene/resources/environment.cpp | 8 +- scene/resources/font.cpp | 6 +- scene/resources/material.cpp | 48 +++------ scene/resources/mesh.cpp | 20 +--- scene/resources/multimesh.cpp | 4 +- scene/resources/polygon_path_finder.cpp | 2 +- scene/resources/shader_graph.cpp | 2 +- scene/resources/style_box.cpp | 1 + scene/resources/texture.cpp | 25 ++--- scene/resources/tile_set.cpp | 16 +-- scene/resources/world.cpp | 3 + scene/resources/world_2d.cpp | 4 + servers/audio/effects/audio_effect_reverb.cpp | 2 +- servers/audio_server.cpp | 16 +-- servers/physics_2d_server.cpp | 29 +++++ servers/physics_server.cpp | 20 ++++ 98 files changed, 566 insertions(+), 475 deletions(-) diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index c7b08b8242..c7039353ae 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -1129,6 +1129,22 @@ void _OS::_bind_methods() { ClassDB::bind_method(D_METHOD("get_power_seconds_left"), &_OS::get_power_seconds_left); ClassDB::bind_method(D_METHOD("get_power_percent_left"), &_OS::get_power_percent_left); + ADD_PROPERTY(PropertyInfo(Variant::STRING, "clipboard"), "set_clipboard", "get_clipboard"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "current_screen"), "set_current_screen", "get_current_screen"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "exit_code"), "set_exit_code", "get_exit_code"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "vsync_enabled"), "set_use_vsync", "is_vsync_enabled"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "low_processor_usage_mode"), "set_low_processor_usage_mode", "is_in_low_processor_usage_mode"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "keep_screen_on"), "set_keep_screen_on", "is_keep_screen_on"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "screen_orientation", PROPERTY_HINT_ENUM, "Landscape,Portrait,Reverse Landscape,Reverse Portrait,Sensor Landscape,Sensor Portrait,Sensor"), "set_screen_orientation", "get_screen_orientation"); + ADD_GROUP("Window", "window_"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "window_borderless"), "set_borderless_window", "get_borderless_window"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "window_fullscreen"), "set_window_fullscreen", "is_window_fullscreen"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "window_maximized"), "set_window_maximized", "is_window_maximized"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "window_minimized"), "set_window_minimized", "is_window_minimized"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "window_resizable"), "set_window_resizable", "is_window_resizable"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "window_position"), "set_window_position", "get_window_position"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "window_size"), "set_window_size", "get_window_size"); + BIND_ENUM_CONSTANT(DAY_SUNDAY); BIND_ENUM_CONSTANT(DAY_MONDAY); BIND_ENUM_CONSTANT(DAY_TUESDAY); @@ -1808,6 +1824,8 @@ void _File::_bind_methods() { ClassDB::bind_method(D_METHOD("file_exists", "path"), &_File::file_exists); ClassDB::bind_method(D_METHOD("get_modified_time", "file"), &_File::get_modified_time); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "endian_swap"), "set_endian_swap", "get_endian_swap"); + BIND_ENUM_CONSTANT(READ); BIND_ENUM_CONSTANT(WRITE); BIND_ENUM_CONSTANT(READ_WRITE); @@ -2649,6 +2667,11 @@ void _Engine::_bind_methods() { ClassDB::bind_method(D_METHOD("set_editor_hint", "enabled"), &_Engine::set_editor_hint); ClassDB::bind_method(D_METHOD("is_editor_hint"), &_Engine::is_editor_hint); + + 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"); } _Engine *_Engine::singleton = NULL; diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp index 54743d37af..a9eb9466b7 100644 --- a/core/io/http_client.cpp +++ b/core/io/http_client.cpp @@ -682,6 +682,9 @@ void HTTPClient::_bind_methods() { ClassDB::bind_method(D_METHOD("query_string_from_dict", "fields"), &HTTPClient::query_string_from_dict); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "blocking_mode_enabled"), "set_blocking_mode", "is_blocking_mode_enabled"); + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "connection", PROPERTY_HINT_RESOURCE_TYPE, "StreamPeer", 0), "set_connection", "get_connection"); + BIND_ENUM_CONSTANT(METHOD_GET); BIND_ENUM_CONSTANT(METHOD_HEAD); BIND_ENUM_CONSTANT(METHOD_POST); diff --git a/core/io/networked_multiplayer_peer.cpp b/core/io/networked_multiplayer_peer.cpp index dbfb6d9a81..6354eef8b5 100644 --- a/core/io/networked_multiplayer_peer.cpp +++ b/core/io/networked_multiplayer_peer.cpp @@ -33,6 +33,7 @@ void NetworkedMultiplayerPeer::_bind_methods() { ClassDB::bind_method(D_METHOD("set_transfer_mode", "mode"), &NetworkedMultiplayerPeer::set_transfer_mode); + ClassDB::bind_method(D_METHOD("get_transfer_mode"), &NetworkedMultiplayerPeer::get_transfer_mode); ClassDB::bind_method(D_METHOD("set_target_peer", "id"), &NetworkedMultiplayerPeer::set_target_peer); ClassDB::bind_method(D_METHOD("get_packet_peer"), &NetworkedMultiplayerPeer::get_packet_peer); @@ -45,6 +46,9 @@ void NetworkedMultiplayerPeer::_bind_methods() { ClassDB::bind_method(D_METHOD("set_refuse_new_connections", "enable"), &NetworkedMultiplayerPeer::set_refuse_new_connections); ClassDB::bind_method(D_METHOD("is_refusing_new_connections"), &NetworkedMultiplayerPeer::is_refusing_new_connections); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "refuse_new_connections"), "set_refuse_new_connections", "is_refusing_new_connections"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "transfer_mode", PROPERTY_HINT_ENUM, "Unreliable,Unreliable Ordered,Reliable"), "set_transfer_mode", "get_transfer_mode"); + BIND_ENUM_CONSTANT(TRANSFER_MODE_UNRELIABLE); BIND_ENUM_CONSTANT(TRANSFER_MODE_UNRELIABLE_ORDERED); BIND_ENUM_CONSTANT(TRANSFER_MODE_RELIABLE); diff --git a/core/io/networked_multiplayer_peer.h b/core/io/networked_multiplayer_peer.h index 057b933dc9..66089c27b9 100644 --- a/core/io/networked_multiplayer_peer.h +++ b/core/io/networked_multiplayer_peer.h @@ -58,6 +58,7 @@ public: }; virtual void set_transfer_mode(TransferMode p_mode) = 0; + virtual TransferMode get_transfer_mode() const = 0; virtual void set_target_peer(int p_peer_id) = 0; virtual int get_packet_peer() const = 0; diff --git a/core/io/packet_peer.cpp b/core/io/packet_peer.cpp index 9cfa04346c..0a54a84c8c 100644 --- a/core/io/packet_peer.cpp +++ b/core/io/packet_peer.cpp @@ -141,6 +141,8 @@ void PacketPeer::_bind_methods() { ClassDB::bind_method(D_METHOD("set_allow_object_decoding", "enable"), &PacketPeer::set_allow_object_decoding); ClassDB::bind_method(D_METHOD("is_object_decoding_allowed"), &PacketPeer::is_object_decoding_allowed); + + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "allow_object_decoding"), "set_allow_object_decoding", "is_object_decoding_allowed"); }; /***************/ @@ -154,10 +156,15 @@ void PacketPeerStream::_set_stream_peer(REF p_peer) { void PacketPeerStream::_bind_methods() { ClassDB::bind_method(D_METHOD("set_stream_peer", "peer"), &PacketPeerStream::_set_stream_peer); + ClassDB::bind_method(D_METHOD("get_stream_peer"), &PacketPeerStream::get_stream_peer); ClassDB::bind_method(D_METHOD("set_input_buffer_max_size", "max_size_bytes"), &PacketPeerStream::set_input_buffer_max_size); ClassDB::bind_method(D_METHOD("set_output_buffer_max_size", "max_size_bytes"), &PacketPeerStream::set_output_buffer_max_size); ClassDB::bind_method(D_METHOD("get_input_buffer_max_size"), &PacketPeerStream::get_input_buffer_max_size); ClassDB::bind_method(D_METHOD("get_output_buffer_max_size"), &PacketPeerStream::get_output_buffer_max_size); + + ADD_PROPERTY(PropertyInfo(Variant::INT, "input_buffer_max_size"), "set_input_buffer_max_size", "get_input_buffer_max_size"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "output_buffer_max_size"), "set_output_buffer_max_size", "get_output_buffer_max_size"); + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "stream_peer", PROPERTY_HINT_RESOURCE_TYPE, "StreamPeer", 0), "set_stream_peer", "get_stream_peer"); } Error PacketPeerStream::_poll_buffer() const { @@ -262,6 +269,11 @@ void PacketPeerStream::set_stream_peer(const Ref &p_peer) { peer = p_peer; } +Ref PacketPeerStream::get_stream_peer() const { + + return peer; +} + void PacketPeerStream::set_input_buffer_max_size(int p_max_size) { //warning may lose packets diff --git a/core/io/packet_peer.h b/core/io/packet_peer.h index 6636d56959..b10152e96b 100644 --- a/core/io/packet_peer.h +++ b/core/io/packet_peer.h @@ -98,6 +98,7 @@ public: virtual int get_max_packet_size() const; void set_stream_peer(const Ref &p_peer); + Ref get_stream_peer() const; void set_input_buffer_max_size(int p_max_size); int get_input_buffer_max_size() const; void set_output_buffer_max_size(int p_max_size); diff --git a/core/io/stream_peer.cpp b/core/io/stream_peer.cpp index f142abd3a4..fc00c26889 100644 --- a/core/io/stream_peer.cpp +++ b/core/io/stream_peer.cpp @@ -401,6 +401,8 @@ void StreamPeer::_bind_methods() { ClassDB::bind_method(D_METHOD("get_string", "bytes"), &StreamPeer::get_string); ClassDB::bind_method(D_METHOD("get_utf8_string", "bytes"), &StreamPeer::get_utf8_string); ClassDB::bind_method(D_METHOD("get_var"), &StreamPeer::get_var); + + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "big_endian"), "set_big_endian", "is_big_endian_enabled"); } //////////////////////////////// @@ -414,6 +416,9 @@ void StreamPeerBuffer::_bind_methods() { ClassDB::bind_method(D_METHOD("get_data_array"), &StreamPeerBuffer::get_data_array); ClassDB::bind_method(D_METHOD("clear"), &StreamPeerBuffer::clear); ClassDB::bind_method(D_METHOD("duplicate"), &StreamPeerBuffer::duplicate); + + ADD_PROPERTY(PropertyInfo(Variant::POOL_BYTE_ARRAY, "data_array"), "set_data_array", "get_data_array"); + } Error StreamPeerBuffer::put_data(const uint8_t *p_data, int p_bytes) { diff --git a/core/object.cpp b/core/object.cpp index f9d733c11f..aaa37e6cf2 100644 --- a/core/object.cpp +++ b/core/object.cpp @@ -605,11 +605,11 @@ void Object::get_property_list(List *p_list, bool p_reversed) cons p_list->push_back(PropertyInfo(Variant::OBJECT, "script", PROPERTY_HINT_RESOURCE_TYPE, "Script", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_STORE_IF_NONZERO)); #ifdef TOOLS_ENABLED if (editor_section_folding.size()) { - p_list->push_back(PropertyInfo(Variant::ARRAY, CoreStringNames::get_singleton()->_sections_unfolded, PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); + p_list->push_back(PropertyInfo(Variant::ARRAY, CoreStringNames::get_singleton()->_sections_unfolded, PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); } #endif if (!metadata.empty()) - p_list->push_back(PropertyInfo(Variant::DICTIONARY, "__meta__", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_STORE_IF_NONZERO)); + p_list->push_back(PropertyInfo(Variant::DICTIONARY, "__meta__", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL | PROPERTY_USAGE_STORE_IF_NONZERO)); if (script_instance && !p_reversed) { p_list->push_back(PropertyInfo(Variant::NIL, "Script Variables", PROPERTY_HINT_NONE, String(), PROPERTY_USAGE_CATEGORY)); script_instance->get_property_list(p_list); diff --git a/core/object.h b/core/object.h index 98ce62551b..75800acaa7 100644 --- a/core/object.h +++ b/core/object.h @@ -115,7 +115,7 @@ enum PropertyUsageFlags { PROPERTY_USAGE_DEFAULT = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_NETWORK, PROPERTY_USAGE_DEFAULT_INTL = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_NETWORK | PROPERTY_USAGE_INTERNATIONALIZED, - PROPERTY_USAGE_NOEDITOR = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK | PROPERTY_USAGE_INTERNAL, + PROPERTY_USAGE_NOEDITOR = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, }; #define ADD_SIGNAL(m_signal) ClassDB::add_signal(get_class_static(), m_signal) diff --git a/core/script_language.cpp b/core/script_language.cpp index 2a8c76c4b8..1dab58e29e 100644 --- a/core/script_language.cpp +++ b/core/script_language.cpp @@ -61,6 +61,8 @@ void Script::_bind_methods() { ClassDB::bind_method(D_METHOD("has_script_signal", "signal_name"), &Script::has_script_signal); ClassDB::bind_method(D_METHOD("is_tool"), &Script::is_tool); + + ADD_PROPERTY(PropertyInfo(Variant::STRING, "source_code", PROPERTY_HINT_NONE, "", 0), "set_source_code", "get_source_code"); } void ScriptServer::set_scripting_enabled(bool p_enabled) { diff --git a/core/translation.cpp b/core/translation.cpp index cf947404cd..32096d2eab 100644 --- a/core/translation.cpp +++ b/core/translation.cpp @@ -873,7 +873,7 @@ void Translation::_bind_methods() { ClassDB::bind_method(D_METHOD("_set_messages"), &Translation::_set_messages); ClassDB::bind_method(D_METHOD("_get_messages"), &Translation::_get_messages); - ADD_PROPERTY(PropertyInfo(Variant::POOL_STRING_ARRAY, "messages", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_messages", "_get_messages"); + ADD_PROPERTY(PropertyInfo(Variant::POOL_STRING_ARRAY, "messages", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_messages", "_get_messages"); ADD_PROPERTY(PropertyInfo(Variant::STRING, "locale"), "set_locale", "get_locale"); } diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index d3e3269c42..86000d7744 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -213,7 +213,7 @@ void EditorSettings::_get_property_list(List *p_list) const { p_list->push_back(pi); } - p_list->push_back(PropertyInfo(Variant::ARRAY, "shortcuts", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); //do not edit + p_list->push_back(PropertyInfo(Variant::ARRAY, "shortcuts", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); //do not edit } void EditorSettings::_add_property_info_bind(const Dictionary &p_info) { diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index 86b085b429..3593493d11 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -299,7 +299,7 @@ void AnimationPlayerEditor::_animation_selected(int p_which) { if (current != "") { - player->set_current_animation(current); + // player->set_current_animation(current, false); Ref anim = player->get_animation(current); { @@ -654,7 +654,9 @@ Dictionary AnimationPlayerEditor::get_state() const { d["visible"] = is_visible_in_tree(); if (EditorNode::get_singleton()->get_edited_scene() && is_visible_in_tree() && player) { d["player"] = EditorNode::get_singleton()->get_edited_scene()->get_path_to(player); - d["animation"] = player->get_current_animation(); + } + if (animation->get_selected() >= 0 && animation->get_selected() < animation->get_item_count()) { + d["animation"] = animation->get_item_text(animation->get_selected()); } return d; diff --git a/modules/enet/networked_multiplayer_enet.cpp b/modules/enet/networked_multiplayer_enet.cpp index 3ad80d3978..f3f4acd768 100644 --- a/modules/enet/networked_multiplayer_enet.cpp +++ b/modules/enet/networked_multiplayer_enet.cpp @@ -36,6 +36,10 @@ void NetworkedMultiplayerENet::set_transfer_mode(TransferMode p_mode) { transfer_mode = p_mode; } +NetworkedMultiplayerPeer::TransferMode NetworkedMultiplayerENet::get_transfer_mode() const { + + return transfer_mode; +} void NetworkedMultiplayerENet::set_target_peer(int p_peer) { @@ -659,6 +663,8 @@ void NetworkedMultiplayerENet::_bind_methods() { ClassDB::bind_method(D_METHOD("get_compression_mode"), &NetworkedMultiplayerENet::get_compression_mode); ClassDB::bind_method(D_METHOD("set_bind_ip", "ip"), &NetworkedMultiplayerENet::set_bind_ip); + ADD_PROPERTY(PropertyInfo(Variant::INT, "compression_mode", PROPERTY_HINT_ENUM, "None,Range Coder,FastLZ,ZLib,ZStd"), "set_compression_mode", "get_compression_mode"); + BIND_ENUM_CONSTANT(COMPRESS_NONE); BIND_ENUM_CONSTANT(COMPRESS_RANGE_CODER); BIND_ENUM_CONSTANT(COMPRESS_FASTLZ); diff --git a/modules/enet/networked_multiplayer_enet.h b/modules/enet/networked_multiplayer_enet.h index 93758de94b..440e9b5400 100644 --- a/modules/enet/networked_multiplayer_enet.h +++ b/modules/enet/networked_multiplayer_enet.h @@ -110,6 +110,7 @@ protected: public: virtual void set_transfer_mode(TransferMode p_mode); + virtual TransferMode get_transfer_mode() const; virtual void set_target_peer(int p_peer); virtual int get_packet_peer() const; diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index 228c7dc56f..4e3ee4d22c 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -705,7 +705,7 @@ bool GDScript::_set(const StringName &p_name, const Variant &p_value) { void GDScript::_get_property_list(List *p_properties) const { - p_properties->push_back(PropertyInfo(Variant::STRING, "script/source", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); + p_properties->push_back(PropertyInfo(Variant::STRING, "script/source", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); } void GDScript::_bind_methods() { diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp index e8e9419af8..234a59e516 100644 --- a/modules/gridmap/grid_map.cpp +++ b/modules/gridmap/grid_map.cpp @@ -43,28 +43,7 @@ bool GridMap::_set(const StringName &p_name, const Variant &p_value) { String name = p_name; - if (name == "theme") { - - set_theme(p_value); - } else if (name == "cell_size") { - if (p_value.get_type() == Variant::INT || p_value.get_type() == Variant::REAL) { - //compatibility - float cs = p_value; - set_cell_size(Vector3(cs, cs, cs)); - } else { - set_cell_size(p_value); - } - } else if (name == "cell_octant_size") { - set_octant_size(p_value); - } else if (name == "cell_center_x") { - set_center_x(p_value); - } else if (name == "cell_center_y") { - set_center_y(p_value); - } else if (name == "cell_center_z") { - set_center_z(p_value); - } else if (name == "cell_scale") { - set_cell_scale(p_value); - /* } else if (name=="cells") { + /* } else if (name=="cells") { PoolVector cells = p_value; int amount=cells.size(); PoolVector::Read r = cells.read(); @@ -81,7 +60,7 @@ bool GridMap::_set(const StringName &p_name, const Variant &p_value) { } _recreate_octant_data();*/ - } else if (name == "data") { + if (name == "data") { Dictionary d = p_value; @@ -134,21 +113,7 @@ bool GridMap::_get(const StringName &p_name, Variant &r_ret) const { String name = p_name; - if (name == "theme") { - r_ret = get_theme(); - } else if (name == "cell_size") { - r_ret = get_cell_size(); - } else if (name == "cell_octant_size") { - r_ret = get_octant_size(); - } else if (name == "cell_center_x") { - r_ret = get_center_x(); - } else if (name == "cell_center_y") { - r_ret = get_center_y(); - } else if (name == "cell_center_z") { - r_ret = get_center_z(); - } else if (name == "cell_scale") { - r_ret = cell_scale; - } else if (name == "data") { + if (name == "data") { Dictionary d; @@ -184,14 +149,6 @@ bool GridMap::_get(const StringName &p_name, Variant &r_ret) const { void GridMap::_get_property_list(List *p_list) const { - p_list->push_back(PropertyInfo(Variant::OBJECT, "theme", PROPERTY_HINT_RESOURCE_TYPE, "MeshLibrary")); - p_list->push_back(PropertyInfo(Variant::NIL, "Cell", PROPERTY_HINT_NONE, "cell_", PROPERTY_USAGE_GROUP)); - p_list->push_back(PropertyInfo(Variant::VECTOR3, "cell_size")); - p_list->push_back(PropertyInfo(Variant::INT, "cell_octant_size", PROPERTY_HINT_RANGE, "1,1024,1")); - p_list->push_back(PropertyInfo(Variant::BOOL, "cell_center_x")); - p_list->push_back(PropertyInfo(Variant::BOOL, "cell_center_y")); - p_list->push_back(PropertyInfo(Variant::BOOL, "cell_center_z")); - p_list->push_back(PropertyInfo(Variant::REAL, "cell_scale")); if (baked_meshes.size()) { p_list->push_back(PropertyInfo(Variant::ARRAY, "baked_meshes", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE)); } @@ -895,6 +852,9 @@ void GridMap::_bind_methods() { ClassDB::bind_method(D_METHOD("set_cell_size", "size"), &GridMap::set_cell_size); ClassDB::bind_method(D_METHOD("get_cell_size"), &GridMap::get_cell_size); + ClassDB::bind_method(D_METHOD("set_cell_scale", "scale"), &GridMap::set_cell_scale); + ClassDB::bind_method(D_METHOD("get_cell_scale"), &GridMap::get_cell_scale); + ClassDB::bind_method(D_METHOD("set_octant_size", "size"), &GridMap::set_octant_size); ClassDB::bind_method(D_METHOD("get_octant_size"), &GridMap::get_octant_size); @@ -929,6 +889,14 @@ void GridMap::_bind_methods() { ClassDB::bind_method(D_METHOD("clear_baked_meshes"), &GridMap::clear_baked_meshes); ClassDB::bind_method(D_METHOD("make_baked_meshes", "gen_lightmap_uv", "lightmap_uv_texel_size"), &GridMap::make_baked_meshes, DEFVAL(false), DEFVAL(0.1)); + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "theme", PROPERTY_HINT_RESOURCE_TYPE, "MeshLibrary"), "set_theme", "get_theme"); + ADD_GROUP("Cell", "cell_"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "cell_size"), "set_cell_size", "get_cell_size"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "cell_octant_size", PROPERTY_HINT_RANGE, "1,1024,1"), "set_octant_size", "get_octant_size"); + 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_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/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index db2d0a9780..8f8116e26e 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -1676,7 +1676,7 @@ bool CSharpScript::_set(const StringName &p_name, const Variant &p_value) { void CSharpScript::_get_property_list(List *p_properties) const { - p_properties->push_back(PropertyInfo(Variant::STRING, CSharpLanguage::singleton->string_names._script_source, PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); + p_properties->push_back(PropertyInfo(Variant::STRING, CSharpLanguage::singleton->string_names._script_source, PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); } void CSharpScript::_bind_methods() { diff --git a/modules/regex/regex.cpp b/modules/regex/regex.cpp index 3fe7e36d45..6f2bb46fc8 100644 --- a/modules/regex/regex.cpp +++ b/modules/regex/regex.cpp @@ -156,6 +156,10 @@ void RegExMatch::_bind_methods() { ClassDB::bind_method(D_METHOD("get_string", "name"), &RegExMatch::get_string, DEFVAL(0)); ClassDB::bind_method(D_METHOD("get_start", "name"), &RegExMatch::get_start, DEFVAL(0)); ClassDB::bind_method(D_METHOD("get_end", "name"), &RegExMatch::get_end, DEFVAL(0)); + + ADD_PROPERTY(PropertyInfo(Variant::STRING, "subject"), "", "get_subject"); + ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "names"), "", "get_names"); + ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "strings"), "", "get_strings"); } void RegEx::_pattern_info(uint32_t what, void *where) const { diff --git a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp index d06bd79460..6a6ee390cc 100644 --- a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp +++ b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp @@ -263,8 +263,8 @@ float AudioStreamOGGVorbis::get_loop_offset() const { void AudioStreamOGGVorbis::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_data", "data"), &AudioStreamOGGVorbis::set_data); - ClassDB::bind_method(D_METHOD("get_data"), &AudioStreamOGGVorbis::get_data); + ClassDB::bind_method(D_METHOD("_set_data", "data"), &AudioStreamOGGVorbis::set_data); + ClassDB::bind_method(D_METHOD("_get_data"), &AudioStreamOGGVorbis::get_data); ClassDB::bind_method(D_METHOD("set_loop", "enable"), &AudioStreamOGGVorbis::set_loop); ClassDB::bind_method(D_METHOD("has_loop"), &AudioStreamOGGVorbis::has_loop); @@ -272,7 +272,7 @@ void AudioStreamOGGVorbis::_bind_methods() { ClassDB::bind_method(D_METHOD("set_loop_offset", "seconds"), &AudioStreamOGGVorbis::set_loop_offset); ClassDB::bind_method(D_METHOD("get_loop_offset"), &AudioStreamOGGVorbis::get_loop_offset); - ADD_PROPERTY(PropertyInfo(Variant::POOL_BYTE_ARRAY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_data", "get_data"); + ADD_PROPERTY(PropertyInfo(Variant::POOL_BYTE_ARRAY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_data", "_get_data"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "loop", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_loop", "has_loop"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "loop_offset", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_loop_offset", "get_loop_offset"); } diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp index ac1e81859a..58c6d73ab2 100644 --- a/modules/theora/video_stream_theora.cpp +++ b/modules/theora/video_stream_theora.cpp @@ -724,5 +724,5 @@ void VideoStreamTheora::_bind_methods() { ClassDB::bind_method(D_METHOD("set_file", "file"), &VideoStreamTheora::set_file); ClassDB::bind_method(D_METHOD("get_file"), &VideoStreamTheora::get_file); - ADD_PROPERTY(PropertyInfo(Variant::STRING, "file", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_file", "get_file"); + ADD_PROPERTY(PropertyInfo(Variant::STRING, "file", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "set_file", "get_file"); } diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp index fd493978e6..5987fdf5da 100644 --- a/modules/visual_script/visual_script.cpp +++ b/modules/visual_script/visual_script.cpp @@ -130,7 +130,7 @@ void VisualScriptNode::_bind_methods() { ClassDB::bind_method(D_METHOD("_set_default_input_values", "values"), &VisualScriptNode::_set_default_input_values); ClassDB::bind_method(D_METHOD("_get_default_input_values"), &VisualScriptNode::_get_default_input_values); - ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "_default_input_values", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_default_input_values", "_get_default_input_values"); + ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "_default_input_values", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_default_input_values", "_get_default_input_values"); ADD_SIGNAL(MethodInfo("ports_changed")); } @@ -1319,7 +1319,7 @@ void VisualScript::_bind_methods() { ClassDB::bind_method(D_METHOD("_set_data", "data"), &VisualScript::_set_data); ClassDB::bind_method(D_METHOD("_get_data"), &VisualScript::_get_data); - ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_data", "_get_data"); + ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_data", "_get_data"); ADD_SIGNAL(MethodInfo("node_ports_changed", PropertyInfo(Variant::STRING, "function"), PropertyInfo(Variant::INT, "id"))); } diff --git a/modules/visual_script/visual_script_func_nodes.cpp b/modules/visual_script/visual_script_func_nodes.cpp index 130b243715..187c9b0b9e 100644 --- a/modules/visual_script/visual_script_func_nodes.cpp +++ b/modules/visual_script/visual_script_func_nodes.cpp @@ -425,7 +425,7 @@ void VisualScriptFunctionCall::_update_method_cache() { #ifdef DEBUG_METHODS_ENABLED - method_cache.return_val = mb->get_argument_info(-1); + method_cache.return_val = mb->get_return_info(); #endif if (mb->is_vararg()) { @@ -546,7 +546,7 @@ void VisualScriptFunctionCall::_validate_property(PropertyInfo &property) const if (property.name == "base_type") { if (call_mode != CALL_MODE_INSTANCE) { - property.usage = PROPERTY_USAGE_NOEDITOR; + property.usage = PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL; } } @@ -739,7 +739,7 @@ void VisualScriptFunctionCall::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::STRING, "singleton"), "set_singleton", "get_singleton"); ADD_PROPERTY(PropertyInfo(Variant::INT, "basic_type", PROPERTY_HINT_ENUM, bt), "set_basic_type", "get_basic_type"); ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "node_path", PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE), "set_base_path", "get_base_path"); - ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "argument_cache", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_argument_cache", "_get_argument_cache"); + ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "argument_cache", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_argument_cache", "_get_argument_cache"); ADD_PROPERTY(PropertyInfo(Variant::STRING, "function"), "set_function", "get_function"); //when set, if loaded properly, will override argument count. ADD_PROPERTY(PropertyInfo(Variant::INT, "use_default_args"), "set_use_default_args", "get_use_default_args"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "validate"), "set_validate", "get_validate"); @@ -1350,7 +1350,7 @@ void VisualScriptPropertySet::_validate_property(PropertyInfo &property) const { if (property.name == "base_type") { if (call_mode != CALL_MODE_INSTANCE) { - property.usage = PROPERTY_USAGE_NOEDITOR; + property.usage = PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL; } } @@ -1493,7 +1493,7 @@ void VisualScriptPropertySet::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "set_mode", PROPERTY_HINT_ENUM, "Self,Node Path,Instance,Basic Type"), "set_call_mode", "get_call_mode"); ADD_PROPERTY(PropertyInfo(Variant::STRING, "base_type", PROPERTY_HINT_TYPE_STRING, "Object"), "set_base_type", "get_base_type"); ADD_PROPERTY(PropertyInfo(Variant::STRING, "base_script", PROPERTY_HINT_FILE, script_ext_hint), "set_base_script", "get_base_script"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "type_cache", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_type_cache", "_get_type_cache"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "type_cache", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_type_cache", "_get_type_cache"); ADD_PROPERTY(PropertyInfo(Variant::INT, "basic_type", PROPERTY_HINT_ENUM, bt), "set_basic_type", "get_basic_type"); ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "node_path", PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE), "set_base_path", "get_base_path"); ADD_PROPERTY(PropertyInfo(Variant::STRING, "property"), "set_property", "get_property"); @@ -2078,7 +2078,7 @@ void VisualScriptPropertyGet::_validate_property(PropertyInfo &property) const { if (property.name == "base_type") { if (call_mode != CALL_MODE_INSTANCE) { - property.usage = PROPERTY_USAGE_NOEDITOR; + property.usage = PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL; } } @@ -2217,7 +2217,7 @@ void VisualScriptPropertyGet::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "set_mode", PROPERTY_HINT_ENUM, "Self,Node Path,Instance,Basic Type"), "set_call_mode", "get_call_mode"); ADD_PROPERTY(PropertyInfo(Variant::STRING, "base_type", PROPERTY_HINT_TYPE_STRING, "Object"), "set_base_type", "get_base_type"); ADD_PROPERTY(PropertyInfo(Variant::STRING, "base_script", PROPERTY_HINT_FILE, script_ext_hint), "set_base_script", "get_base_script"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "type_cache", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_type_cache", "_get_type_cache"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "type_cache", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_type_cache", "_get_type_cache"); ADD_PROPERTY(PropertyInfo(Variant::INT, "basic_type", PROPERTY_HINT_ENUM, bt), "set_basic_type", "get_basic_type"); ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "node_path", PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE), "set_base_path", "get_base_path"); ADD_PROPERTY(PropertyInfo(Variant::STRING, "property"), "set_property", "get_property"); diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp index 1988eb0f5b..e0b4fde237 100644 --- a/modules/visual_script/visual_script_nodes.cpp +++ b/modules/visual_script/visual_script_nodes.cpp @@ -3107,8 +3107,8 @@ void VisualScriptConstructor::_bind_methods() { ClassDB::bind_method(D_METHOD("set_constructor", "constructor"), &VisualScriptConstructor::set_constructor); ClassDB::bind_method(D_METHOD("get_constructor"), &VisualScriptConstructor::get_constructor); - ADD_PROPERTY(PropertyInfo(Variant::INT, "type", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_constructor_type", "get_constructor_type"); - ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "constructor", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_constructor", "get_constructor"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "type", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "set_constructor_type", "get_constructor_type"); + ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "constructor", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "set_constructor", "get_constructor"); } VisualScriptConstructor::VisualScriptConstructor() { @@ -3722,7 +3722,7 @@ void VisualScriptDeconstruct::_bind_methods() { } ADD_PROPERTY(PropertyInfo(Variant::INT, "type", PROPERTY_HINT_ENUM, argt), "set_deconstruct_type", "get_deconstruct_type"); - ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "elem_cache", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_elem_cache", "_get_elem_cache"); + ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "elem_cache", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_elem_cache", "_get_elem_cache"); } VisualScriptDeconstruct::VisualScriptDeconstruct() { diff --git a/modules/webm/video_stream_webm.cpp b/modules/webm/video_stream_webm.cpp index e6952d14d7..fac47225bc 100644 --- a/modules/webm/video_stream_webm.cpp +++ b/modules/webm/video_stream_webm.cpp @@ -436,7 +436,7 @@ void VideoStreamWebm::_bind_methods() { ClassDB::bind_method(D_METHOD("set_file", "file"), &VideoStreamWebm::set_file); ClassDB::bind_method(D_METHOD("get_file"), &VideoStreamWebm::get_file); - ADD_PROPERTY(PropertyInfo(Variant::STRING, "file", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_file", "get_file"); + ADD_PROPERTY(PropertyInfo(Variant::STRING, "file", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "set_file", "get_file"); } void VideoStreamWebm::set_audio_track(int p_track) { diff --git a/scene/2d/animated_sprite.cpp b/scene/2d/animated_sprite.cpp index a9d3a4cc64..f290a181ec 100644 --- a/scene/2d/animated_sprite.cpp +++ b/scene/2d/animated_sprite.cpp @@ -240,7 +240,7 @@ void SpriteFrames::_bind_methods() { ClassDB::bind_method(D_METHOD("_set_animations"), &SpriteFrames::_set_animations); ClassDB::bind_method(D_METHOD("_get_animations"), &SpriteFrames::_get_animations); - ADD_PROPERTYNZ(PropertyInfo(Variant::ARRAY, "animations", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_animations", "_get_animations"); //compatibility + ADD_PROPERTYNZ(PropertyInfo(Variant::ARRAY, "animations", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_animations", "_get_animations"); //compatibility } SpriteFrames::SpriteFrames() { diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp index 006347d30a..e7e62a197c 100644 --- a/scene/2d/camera_2d.cpp +++ b/scene/2d/camera_2d.cpp @@ -541,6 +541,7 @@ bool Camera2D::is_v_drag_enabled() const { void Camera2D::set_v_offset(float p_offset) { v_ofs = p_offset; + _update_scroll(); } float Camera2D::get_v_offset() const { @@ -551,6 +552,7 @@ float Camera2D::get_v_offset() const { void Camera2D::set_h_offset(float p_offset) { h_ofs = p_offset; + _update_scroll(); } float Camera2D::get_h_offset() const { @@ -713,6 +715,7 @@ void Camera2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "rotating"), "set_rotating", "is_rotating"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "current"), "_set_current", "is_current"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "zoom"), "set_zoom", "get_zoom"); + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "custom_viewport", PROPERTY_HINT_RESOURCE_TYPE, "Viewport", 0), "set_custom_viewport", "get_custom_viewport"); ADD_GROUP("Limit", "limit_"); ADD_PROPERTYI(PropertyInfo(Variant::INT, "limit_left"), "set_limit", "get_limit", MARGIN_LEFT); @@ -729,6 +732,10 @@ void Camera2D::_bind_methods() { 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_GROUP("Offset", "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::REAL, "offset_h", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_h_offset", "get_h_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); diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp index 0854efc69c..12d6f32567 100644 --- a/scene/2d/canvas_item.cpp +++ b/scene/2d/canvas_item.cpp @@ -1059,9 +1059,9 @@ void CanvasItem::_bind_methods() { ADD_GROUP("Material", ""); ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT, "material", PROPERTY_HINT_RESOURCE_TYPE, "ShaderMaterial,CanvasItemMaterial"), "set_material", "get_material"); ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "use_parent_material"), "set_use_parent_material", "get_use_parent_material"); - //exporting these two things doesn't really make much sense i think - //ADD_PROPERTY( PropertyInfo(Variant::BOOL,"transform/toplevel"), "set_as_toplevel","is_set_as_toplevel") ; - //ADD_PROPERTY(PropertyInfo(Variant::BOOL,"transform/notify"),"set_transform_notify","is_transform_notify_enabled"); + //exporting these things doesn't really make much sense i think + // ADD_PROPERTY(PropertyInfo(Variant::BOOL, "toplevel", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_as_toplevel", "is_set_as_toplevel"); + // ADD_PROPERTY(PropertyInfo(Variant::BOOL,"transform/notify"),"set_transform_notify","is_transform_notify_enabled"); ADD_SIGNAL(MethodInfo("draw")); ADD_SIGNAL(MethodInfo("visibility_changed")); diff --git a/scene/2d/navigation_polygon.cpp b/scene/2d/navigation_polygon.cpp index 2625748f34..6e27bf1c1d 100644 --- a/scene/2d/navigation_polygon.cpp +++ b/scene/2d/navigation_polygon.cpp @@ -312,9 +312,9 @@ void NavigationPolygon::_bind_methods() { ClassDB::bind_method(D_METHOD("_set_outlines", "outlines"), &NavigationPolygon::_set_outlines); ClassDB::bind_method(D_METHOD("_get_outlines"), &NavigationPolygon::_get_outlines); - ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR3_ARRAY, "vertices", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_vertices", "get_vertices"); - ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "polygons", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_polygons", "_get_polygons"); - ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "outlines", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_outlines", "_get_outlines"); + ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR3_ARRAY, "vertices", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "set_vertices", "get_vertices"); + ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "polygons", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_polygons", "_get_polygons"); + ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "outlines", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_outlines", "_get_outlines"); } NavigationPolygon::NavigationPolygon() : diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp index 71ba335f13..2c8f509bd3 100644 --- a/scene/2d/path_2d.cpp +++ b/scene/2d/path_2d.cpp @@ -244,66 +244,16 @@ bool PathFollow2D::get_cubic_interpolation() const { return cubic; } -bool PathFollow2D::_set(const StringName &p_name, const Variant &p_value) { - - if (p_name == SceneStringNames::get_singleton()->offset) { - set_offset(p_value); - } else if (p_name == SceneStringNames::get_singleton()->unit_offset) { - set_unit_offset(p_value); - } else if (p_name == SceneStringNames::get_singleton()->rotate) { - set_rotate(p_value); - } else if (p_name == SceneStringNames::get_singleton()->v_offset) { - set_v_offset(p_value); - } else if (p_name == SceneStringNames::get_singleton()->h_offset) { - set_h_offset(p_value); - } else if (String(p_name) == "cubic_interp") { - set_cubic_interpolation(p_value); - } else if (String(p_name) == "loop") { - set_loop(p_value); - } else if (String(p_name) == "lookahead") { - set_lookahead(p_value); - } else - return false; - - return true; -} +void PathFollow2D::_validate_property(PropertyInfo &property) const { -bool PathFollow2D::_get(const StringName &p_name, Variant &r_ret) const { - - if (p_name == SceneStringNames::get_singleton()->offset) { - r_ret = get_offset(); - } else if (p_name == SceneStringNames::get_singleton()->unit_offset) { - r_ret = get_unit_offset(); - } else if (p_name == SceneStringNames::get_singleton()->rotate) { - r_ret = is_rotating(); - } else if (p_name == SceneStringNames::get_singleton()->v_offset) { - r_ret = get_v_offset(); - } else if (p_name == SceneStringNames::get_singleton()->h_offset) { - r_ret = get_h_offset(); - } else if (String(p_name) == "cubic_interp") { - r_ret = cubic; - } else if (String(p_name) == "loop") { - r_ret = loop; - } else if (String(p_name) == "lookahead") { - r_ret = lookahead; - } else - return false; - - return true; -} -void PathFollow2D::_get_property_list(List *p_list) const { - - float max = 10000; - if (path && path->get_curve().is_valid()) - max = path->get_curve()->get_baked_length(); - p_list->push_back(PropertyInfo(Variant::REAL, "offset", PROPERTY_HINT_RANGE, "0," + rtos(max) + ",0.01")); - p_list->push_back(PropertyInfo(Variant::REAL, "unit_offset", PROPERTY_HINT_RANGE, "0,1,0.0001", PROPERTY_USAGE_EDITOR)); - p_list->push_back(PropertyInfo(Variant::REAL, "h_offset")); - p_list->push_back(PropertyInfo(Variant::REAL, "v_offset")); - p_list->push_back(PropertyInfo(Variant::BOOL, "rotate")); - p_list->push_back(PropertyInfo(Variant::BOOL, "cubic_interp")); - p_list->push_back(PropertyInfo(Variant::BOOL, "loop")); - p_list->push_back(PropertyInfo(Variant::REAL, "lookahead", PROPERTY_HINT_RANGE, "0.001,1024.0,0.001")); + if (property.name == "offset") { + + float max = 10000; + if (path && path->get_curve().is_valid()) + max = path->get_curve()->get_baked_length(); + + property.hint_string = "0," + rtos(max) + ",0.01"; + } } String PathFollow2D::get_configuration_warning() const { @@ -340,6 +290,18 @@ void PathFollow2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_loop", "loop"), &PathFollow2D::set_loop); ClassDB::bind_method(D_METHOD("has_loop"), &PathFollow2D::has_loop); + + 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"), "set_offset", "get_offset"); + ADD_PROPERTY(PropertyInfo(Variant::REAL, "unit_offset", PROPERTY_HINT_RANGE, "0,1,0.0001", 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::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"); } void PathFollow2D::set_offset(float p_offset) { diff --git a/scene/2d/path_2d.h b/scene/2d/path_2d.h index fd16f67219..735d289d74 100644 --- a/scene/2d/path_2d.h +++ b/scene/2d/path_2d.h @@ -74,9 +74,7 @@ private: void _update_transform(); protected: - bool _set(const StringName &p_name, const Variant &p_value); - bool _get(const StringName &p_name, Variant &r_ret) const; - void _get_property_list(List *p_list) const; + virtual void _validate_property(PropertyInfo &property) const; void _notification(int p_what); static void _bind_methods(); diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp index 60aebf5d09..7f96a258e0 100644 --- a/scene/2d/physics_body_2d.cpp +++ b/scene/2d/physics_body_2d.cpp @@ -889,6 +889,7 @@ void RigidBody2D::_bind_methods() { 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::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"); @@ -905,6 +906,9 @@ void RigidBody2D::_bind_methods() { 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,128,0.01"), "set_angular_damp", "get_angular_damp"); + ADD_GROUP("Applied Forces", "applied_"); + ADD_PROPERTYNZ(PropertyInfo(Variant::VECTOR2, "applied_force"), "set_applied_force", "get_applied_force"); + ADD_PROPERTYNZ(PropertyInfo(Variant::REAL, "applied_torque"), "set_applied_torque", "get_applied_torque"); ADD_SIGNAL(MethodInfo("body_shape_entered", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body"), 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"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "local_shape"))); diff --git a/scene/2d/polygon_2d.cpp b/scene/2d/polygon_2d.cpp index 1b74256248..f6cb796b10 100644 --- a/scene/2d/polygon_2d.cpp +++ b/scene/2d/polygon_2d.cpp @@ -383,7 +383,8 @@ void Polygon2D::_bind_methods() { ADD_GROUP("Texture", "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", PROPERTY_HINT_RANGE, "-1440,1440,0.1"), "set_texture_rotation_degrees", "get_texture_rotation_degrees"); + ADD_PROPERTY(PropertyInfo(Variant::REAL, "texture_rotation_degrees", PROPERTY_HINT_RANGE, "-1440,1440,0.1"), "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_GROUP("Invert", "invert_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "invert_enable"), "set_invert", "get_invert"); diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index 5367e42aa9..361d765c97 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -999,8 +999,8 @@ void TileMap::_set_tile_data(const PoolVector &p_data) { bool flip_v = v & (1 << 30); bool transpose = v & (1 << 31); v &= (1 << 29) - 1; - int16_t coord_x; - int16_t coord_y; + int16_t coord_x = 0; + int16_t coord_y = 0; if (format == FORMAT_2) { coord_x = decode_uint16(&local[8]); coord_y = decode_uint16(&local[10]); @@ -1312,10 +1312,10 @@ bool TileMap::_get(const StringName &p_name, Variant &r_ret) const { void TileMap::_get_property_list(List *p_list) const { - PropertyInfo p(Variant::INT, "format", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR); + PropertyInfo p(Variant::INT, "format", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL); p_list->push_back(p); - p = PropertyInfo(Variant::OBJECT, "tile_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR); + p = PropertyInfo(Variant::OBJECT, "tile_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL); p_list->push_back(p); } diff --git a/scene/3d/baked_lightmap.cpp b/scene/3d/baked_lightmap.cpp index 9d77951bff..fa4e6492a1 100644 --- a/scene/3d/baked_lightmap.cpp +++ b/scene/3d/baked_lightmap.cpp @@ -170,11 +170,11 @@ void BakedLightmapData::_bind_methods() { ClassDB::bind_method(D_METHOD("clear_users"), &BakedLightmapData::clear_users); ADD_PROPERTY(PropertyInfo(Variant::AABB, "bounds", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_bounds", "get_bounds"); - ADD_PROPERTY(PropertyInfo(Variant::POOL_BYTE_ARRAY, "octree", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_octree", "get_octree"); 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"), "set_energy", "get_energy"); - ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "user_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_user_data", "_get_user_data"); + ADD_PROPERTY(PropertyInfo(Variant::POOL_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"); } BakedLightmapData::BakedLightmapData() { diff --git a/scene/3d/bone_attachment.cpp b/scene/3d/bone_attachment.cpp index 3882b8548b..a875b65c22 100644 --- a/scene/3d/bone_attachment.cpp +++ b/scene/3d/bone_attachment.cpp @@ -30,43 +30,27 @@ #include "bone_attachment.h" -bool BoneAttachment::_get(const StringName &p_name, Variant &r_ret) const { +void BoneAttachment::_validate_property(PropertyInfo &property) const { - if (String(p_name) == "bone_name") { + if (property.name == "bone_name") { + Skeleton *parent = Object::cast_to(get_parent()); - r_ret = get_bone_name(); - return true; - } - - return false; -} -bool BoneAttachment::_set(const StringName &p_name, const Variant &p_value) { - - if (String(p_name) == "bone_name") { - - set_bone_name(p_value); - return true; - } + if (parent) { - return false; -} -void BoneAttachment::_get_property_list(List *p_list) const { - - Skeleton *parent = Object::cast_to(get_parent()); + String names; + for (int i = 0; i < parent->get_bone_count(); i++) { + if (i > 0) + names += ","; + names += parent->get_bone_name(i); + } - if (parent) { + property.hint = PROPERTY_HINT_ENUM; + property.hint_string = names; + } else { - String names; - for (int i = 0; i < parent->get_bone_count(); i++) { - if (i > 0) - names += ","; - names += parent->get_bone_name(i); + property.hint = PROPERTY_HINT_NONE; + property.hint_string = ""; } - - p_list->push_back(PropertyInfo(Variant::STRING, "bone_name", PROPERTY_HINT_ENUM, names)); - } else { - - p_list->push_back(PropertyInfo(Variant::STRING, "bone_name")); } } @@ -138,4 +122,6 @@ BoneAttachment::BoneAttachment() { void BoneAttachment::_bind_methods() { ClassDB::bind_method(D_METHOD("set_bone_name", "bone_name"), &BoneAttachment::set_bone_name); ClassDB::bind_method(D_METHOD("get_bone_name"), &BoneAttachment::get_bone_name); + + ADD_PROPERTY(PropertyInfo(Variant::STRING, "bone_name"), "set_bone_name", "get_bone_name"); } diff --git a/scene/3d/bone_attachment.h b/scene/3d/bone_attachment.h index fa31642354..81a225015e 100644 --- a/scene/3d/bone_attachment.h +++ b/scene/3d/bone_attachment.h @@ -44,9 +44,7 @@ class BoneAttachment : public Spatial { void _check_unbind(); protected: - bool _get(const StringName &p_name, Variant &r_ret) const; - bool _set(const StringName &p_name, const Variant &p_value); - void _get_property_list(List *p_list) const; + virtual void _validate_property(PropertyInfo &property) const; void _notification(int p_what); static void _bind_methods(); diff --git a/scene/3d/navigation_mesh.cpp b/scene/3d/navigation_mesh.cpp index 5ec5b8b6c7..073e56fdb4 100644 --- a/scene/3d/navigation_mesh.cpp +++ b/scene/3d/navigation_mesh.cpp @@ -405,8 +405,8 @@ void NavigationMesh::_bind_methods() { BIND_CONSTANT(SAMPLE_PARTITION_MONOTONE); BIND_CONSTANT(SAMPLE_PARTITION_LAYERS); - ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR3_ARRAY, "vertices", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_vertices", "get_vertices"); - ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "polygons", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_polygons", "_get_polygons"); + ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR3_ARRAY, "vertices", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "set_vertices", "get_vertices"); + ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "polygons", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_polygons", "_get_polygons"); ADD_PROPERTY(PropertyInfo(Variant::INT, "sample_partition_type/sample_partition_type", PROPERTY_HINT_ENUM, "Watershed,Monotone,Layers"), "set_sample_partition_type", "get_sample_partition_type"); diff --git a/scene/3d/path.cpp b/scene/3d/path.cpp index afe4dd3f46..7ac7f74bb0 100644 --- a/scene/3d/path.cpp +++ b/scene/3d/path.cpp @@ -190,61 +190,16 @@ bool PathFollow::get_cubic_interpolation() const { return cubic; } -bool PathFollow::_set(const StringName &p_name, const Variant &p_value) { - - if (p_name == SceneStringNames::get_singleton()->offset) { - set_offset(p_value); - } else if (p_name == SceneStringNames::get_singleton()->unit_offset) { - set_unit_offset(p_value); - } else if (p_name == SceneStringNames::get_singleton()->rotation_mode) { - set_rotation_mode(RotationMode(p_value.operator int())); - } else if (p_name == SceneStringNames::get_singleton()->v_offset) { - set_v_offset(p_value); - } else if (p_name == SceneStringNames::get_singleton()->h_offset) { - set_h_offset(p_value); - } else if (String(p_name) == "cubic_interp") { - set_cubic_interpolation(p_value); - } else if (String(p_name) == "loop") { - set_loop(p_value); - } else - return false; - - return true; -} +void PathFollow::_validate_property(PropertyInfo &property) const { -bool PathFollow::_get(const StringName &p_name, Variant &r_ret) const { - - if (p_name == SceneStringNames::get_singleton()->offset) { - r_ret = get_offset(); - } else if (p_name == SceneStringNames::get_singleton()->unit_offset) { - r_ret = get_unit_offset(); - } else if (p_name == SceneStringNames::get_singleton()->rotation_mode) { - r_ret = get_rotation_mode(); - } else if (p_name == SceneStringNames::get_singleton()->v_offset) { - r_ret = get_v_offset(); - } else if (p_name == SceneStringNames::get_singleton()->h_offset) { - r_ret = get_h_offset(); - } else if (String(p_name) == "cubic_interp") { - r_ret = cubic; - } else if (String(p_name) == "loop") { - r_ret = loop; - } else - return false; - - return true; -} -void PathFollow::_get_property_list(List *p_list) const { - - float max = 10000; - if (path && path->get_curve().is_valid()) - max = path->get_curve()->get_baked_length(); - p_list->push_back(PropertyInfo(Variant::REAL, "offset", PROPERTY_HINT_RANGE, "0," + rtos(max) + ",0.01")); - p_list->push_back(PropertyInfo(Variant::REAL, "unit_offset", PROPERTY_HINT_RANGE, "0,1,0.0001", PROPERTY_USAGE_EDITOR)); - p_list->push_back(PropertyInfo(Variant::REAL, "h_offset")); - p_list->push_back(PropertyInfo(Variant::REAL, "v_offset")); - p_list->push_back(PropertyInfo(Variant::INT, "rotation_mode", PROPERTY_HINT_ENUM, "None,Y,XY,XYZ")); - p_list->push_back(PropertyInfo(Variant::BOOL, "cubic_interp")); - p_list->push_back(PropertyInfo(Variant::BOOL, "loop")); + if (property.name == "offset") { + + float max = 10000; + if (path && path->get_curve().is_valid()) + max = path->get_curve()->get_baked_length(); + + property.hint_string = "0," + rtos(max) + ",0.01"; + } } void PathFollow::_bind_methods() { @@ -270,6 +225,14 @@ 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"), "set_offset", "get_offset"); + ADD_PROPERTY(PropertyInfo(Variant::REAL, "unit_offset", PROPERTY_HINT_RANGE, "0,1,0.0001", 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::INT, "rotation_mode", PROPERTY_HINT_ENUM, "None,Y,XY,XYZ"), "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"); + BIND_ENUM_CONSTANT(ROTATION_NONE); BIND_ENUM_CONSTANT(ROTATION_Y); BIND_ENUM_CONSTANT(ROTATION_XY); diff --git a/scene/3d/path.h b/scene/3d/path.h index fe57103d25..2ed686ac3c 100644 --- a/scene/3d/path.h +++ b/scene/3d/path.h @@ -79,9 +79,7 @@ private: void _update_transform(); protected: - bool _set(const StringName &p_name, const Variant &p_value); - bool _get(const StringName &p_name, Variant &r_ret) const; - void _get_property_list(List *p_list) const; + virtual void _validate_property(PropertyInfo &property) const; void _notification(int p_what); static void _bind_methods(); diff --git a/scene/3d/proximity_group.cpp b/scene/3d/proximity_group.cpp index f719a0356b..f584ed22eb 100644 --- a/scene/3d/proximity_group.cpp +++ b/scene/3d/proximity_group.cpp @@ -112,11 +112,6 @@ void ProximityGroup::_new_group(StringName p_name) { groups[p_name] = group_version; }; -void ProximityGroup::set_group_name(String p_group_name) { - - group_name = p_group_name; -}; - void ProximityGroup::_notification(int p_what) { switch (p_what) { @@ -153,9 +148,24 @@ void ProximityGroup::_proximity_group_broadcast(String p_name, Variant p_params) }; }; -void ProximityGroup::set_dispatch_mode(int p_mode) { +void ProximityGroup::set_group_name(const String &p_group_name) { + + group_name = p_group_name; +}; + +String ProximityGroup::get_group_name() const { - dispatch_mode = (DispatchMode)p_mode; + return group_name; +}; + +void ProximityGroup::set_dispatch_mode(DispatchMode p_mode) { + + dispatch_mode = p_mode; +}; + +ProximityGroup::DispatchMode ProximityGroup::get_dispatch_mode() const { + + return dispatch_mode; }; void ProximityGroup::set_grid_radius(const Vector3 &p_radius) { @@ -171,15 +181,22 @@ Vector3 ProximityGroup::get_grid_radius() const { void ProximityGroup::_bind_methods() { ClassDB::bind_method(D_METHOD("set_group_name", "name"), &ProximityGroup::set_group_name); - ClassDB::bind_method(D_METHOD("broadcast", "name", "parameters"), &ProximityGroup::broadcast); + ClassDB::bind_method(D_METHOD("get_group_name"), &ProximityGroup::get_group_name); ClassDB::bind_method(D_METHOD("set_dispatch_mode", "mode"), &ProximityGroup::set_dispatch_mode); - ClassDB::bind_method(D_METHOD("_proximity_group_broadcast", "name", "params"), &ProximityGroup::_proximity_group_broadcast); + ClassDB::bind_method(D_METHOD("get_dispatch_mode"), &ProximityGroup::get_dispatch_mode); ClassDB::bind_method(D_METHOD("set_grid_radius", "radius"), &ProximityGroup::set_grid_radius); ClassDB::bind_method(D_METHOD("get_grid_radius"), &ProximityGroup::get_grid_radius); + ClassDB::bind_method(D_METHOD("broadcast", "name", "parameters"), &ProximityGroup::broadcast); + ClassDB::bind_method(D_METHOD("_proximity_group_broadcast", "name", "params"), &ProximityGroup::_proximity_group_broadcast); + ADD_PROPERTY(PropertyInfo(Variant::STRING, "group_name"), "set_group_name", "get_group_name"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "dispatch_mode", PROPERTY_HINT_ENUM, "Proxy,Signal"), "set_dispatch_mode", "get_dispatch_mode"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "grid_radius"), "set_grid_radius", "get_grid_radius"); ADD_SIGNAL(MethodInfo("broadcast", PropertyInfo(Variant::STRING, "name"), PropertyInfo(Variant::ARRAY, "parameters"))); + + BIND_ENUM_CONSTANT(MODE_PROXY); + BIND_ENUM_CONSTANT(MODE_SIGNAL); }; ProximityGroup::ProximityGroup() { diff --git a/scene/3d/proximity_group.h b/scene/3d/proximity_group.h index aae44e0be5..448f30bf80 100644 --- a/scene/3d/proximity_group.h +++ b/scene/3d/proximity_group.h @@ -67,15 +67,21 @@ public: static void _bind_methods(); public: - void set_group_name(String p_group_name); - void broadcast(String p_name, Variant p_params); - void set_dispatch_mode(int p_mode); + void set_group_name(const String &p_group_name); + String get_group_name() const; + + void set_dispatch_mode(DispatchMode p_mode); + DispatchMode get_dispatch_mode() const; void set_grid_radius(const Vector3 &p_radius); Vector3 get_grid_radius() const; + void broadcast(String p_name, Variant p_params); + ProximityGroup(); ~ProximityGroup(); }; +VARIANT_ENUM_CAST(ProximityGroup::DispatchMode); + #endif diff --git a/scene/3d/reflection_probe.cpp b/scene/3d/reflection_probe.cpp index 9e3a9ac27f..2178da02b5 100644 --- a/scene/3d/reflection_probe.cpp +++ b/scene/3d/reflection_probe.cpp @@ -195,7 +195,7 @@ void ReflectionProbe::_validate_property(PropertyInfo &property) const { if (property.name == "interior/ambient_color" || property.name == "interior/ambient_energy" || property.name == "interior/ambient_contrib") { if (!interior) { - property.usage = PROPERTY_USAGE_NOEDITOR; + property.usage = PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL; } } } diff --git a/scene/3d/spatial.cpp b/scene/3d/spatial.cpp index b3740dba68..721641e09b 100644 --- a/scene/3d/spatial.cpp +++ b/scene/3d/spatial.cpp @@ -788,7 +788,9 @@ void Spatial::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "scale", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "set_scale", "get_scale"); ADD_GROUP("Visibility", ""); ADD_PROPERTYNO(PropertyInfo(Variant::BOOL, "visible"), "set_visible", "is_visible"); - //ADD_PROPERTY( PropertyInfo(Variant::TRANSFORM,"transform/local"), "set_transform", "get_transform") ; +#ifdef TOOLS_ENABLED + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "gizmo", PROPERTY_HINT_RESOURCE_TYPE, "SpatialGizmo", 0), "set_gizmo", "get_gizmo"); +#endif ADD_SIGNAL(MethodInfo("visibility_changed")); } diff --git a/scene/3d/spatial_velocity_tracker.cpp b/scene/3d/spatial_velocity_tracker.cpp index 75da3a7911..c547e76e30 100644 --- a/scene/3d/spatial_velocity_tracker.cpp +++ b/scene/3d/spatial_velocity_tracker.cpp @@ -125,6 +125,8 @@ void SpatialVelocityTracker::_bind_methods() { ClassDB::bind_method(D_METHOD("update_position", "position"), &SpatialVelocityTracker::update_position); ClassDB::bind_method(D_METHOD("get_tracked_linear_velocity"), &SpatialVelocityTracker::get_tracked_linear_velocity); ClassDB::bind_method(D_METHOD("reset", "position"), &SpatialVelocityTracker::reset); + + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "track_physics_step"), "set_track_physics_step", "is_tracking_physics_step"); } SpatialVelocityTracker::SpatialVelocityTracker() { diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index 7d909d0cb3..2a276981db 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -49,24 +49,15 @@ bool AnimationPlayer::_set(const StringName &p_name, const Variant &p_value) { String name = p_name; - if (p_name == SceneStringNames::get_singleton()->playback_speed || p_name == SceneStringNames::get_singleton()->speed) { //bw compatibility - set_speed_scale(p_value); + if (name.begins_with("playback/play")) { // bw compatibility - } else if (p_name == SceneStringNames::get_singleton()->playback_active) { - set_active(p_value); - } else if (name.begins_with("playback/play")) { + set_current_animation(p_value); - String which = p_value; - - if (which == "[stop]") - stop(); - else - play(which); } else if (name.begins_with("anims/")) { String which = name.get_slicec('/', 1); - add_animation(which, p_value); + } else if (name.begins_with("next/")) { String which = name.get_slicec('/', 1); @@ -100,24 +91,15 @@ bool AnimationPlayer::_get(const StringName &p_name, Variant &r_ret) const { String name = p_name; - if (name == "playback/speed") { //bw compatibility + if (name == "playback/play") { // bw compatibility - r_ret = speed_scale; - } else if (name == "playback/active") { - - r_ret = is_active(); - } else if (name == "playback/play") { - - if (is_active() && is_playing()) - r_ret = playback.assigned; - else - r_ret = "[stop]"; + r_ret = get_current_animation(); } else if (name.begins_with("anims/")) { String which = name.get_slicec('/', 1); - r_ret = get_animation(which).get_ref_ptr(); + } else if (name.begins_with("next/")) { String which = name.get_slicec('/', 1); @@ -150,18 +132,37 @@ bool AnimationPlayer::_get(const StringName &p_name, Variant &r_ret) const { return true; } -void AnimationPlayer::_get_property_list(List *p_list) const { +void AnimationPlayer::_validate_property(PropertyInfo &property) const { + + if (property.name == "current_animation") { + List names; + + for (Map::Element *E = animation_set.front(); E; E = E->next()) { + names.push_back(E->key()); + } + names.sort(); + names.push_front("[stop]"); + String hint; + for (List::Element *E = names.front(); E; E = E->next()) { - List names; + if (E != names.front()) + hint += ","; + hint += E->get(); + } + + property.hint_string = hint; + } +} + +void AnimationPlayer::_get_property_list(List *p_list) const { List anim_names; for (Map::Element *E = animation_set.front(); E; E = E->next()) { - anim_names.push_back(PropertyInfo(Variant::OBJECT, "anims/" + String(E->key()), PROPERTY_HINT_RESOURCE_TYPE, "Animation", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE)); + anim_names.push_back(PropertyInfo(Variant::OBJECT, "anims/" + String(E->key()), PROPERTY_HINT_RESOURCE_TYPE, "Animation", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL | PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE)); if (E->get().next != StringName()) - anim_names.push_back(PropertyInfo(Variant::STRING, "next/" + String(E->key()), PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); - names.push_back(E->key()); + anim_names.push_back(PropertyInfo(Variant::STRING, "next/" + String(E->key()), PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); } anim_names.sort(); @@ -170,23 +171,7 @@ void AnimationPlayer::_get_property_list(List *p_list) const { p_list->push_back(E->get()); } - { - names.sort(); - names.push_front("[stop]"); - String hint; - for (List::Element *E = names.front(); E; E = E->next()) { - - if (E != names.front()) - hint += ","; - hint += E->get(); - } - - p_list->push_back(PropertyInfo(Variant::STRING, "playback/play", PROPERTY_HINT_ENUM, hint, PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_ANIMATE_AS_TRIGGER)); - p_list->push_back(PropertyInfo(Variant::BOOL, "playback/active", 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::ARRAY, "blend_times", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); + p_list->push_back(PropertyInfo(Variant::ARRAY, "blend_times", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); p_list->push_back(PropertyInfo(Variant::STRING, "autoplay", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); } @@ -990,23 +975,29 @@ bool AnimationPlayer::is_playing() const { }; return true; - */ + */ } void AnimationPlayer::set_current_animation(const String &p_anim) { - if (is_playing()) { + if (p_anim == "[stop]" || p_anim == "") { + stop(); + } else if (!is_playing() || playback.assigned != p_anim) { play(p_anim); } else { - ERR_FAIL_COND(!animation_set.has(p_anim)); - playback.current.pos = 0; - playback.current.from = &animation_set[p_anim]; - playback.assigned = p_anim; + // Same animation, do not replay from start } + + /* + ERR_FAIL_COND(!animation_set.has(p_anim)); + playback.current.pos = 0; + playback.current.from = &animation_set[p_anim]; + playback.assigned = p_anim; + */ } String AnimationPlayer::get_current_animation() const { - return (playback.assigned); + return (is_playing() ? playback.assigned : ""); } void AnimationPlayer::stop(bool p_reset) { @@ -1033,8 +1024,10 @@ float AnimationPlayer::get_speed_scale() const { void AnimationPlayer::seek(float p_time, bool p_update) { if (!playback.current.from) { - if (playback.assigned) - set_current_animation(playback.assigned); + if (playback.assigned) { + ERR_FAIL_COND(!animation_set.has(playback.assigned)); + playback.current.from = &animation_set[playback.assigned]; + } ERR_FAIL_COND(!playback.current.from); } @@ -1047,8 +1040,10 @@ void AnimationPlayer::seek(float p_time, bool p_update) { void AnimationPlayer::seek_delta(float p_time, float p_delta) { if (!playback.current.from) { - if (playback.assigned) - set_current_animation(playback.assigned); + if (playback.assigned) { + ERR_FAIL_COND(!animation_set.has(playback.assigned)); + playback.current.from = &animation_set[playback.assigned]; + } ERR_FAIL_COND(!playback.current.from); } @@ -1334,10 +1329,17 @@ void AnimationPlayer::_bind_methods() { ClassDB::bind_method(D_METHOD("seek", "seconds", "update"), &AnimationPlayer::seek, DEFVAL(false)); ClassDB::bind_method(D_METHOD("advance", "delta"), &AnimationPlayer::advance); + ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "root_node"), "set_root", "get_root"); + ADD_PROPERTY(PropertyInfo(Variant::STRING, "current_animation", PROPERTY_HINT_ENUM, "", PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_ANIMATE_AS_TRIGGER), "set_current_animation", "get_current_animation"); + ADD_PROPERTY(PropertyInfo(Variant::STRING, "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_GROUP("Playback Options", "playback_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "playback_process_mode", PROPERTY_HINT_ENUM, "Physics,Idle"), "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::NODE_PATH, "root_node"), "set_root", "get_root"); + 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_SIGNAL(MethodInfo("animation_finished", PropertyInfo(Variant::STRING, "name"))); ADD_SIGNAL(MethodInfo("animation_changed", PropertyInfo(Variant::STRING, "old_name"), PropertyInfo(Variant::STRING, "new_name"))); diff --git a/scene/animation/animation_player.h b/scene/animation/animation_player.h index ef17e5adac..ef1720443f 100644 --- a/scene/animation/animation_player.h +++ b/scene/animation/animation_player.h @@ -251,6 +251,7 @@ private: protected: bool _set(const StringName &p_name, const Variant &p_value); bool _get(const StringName &p_name, Variant &r_ret) const; + virtual void _validate_property(PropertyInfo &property) const; void _get_property_list(List *p_list) const; void _notification(int p_what); diff --git a/scene/animation/tween.cpp b/scene/animation/tween.cpp index 3fc68fc5e8..000dbb9cbd 100644 --- a/scene/animation/tween.cpp +++ b/scene/animation/tween.cpp @@ -223,7 +223,9 @@ void Tween::_bind_methods() { ADD_SIGNAL(MethodInfo("tween_step", PropertyInfo(Variant::OBJECT, "object"), PropertyInfo(Variant::STRING, "key"), PropertyInfo(Variant::REAL, "elapsed"), PropertyInfo(Variant::OBJECT, "value"))); ADD_SIGNAL(MethodInfo("tween_completed", PropertyInfo(Variant::OBJECT, "object"), PropertyInfo(Variant::STRING, "key"))); + 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"); BIND_ENUM_CONSTANT(TWEEN_PROCESS_PHYSICS); BIND_ENUM_CONSTANT(TWEEN_PROCESS_IDLE); diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp index 08a39e9e79..30bcc48149 100644 --- a/scene/gui/color_picker.cpp +++ b/scene/gui/color_picker.cpp @@ -484,6 +484,10 @@ void ColorPicker::_bind_methods() { ClassDB::bind_method(D_METHOD("_preset_input"), &ColorPicker::_preset_input); ClassDB::bind_method(D_METHOD("_screen_input"), &ColorPicker::_screen_input); + ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_pick_color", "get_pick_color"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "edit_alpha"), "set_edit_alpha", "is_editing_alpha"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "raw_mode"), "set_raw_mode", "is_raw_mode"); + ADD_SIGNAL(MethodInfo("color_changed", PropertyInfo(Variant::COLOR, "color"))); } diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 6503d1fb6d..d4ed0db6ea 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -2840,6 +2840,7 @@ void Control::_bind_methods() { ADD_GROUP("Rect", "rect_"); ADD_PROPERTYNZ(PropertyInfo(Variant::VECTOR2, "rect_position", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "set_position", "get_position"); + ADD_PROPERTYNZ(PropertyInfo(Variant::VECTOR2, "rect_global_position", PROPERTY_HINT_NONE, "", 0), "set_global_position", "get_global_position"); ADD_PROPERTYNZ(PropertyInfo(Variant::VECTOR2, "rect_size", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "set_size", "get_size"); ADD_PROPERTYNZ(PropertyInfo(Variant::VECTOR2, "rect_min_size"), "set_custom_minimum_size", "get_custom_minimum_size"); ADD_PROPERTYNZ(PropertyInfo(Variant::REAL, "rect_rotation", PROPERTY_HINT_RANGE, "-1080,1080,0.01"), "set_rotation_degrees", "get_rotation_degrees"); @@ -2857,9 +2858,11 @@ void Control::_bind_methods() { ADD_PROPERTYINZ(PropertyInfo(Variant::NODE_PATH, "focus_neighbour_bottom"), "set_focus_neighbour", "get_focus_neighbour", MARGIN_BOTTOM); ADD_PROPERTYNZ(PropertyInfo(Variant::NODE_PATH, "focus_next"), "set_focus_next", "get_focus_next"); ADD_PROPERTYNZ(PropertyInfo(Variant::NODE_PATH, "focus_previous"), "set_focus_previous", "get_focus_previous"); + ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "focus_mode", PROPERTY_HINT_ENUM, "None,Click,All"), "set_focus_mode", "get_focus_mode"); ADD_GROUP("Mouse", "mouse_"); ADD_PROPERTY(PropertyInfo(Variant::INT, "mouse_filter", PROPERTY_HINT_ENUM, "Stop,Pass,Ignore"), "set_mouse_filter", "get_mouse_filter"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "mouse_default_cursor_shape", PROPERTY_HINT_ENUM, "Arrow,Ibeam,Pointing hand,Cross,Wait,Busy,Drag,Can drop,Forbidden,Vertical resize,Horizontal resize,Secondary diagonal resize,Main diagonal resize,Move,Vertial split,Horizontal split,Help"), "set_default_cursor_shape", "get_default_cursor_shape"); 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"); diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp index c4b2685012..58717edbae 100644 --- a/scene/gui/file_dialog.cpp +++ b/scene/gui/file_dialog.cpp @@ -793,6 +793,15 @@ void FileDialog::_bind_methods() { ClassDB::bind_method(D_METHOD("invalidate"), &FileDialog::invalidate); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "mode_overrides_title"), "set_mode_overrides_title", "is_mode_overriding_title"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Open one,Open many,Open folder,Open any,Save"), "set_mode", "get_mode"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "access", PROPERTY_HINT_ENUM, "Resources,User data,File system"), "set_access", "get_access"); + ADD_PROPERTY(PropertyInfo(Variant::POOL_STRING_ARRAY, "filters"), "set_filters", "get_filters"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "show_hidden_files"), "set_show_hidden_files", "is_showing_hidden_files"); + ADD_PROPERTY(PropertyInfo(Variant::STRING, "current_dir"), "set_current_dir", "get_current_dir"); + ADD_PROPERTY(PropertyInfo(Variant::STRING, "current_file"), "set_current_file", "get_current_file"); + ADD_PROPERTY(PropertyInfo(Variant::STRING, "current_path"), "set_current_path", "get_current_path"); + ADD_SIGNAL(MethodInfo("file_selected", PropertyInfo(Variant::STRING, "path"))); ADD_SIGNAL(MethodInfo("files_selected", PropertyInfo(Variant::POOL_STRING_ARRAY, "paths"))); ADD_SIGNAL(MethodInfo("dir_selected", PropertyInfo(Variant::STRING, "dir"))); @@ -806,12 +815,6 @@ void FileDialog::_bind_methods() { BIND_ENUM_CONSTANT(ACCESS_RESOURCES); BIND_ENUM_CONSTANT(ACCESS_USERDATA); BIND_ENUM_CONSTANT(ACCESS_FILESYSTEM); - - ADD_PROPERTY(PropertyInfo(Variant::BOOL, "mode_overrides_title"), "set_mode_overrides_title", "is_mode_overriding_title"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Open one,Open many,Open folder,Open any,Save"), "set_mode", "get_mode"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "access", PROPERTY_HINT_ENUM, "Resources,User data,File system"), "set_access", "get_access"); - ADD_PROPERTY(PropertyInfo(Variant::POOL_STRING_ARRAY, "filters"), "set_filters", "get_filters"); - ADD_PROPERTY(PropertyInfo(Variant::BOOL, "show_hidden_files"), "set_show_hidden_files", "is_showing_hidden_files"); } void FileDialog::set_show_hidden_files(bool p_show) { diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp index b8451d2f10..1b5014367b 100644 --- a/scene/gui/graph_edit.cpp +++ b/scene/gui/graph_edit.cpp @@ -1180,6 +1180,12 @@ void GraphEdit::_bind_methods() { ClassDB::bind_method(D_METHOD("set_selected", "node"), &GraphEdit::set_selected); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "right_disconnects"), "set_right_disconnects", "is_right_disconnects_enabled"); + 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_SIGNAL(MethodInfo("connection_request", PropertyInfo(Variant::STRING, "from"), PropertyInfo(Variant::INT, "from_slot"), PropertyInfo(Variant::STRING, "to"), PropertyInfo(Variant::INT, "to_slot"))); ADD_SIGNAL(MethodInfo("disconnection_request", PropertyInfo(Variant::STRING, "from"), PropertyInfo(Variant::INT, "from_slot"), PropertyInfo(Variant::STRING, "to"), PropertyInfo(Variant::INT, "to_slot"))); ADD_SIGNAL(MethodInfo("popup_request", PropertyInfo(Variant::VECTOR2, "p_position"))); diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp index c5d5da1219..24857d49fa 100644 --- a/scene/gui/graph_node.cpp +++ b/scene/gui/graph_node.cpp @@ -705,8 +705,12 @@ void GraphNode::_bind_methods() { ClassDB::bind_method(D_METHOD("get_overlay"), &GraphNode::get_overlay); ADD_PROPERTY(PropertyInfo(Variant::STRING, "title"), "set_title", "get_title"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "offset"), "set_offset", "get_offset"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "show_close"), "set_show_close_button", "is_close_button_visible"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "resizable"), "set_resizable", "is_resizable"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "selected"), "set_selected", "is_selected"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "comment"), "set_comment", "is_comment"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "overlay", PROPERTY_HINT_ENUM, "Disabled,Breakpoint,Position"), "set_overlay", "get_overlay"); ADD_SIGNAL(MethodInfo("offset_changed")); ADD_SIGNAL(MethodInfo("dragged", PropertyInfo(Variant::VECTOR2, "from"), PropertyInfo(Variant::VECTOR2, "to"))); diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp index 3b3d7164b6..77d3a34c66 100644 --- a/scene/gui/item_list.cpp +++ b/scene/gui/item_list.cpp @@ -1419,7 +1419,7 @@ void ItemList::_bind_methods() { ClassDB::bind_method(D_METHOD("_set_items"), &ItemList::_set_items); ClassDB::bind_method(D_METHOD("_get_items"), &ItemList::_get_items); - ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "items", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_items", "_get_items"); + ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "items", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_items", "_get_items"); ADD_PROPERTY(PropertyInfo(Variant::INT, "select_mode", PROPERTY_HINT_ENUM, "Single,Multi"), "set_select_mode", "get_select_mode"); ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "allow_rmb_select"), "set_allow_rmb_select", "get_allow_rmb_select"); @@ -1432,6 +1432,7 @@ void ItemList::_bind_methods() { ADD_GROUP("Icon", ""); ADD_PROPERTY(PropertyInfo(Variant::INT, "icon_mode", PROPERTY_HINT_ENUM, "Top,Left"), "set_icon_mode", "get_icon_mode"); ADD_PROPERTYNO(PropertyInfo(Variant::REAL, "icon_scale"), "set_icon_scale", "get_icon_scale"); + ADD_PROPERTYNO(PropertyInfo(Variant::REAL, "fixed_icon_size"), "set_fixed_icon_size", "get_fixed_icon_size"); BIND_ENUM_CONSTANT(ICON_MODE_TOP); BIND_ENUM_CONSTANT(ICON_MODE_LEFT); diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp index 0a1d42c5e1..830f724b3c 100644 --- a/scene/gui/label.cpp +++ b/scene/gui/label.cpp @@ -564,6 +564,7 @@ void Label::set_visible_characters(int p_amount) { if (get_total_character_count() > 0) { percent_visible = (float)p_amount / (float)total_char_cache; } + _change_notify("percent_visible"); update(); } @@ -584,6 +585,7 @@ void Label::set_percent_visible(float p_percent) { visible_chars = get_total_character_count() * p_percent; percent_visible = p_percent; } + _change_notify("visible_chars"); update(); } @@ -665,6 +667,7 @@ void Label::_bind_methods() { ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "autowrap"), "set_autowrap", "has_autowrap"); ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "clip_text"), "set_clip_text", "is_clipping_text"); ADD_PROPERTYNZ(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::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 97f740a4ba..524a68a116 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -1437,13 +1437,14 @@ void LineEdit::_bind_methods() { ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "secret"), "set_secret", "is_secret"); ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "expand_to_text_length"), "set_expand_to_text_length", "get_expand_to_text_length"); ADD_PROPERTY(PropertyInfo(Variant::INT, "focus_mode", PROPERTY_HINT_ENUM, "None,Click,All"), "set_focus_mode", "get_focus_mode"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "context_menu_enabled"), "set_context_menu_enabled", "is_context_menu_enabled"); ADD_GROUP("Placeholder", "placeholder_"); ADD_PROPERTYNZ(PropertyInfo(Variant::STRING, "placeholder_text"), "set_placeholder", "get_placeholder"); ADD_PROPERTYNZ(PropertyInfo(Variant::REAL, "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_PROPERTYNZ(PropertyInfo(Variant::REAL, "caret_blink_speed", PROPERTY_HINT_RANGE, "0.1,10,0.1"), "cursor_set_blink_speed", "cursor_get_blink_speed"); - ADD_PROPERTY(PropertyInfo(Variant::BOOL, "context_menu_enabled"), "set_context_menu_enabled", "is_context_menu_enabled"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "caret_position"), "set_cursor_position", "get_cursor_position"); } LineEdit::LineEdit() { diff --git a/scene/gui/menu_button.cpp b/scene/gui/menu_button.cpp index d25bd00f37..2e74faa61d 100644 --- a/scene/gui/menu_button.cpp +++ b/scene/gui/menu_button.cpp @@ -89,7 +89,7 @@ void MenuButton::_bind_methods() { ClassDB::bind_method(D_METHOD("_get_items"), &MenuButton::_get_items); ClassDB::bind_method(D_METHOD("set_disable_shortcuts", "disabled"), &MenuButton::set_disable_shortcuts); - ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "items", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_items", "_get_items"); + ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "items", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_items", "_get_items"); ADD_SIGNAL(MethodInfo("about_to_show")); } diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp index ba35e6cd19..1a46921561 100644 --- a/scene/gui/option_button.cpp +++ b/scene/gui/option_button.cpp @@ -319,7 +319,7 @@ void OptionButton::_bind_methods() { ClassDB::bind_method(D_METHOD("_get_items"), &OptionButton::_get_items); ADD_PROPERTY(PropertyInfo(Variant::INT, "selected"), "_select_int", "get_selected"); - ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "items", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_items", "_get_items"); + ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "items", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_items", "_get_items"); ADD_SIGNAL(MethodInfo("item_selected", PropertyInfo(Variant::INT, "ID"))); } diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index cf01ce8643..89000fcde1 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -1223,9 +1223,10 @@ void PopupMenu::_bind_methods() { ClassDB::bind_method(D_METHOD("_submenu_timeout"), &PopupMenu::_submenu_timeout); - ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "items", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_items", "_get_items"); + ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "items", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_items", "_get_items"); ADD_PROPERTYNO(PropertyInfo(Variant::BOOL, "hide_on_item_selection"), "set_hide_on_item_selection", "is_hide_on_item_selection"); ADD_PROPERTYNO(PropertyInfo(Variant::BOOL, "hide_on_checkable_item_selection"), "set_hide_on_checkable_item_selection", "is_hide_on_checkable_item_selection"); + ADD_PROPERTYNO(PropertyInfo(Variant::BOOL, "hide_on_state_item_selection"), "set_hide_on_state_item_selection", "is_hide_on_state_item_selection"); ADD_SIGNAL(MethodInfo("id_pressed", PropertyInfo(Variant::INT, "ID"))); ADD_SIGNAL(MethodInfo("index_pressed", PropertyInfo(Variant::INT, "index"))); diff --git a/scene/gui/range.cpp b/scene/gui/range.cpp index a74a577898..cd6c6bb65c 100644 --- a/scene/gui/range.cpp +++ b/scene/gui/range.cpp @@ -248,6 +248,7 @@ void Range::_bind_methods() { 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::BOOL, "exp_edit"), "set_exp_ratio", "is_ratio_exp"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "rounded"), "set_use_rounded_values", "is_using_rounded_values"); } diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 49618d0138..a7419519ae 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -2045,6 +2045,15 @@ void RichTextLabel::_bind_methods() { 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::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"); + ADD_PROPERTY(PropertyInfo(Variant::STRING, "text"), "set_text", "get_text"); + + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "scroll_active"), "set_scroll_active", "is_scroll_active"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "scroll_following"), "set_scroll_follow", "is_scroll_following"); + + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "selection_enabled"), "set_selection_enabled", "is_selection_enabled"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "override_selected_font_color"), "set_override_selected_font_color", "is_overriding_selected_font_color"); ADD_SIGNAL(MethodInfo("meta_clicked", PropertyInfo(Variant::NIL, "meta", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NIL_IS_VARIANT))); diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp index 1e324a303e..413edca218 100644 --- a/scene/gui/scroll_container.cpp +++ b/scene/gui/scroll_container.cpp @@ -468,8 +468,10 @@ void ScrollContainer::_bind_methods() { ClassDB::bind_method(D_METHOD("get_v_scroll"), &ScrollContainer::get_v_scroll); ADD_GROUP("Scroll", "scroll_"); - ADD_PROPERTY(PropertyInfo(Variant::BOOL, "scroll_horizontal"), "set_enable_h_scroll", "is_h_scroll_enabled"); - ADD_PROPERTY(PropertyInfo(Variant::BOOL, "scroll_vertical"), "set_enable_v_scroll", "is_v_scroll_enabled"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "scroll_horizontal_enabled"), "set_enable_h_scroll", "is_h_scroll_enabled"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "scroll_horizontal"), "set_h_scroll", "get_h_scroll"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "scroll_vertical_enabled"), "set_enable_v_scroll", "is_v_scroll_enabled"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "scroll_vertical"), "set_v_scroll", "get_v_scroll"); }; ScrollContainer::ScrollContainer() { diff --git a/scene/gui/tabs.cpp b/scene/gui/tabs.cpp index ba808566e1..f0e89877cd 100644 --- a/scene/gui/tabs.cpp +++ b/scene/gui/tabs.cpp @@ -851,6 +851,7 @@ void Tabs::_bind_methods() { ADD_SIGNAL(MethodInfo("tab_clicked", PropertyInfo(Variant::INT, "tab"))); ADD_PROPERTY(PropertyInfo(Variant::INT, "current_tab", PROPERTY_HINT_RANGE, "-1,4096,1", PROPERTY_USAGE_EDITOR), "set_current_tab", "get_current_tab"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "tab_align", PROPERTY_HINT_ENUM, "Left,Center,Right"), "set_tab_align", "get_tab_align"); ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "tab_close_display_policy", PROPERTY_HINT_ENUM, "Show Never,Show Active Only,Show Always"), "set_tab_close_display_policy", "get_tab_close_display_policy"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "scrolling_enabled"), "set_scrolling_enabled", "get_scrolling_enabled"); diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index aa4310da46..8f37628c33 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -4047,11 +4047,21 @@ void TextEdit::set_wrap(bool p_wrap) { wrap = p_wrap; } +bool TextEdit::is_wrapping() const { + + return wrap; +} + void TextEdit::set_max_chars(int p_max_chars) { max_chars = p_max_chars; } +int TextEdit::get_max_chars() const { + + return max_chars; +} + void TextEdit::_reset_caret_blink_timer() { if (caret_blink_enabled) { caret_blink_timer->stop(); @@ -5543,7 +5553,9 @@ void TextEdit::_bind_methods() { ClassDB::bind_method(D_METHOD("is_readonly"), &TextEdit::is_readonly); ClassDB::bind_method(D_METHOD("set_wrap", "enable"), &TextEdit::set_wrap); - ClassDB::bind_method(D_METHOD("set_max_chars", "amount"), &TextEdit::set_max_chars); + ClassDB::bind_method(D_METHOD("is_wrapping"), &TextEdit::is_wrapping); + // ClassDB::bind_method(D_METHOD("set_max_chars", "amount"), &TextEdit::set_max_chars); + // ClassDB::bind_method(D_METHOD("get_max_char"), &TextEdit::get_max_chars); ClassDB::bind_method(D_METHOD("set_context_menu_enabled", "enable"), &TextEdit::set_context_menu_enabled); ClassDB::bind_method(D_METHOD("is_context_menu_enabled"), &TextEdit::is_context_menu_enabled); @@ -5617,6 +5629,8 @@ void TextEdit::_bind_methods() { 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::BOOL, "hiding_enabled"), "set_hiding_enabled", "is_hiding_enabled"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "wrap_lines"), "set_wrap", "is_wrapping"); + // ADD_PROPERTY(PropertyInfo(Variant::BOOL, "max_chars"), "set_max_chars", "get_max_chars"); ADD_GROUP("Caret", "caret_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "caret_block_mode"), "cursor_set_block_mode", "cursor_is_block_mode"); diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h index 88121a06f0..5ce751faa8 100644 --- a/scene/gui/text_edit.h +++ b/scene/gui/text_edit.h @@ -491,7 +491,10 @@ public: bool is_readonly() const; void set_max_chars(int p_max_chars); + int get_max_chars() const; + void set_wrap(bool p_wrap); + bool is_wrapping() const; void clear(); diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index fd5a47d875..8fec9fe97a 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -784,6 +784,10 @@ void TreeItem::_bind_methods() { ClassDB::bind_method(D_METHOD("set_disable_folding", "disable"), &TreeItem::set_disable_folding); ClassDB::bind_method(D_METHOD("is_folding_disabled"), &TreeItem::is_folding_disabled); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "collapsed"), "set_collapsed", "is_collapsed"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "disable_folding"), "set_disable_folding", "is_folding_disabled"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "custom_minimum_height", PROPERTY_HINT_RANGE, "0,1000,1"), "set_custom_minimum_height", "get_custom_minimum_height"); + BIND_ENUM_CONSTANT(CELL_MODE_STRING); BIND_ENUM_CONSTANT(CELL_MODE_CHECK); BIND_ENUM_CONSTANT(CELL_MODE_RANGE); @@ -3086,6 +3090,11 @@ void Tree::set_select_mode(SelectMode p_mode) { select_mode = p_mode; } +Tree::SelectMode Tree::get_select_mode() const { + + return select_mode; +} + void Tree::deselect_all() { TreeItem *item = get_next_selected(get_root()); @@ -3139,6 +3148,11 @@ void Tree::set_hide_root(bool p_enabled) { update(); } +bool Tree::is_root_hidden() const { + + return hide_root; +} + void Tree::set_column_min_width(int p_column, int p_min_width) { ERR_FAIL_INDEX(p_column, columns.size()); @@ -3759,11 +3773,13 @@ void Tree::_bind_methods() { ClassDB::bind_method(D_METHOD("get_column_width", "column"), &Tree::get_column_width); ClassDB::bind_method(D_METHOD("set_hide_root", "enable"), &Tree::set_hide_root); + ClassDB::bind_method(D_METHOD("is_root_hidden"), &Tree::is_root_hidden); ClassDB::bind_method(D_METHOD("get_next_selected", "from"), &Tree::_get_next_selected); ClassDB::bind_method(D_METHOD("get_selected"), &Tree::get_selected); ClassDB::bind_method(D_METHOD("get_selected_column"), &Tree::get_selected_column); ClassDB::bind_method(D_METHOD("get_pressed_button"), &Tree::get_pressed_button); ClassDB::bind_method(D_METHOD("set_select_mode", "mode"), &Tree::set_select_mode); + ClassDB::bind_method(D_METHOD("get_select_mode"), &Tree::get_select_mode); ClassDB::bind_method(D_METHOD("set_columns", "amount"), &Tree::set_columns); ClassDB::bind_method(D_METHOD("get_columns"), &Tree::get_columns); @@ -3797,6 +3813,14 @@ void Tree::_bind_methods() { ClassDB::bind_method(D_METHOD("set_allow_reselect", "allow"), &Tree::set_allow_reselect); ClassDB::bind_method(D_METHOD("get_allow_reselect"), &Tree::get_allow_reselect); + ADD_PROPERTY(PropertyInfo(Variant::INT, "columns"), "set_columns", "get_columns"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "allow_reselect"), "set_allow_reselect", "get_allow_reselect"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "allow_rmb_select"), "set_allow_rmb_select", "get_allow_rmb_select"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "hide_folding"), "set_hide_folding", "is_folding_hidden"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "hide_root"), "set_hide_root", "is_root_hidden"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "drop_mode_flags", PROPERTY_HINT_FLAGS, "On Item,Inbetween"), "set_drop_mode_flags", "get_drop_mode_flags"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "select_mode", PROPERTY_HINT_ENUM, "Single,Row,Multi"), "set_select_mode", "get_select_mode"); + ADD_SIGNAL(MethodInfo("item_selected")); ADD_SIGNAL(MethodInfo("cell_selected")); ADD_SIGNAL(MethodInfo("multi_selected", PropertyInfo(Variant::OBJECT, "item"), PropertyInfo(Variant::INT, "column"), PropertyInfo(Variant::BOOL, "selected"))); diff --git a/scene/gui/tree.h b/scene/gui/tree.h index ccacb44e6b..709ff73971 100644 --- a/scene/gui/tree.h +++ b/scene/gui/tree.h @@ -542,11 +542,13 @@ public: int get_column_width(int p_column) const; void set_hide_root(bool p_enabled); + bool is_root_hidden() const; TreeItem *get_next_selected(TreeItem *p_item); TreeItem *get_selected() const; int get_selected_column() const; int get_pressed_button() const; void set_select_mode(SelectMode p_mode); + SelectMode get_select_mode() const; void deselect_all(); bool is_anything_selected(); diff --git a/scene/gui/video_player.cpp b/scene/gui/video_player.cpp index b0739a2f37..4eee0126d8 100644 --- a/scene/gui/video_player.cpp +++ b/scene/gui/video_player.cpp @@ -471,9 +471,13 @@ void VideoPlayer::_bind_methods() { 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::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::STRING, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus"); } diff --git a/scene/main/canvas_layer.cpp b/scene/main/canvas_layer.cpp index f720864daa..31d45d8e4c 100644 --- a/scene/main/canvas_layer.cpp +++ b/scene/main/canvas_layer.cpp @@ -254,8 +254,11 @@ void CanvasLayer::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "layer", PROPERTY_HINT_RANGE, "-128,128,1"), "set_layer", "get_layer"); //ADD_PROPERTY( PropertyInfo(Variant::MATRIX32,"transform",PROPERTY_HINT_RANGE),"set_transform","get_transform") ; ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "offset"), "set_offset", "get_offset"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "rotation"), "set_rotation_degrees", "get_rotation_degrees"); + ADD_PROPERTY(PropertyInfo(Variant::REAL, "rotation_degrees", PROPERTY_HINT_RANGE, "-1440,1440,0.1", 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::VECTOR2, "scale"), "set_scale", "get_scale"); + ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "transform"), "set_transform", "get_transform"); + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "custom_viewport", PROPERTY_HINT_RESOURCE_TYPE, "Viewport", 0), "set_custom_viewport", "get_custom_viewport"); } CanvasLayer::CanvasLayer() { diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp index 49d69299ea..3d58aa65f8 100644 --- a/scene/main/http_request.cpp +++ b/scene/main/http_request.cpp @@ -524,6 +524,7 @@ void HTTPRequest::_bind_methods() { ClassDB::bind_method(D_METHOD("_redirect_request"), &HTTPRequest::_redirect_request); ClassDB::bind_method(D_METHOD("_request_done"), &HTTPRequest::_request_done); + ADD_PROPERTY(PropertyInfo(Variant::STRING, "download_file", PROPERTY_HINT_FILE), "set_download_file", "get_download_file"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_threads"), "set_use_threads", "is_using_threads"); ADD_PROPERTY(PropertyInfo(Variant::INT, "body_size_limit", PROPERTY_HINT_RANGE, "-1,2000000000"), "set_body_size_limit", "get_body_size_limit"); ADD_PROPERTY(PropertyInfo(Variant::INT, "max_redirects", PROPERTY_HINT_RANGE, "-1,64"), "set_max_redirects", "get_max_redirects"); diff --git a/scene/main/node.cpp b/scene/main/node.cpp index bc03d322b6..5f39c6285f 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -2890,7 +2890,7 @@ void Node::_bind_methods() { #ifdef TOOLS_ENABLED ClassDB::bind_method(D_METHOD("_set_import_path", "import_path"), &Node::set_import_path); ClassDB::bind_method(D_METHOD("_get_import_path"), &Node::get_import_path); - ADD_PROPERTYNZ(PropertyInfo(Variant::NODE_PATH, "_import_path", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_import_path", "_get_import_path"); + ADD_PROPERTYNZ(PropertyInfo(Variant::NODE_PATH, "_import_path", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_import_path", "_get_import_path"); #endif @@ -2960,7 +2960,10 @@ void Node::_bind_methods() { //ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "process/unhandled_input" ), "set_process_unhandled_input","is_processing_unhandled_input" ) ; ADD_GROUP("Pause", "pause_"); ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "pause_mode", PROPERTY_HINT_ENUM, "Inherit,Stop,Process"), "set_pause_mode", "get_pause_mode"); - ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "editor/display_folded", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_display_folded", "is_displayed_folded"); + ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "editor/display_folded", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "set_display_folded", "is_displayed_folded"); + ADD_PROPERTYNZ(PropertyInfo(Variant::STRING, "name", PROPERTY_HINT_NONE, "", 0), "set_name", "get_name"); + ADD_PROPERTYNZ(PropertyInfo(Variant::STRING, "filename", PROPERTY_HINT_NONE, "", 0), "set_filename", "get_filename"); + ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT, "owner", PROPERTY_HINT_RESOURCE_TYPE, "Node", 0), "set_owner", "get_owner"); BIND_VMETHOD(MethodInfo("_process", PropertyInfo(Variant::REAL, "delta"))); BIND_VMETHOD(MethodInfo("_physics_process", PropertyInfo(Variant::REAL, "delta"))); diff --git a/scene/main/resource_preloader.cpp b/scene/main/resource_preloader.cpp index a779b49141..dbe7daa604 100644 --- a/scene/main/resource_preloader.cpp +++ b/scene/main/resource_preloader.cpp @@ -161,7 +161,7 @@ void ResourcePreloader::_bind_methods() { ClassDB::bind_method(D_METHOD("get_resource", "name"), &ResourcePreloader::get_resource); ClassDB::bind_method(D_METHOD("get_resource_list"), &ResourcePreloader::_get_resource_list); - ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "resources", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_resources", "_get_resources"); + ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "resources", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_resources", "_get_resources"); } ResourcePreloader::ResourcePreloader() { diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index bc250ff4d5..55ae9fe1ec 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -55,6 +55,8 @@ 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_SIGNAL(MethodInfo("timeout")); } @@ -1684,6 +1686,11 @@ void SceneTree::set_network_peer(const Ref &p_network_ } } +Ref SceneTree::get_network_peer() const { + + return network_peer; +} + bool SceneTree::is_network_server() const { ERR_FAIL_COND_V(!network_peer.is_valid(), false); @@ -2188,6 +2195,7 @@ void SceneTree::_bind_methods() { ClassDB::bind_method(D_METHOD("_change_scene"), &SceneTree::_change_scene); ClassDB::bind_method(D_METHOD("set_network_peer", "peer"), &SceneTree::set_network_peer); + ClassDB::bind_method(D_METHOD("get_network_peer"), &SceneTree::get_network_peer); ClassDB::bind_method(D_METHOD("is_network_server"), &SceneTree::is_network_server); ClassDB::bind_method(D_METHOD("has_network_peer"), &SceneTree::has_network_peer); ClassDB::bind_method(D_METHOD("get_network_connected_peers"), &SceneTree::get_network_connected_peers); @@ -2204,6 +2212,18 @@ void SceneTree::_bind_methods() { ClassDB::bind_method(D_METHOD("set_use_font_oversampling", "enable"), &SceneTree::set_use_font_oversampling); ClassDB::bind_method(D_METHOD("is_using_font_oversampling"), &SceneTree::is_using_font_oversampling); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "debug_collisions_hint"), "set_debug_collisions_hint", "is_debugging_collisions_hint"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "debug_navigation_hint"), "set_debug_navigation_hint", "is_debugging_navigation_hint"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "paused"), "set_pause", "is_paused"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "refuse_new_network_connections"), "set_refuse_new_network_connections", "is_refusing_new_network_connections"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_font_oversampling"), "set_use_font_oversampling", "is_using_font_oversampling"); +#ifdef TOOLS_ENABLED + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "edited_scene_root", PROPERTY_HINT_RESOURCE_TYPE, "Node", 0), "set_edited_scene_root", "get_edited_scene_root"); +#endif + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "current_scene", PROPERTY_HINT_RESOURCE_TYPE, "Node", 0), "set_current_scene", "get_current_scene"); + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "network_peer", PROPERTY_HINT_RESOURCE_TYPE, "NetworkedMultiplayerPeer", 0), "set_network_peer", "get_network_peer"); + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "root", PROPERTY_HINT_RESOURCE_TYPE, "Node", 0), "", "get_root"); + ADD_SIGNAL(MethodInfo("tree_changed")); ADD_SIGNAL(MethodInfo("node_added", PropertyInfo(Variant::OBJECT, "node"))); ADD_SIGNAL(MethodInfo("node_removed", PropertyInfo(Variant::OBJECT, "node"))); diff --git a/scene/main/scene_tree.h b/scene/main/scene_tree.h index 6c4cc4e6d1..c5357762ec 100644 --- a/scene/main/scene_tree.h +++ b/scene/main/scene_tree.h @@ -451,6 +451,7 @@ public: //network API void set_network_peer(const Ref &p_network_peer); + Ref get_network_peer() const; bool is_network_server() const; bool has_network_peer() const; int get_network_unique_id() const; diff --git a/scene/main/timer.cpp b/scene/main/timer.cpp index b7fb449259..ad2cdbfd0f 100755 --- a/scene/main/timer.cpp +++ b/scene/main/timer.cpp @@ -204,6 +204,8 @@ void Timer::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::REAL, "wait_time", PROPERTY_HINT_EXP_RANGE, "0.01,4096,0.01"), "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"); 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 5f1257a855..1a2ea796bd 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -2772,7 +2772,7 @@ void Viewport::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "size"), "set_size", "get_size"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "own_world"), "set_use_own_world", "is_using_own_world"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "world", PROPERTY_HINT_RESOURCE_TYPE, "World"), "set_world", "get_world"); - //ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"world_2d",PROPERTY_HINT_RESOURCE_TYPE,"World2D"), "set_world_2d", "get_world_2d") ; + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "world_2d", PROPERTY_HINT_RESOURCE_TYPE, "World2D", 0), "set_world_2d", "get_world_2d"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "transparent_bg"), "set_transparent_background", "has_transparent_background"); ADD_GROUP("Rendering", ""); ADD_PROPERTY(PropertyInfo(Variant::INT, "msaa", PROPERTY_HINT_ENUM, "Disabled,2x,4x,8x,16x"), "set_msaa", "get_msaa"); @@ -2798,6 +2798,8 @@ void Viewport::_bind_methods() { ADD_PROPERTYI(PropertyInfo(Variant::INT, "shadow_atlas_quad_1", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"), "set_shadow_atlas_quadrant_subdiv", "get_shadow_atlas_quadrant_subdiv", 1); ADD_PROPERTYI(PropertyInfo(Variant::INT, "shadow_atlas_quad_2", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"), "set_shadow_atlas_quadrant_subdiv", "get_shadow_atlas_quadrant_subdiv", 2); ADD_PROPERTYI(PropertyInfo(Variant::INT, "shadow_atlas_quad_3", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"), "set_shadow_atlas_quadrant_subdiv", "get_shadow_atlas_quadrant_subdiv", 3); + ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "canvas_transform", PROPERTY_HINT_NONE, "", 0), "set_canvas_transform", "get_canvas_transform"); + ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "global_canvas_transform", PROPERTY_HINT_NONE, "", 0), "set_global_canvas_transform", "get_global_canvas_transform"); ADD_SIGNAL(MethodInfo("size_changed")); diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp index a32e77bbfd..6e58bc88d7 100644 --- a/scene/resources/animation.cpp +++ b/scene/resources/animation.cpp @@ -36,13 +36,7 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) { String name = p_name; - if (name == "length") - set_length(p_value); - else if (name == "loop") - set_loop(p_value); - else if (name == "step") - set_step(p_value); - else if (name.begins_with("tracks/")) { + if (name.begins_with("tracks/")) { int track = name.get_slicec('/', 1).to_int(); String what = name.get_slicec('/', 2); @@ -384,20 +378,15 @@ bool Animation::_get(const StringName &p_name, Variant &r_ret) const { } void Animation::_get_property_list(List *p_list) const { - - p_list->push_back(PropertyInfo(Variant::REAL, "length", PROPERTY_HINT_RANGE, "0.001,99999,0.001")); - p_list->push_back(PropertyInfo(Variant::BOOL, "loop")); - p_list->push_back(PropertyInfo(Variant::REAL, "step", PROPERTY_HINT_RANGE, "0,4096,0.001")); - for (int i = 0; i < tracks.size(); i++) { - p_list->push_back(PropertyInfo(Variant::STRING, "tracks/" + itos(i) + "/type", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); - p_list->push_back(PropertyInfo(Variant::NODE_PATH, "tracks/" + itos(i) + "/path", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); - p_list->push_back(PropertyInfo(Variant::INT, "tracks/" + itos(i) + "/interp", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); - p_list->push_back(PropertyInfo(Variant::BOOL, "tracks/" + itos(i) + "/loop_wrap", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); - p_list->push_back(PropertyInfo(Variant::BOOL, "tracks/" + itos(i) + "/imported", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); - p_list->push_back(PropertyInfo(Variant::BOOL, "tracks/" + itos(i) + "/enabled", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); - p_list->push_back(PropertyInfo(Variant::ARRAY, "tracks/" + itos(i) + "/keys", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); + p_list->push_back(PropertyInfo(Variant::STRING, "tracks/" + itos(i) + "/type", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); + p_list->push_back(PropertyInfo(Variant::NODE_PATH, "tracks/" + itos(i) + "/path", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); + p_list->push_back(PropertyInfo(Variant::INT, "tracks/" + itos(i) + "/interp", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); + p_list->push_back(PropertyInfo(Variant::BOOL, "tracks/" + itos(i) + "/loop_wrap", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); + p_list->push_back(PropertyInfo(Variant::BOOL, "tracks/" + itos(i) + "/imported", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); + p_list->push_back(PropertyInfo(Variant::BOOL, "tracks/" + itos(i) + "/enabled", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); + p_list->push_back(PropertyInfo(Variant::ARRAY, "tracks/" + itos(i) + "/keys", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); } } @@ -1690,6 +1679,10 @@ void Animation::_bind_methods() { ClassDB::bind_method(D_METHOD("clear"), &Animation::clear); ClassDB::bind_method(D_METHOD("copy_track", "track", "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::BOOL, "loop"), "set_loop", "has_loop"); + ADD_PROPERTY(PropertyInfo(Variant::REAL, "step", PROPERTY_HINT_RANGE, "0,4096,0.001"), "set_step", "get_step"); + BIND_ENUM_CONSTANT(TYPE_VALUE); BIND_ENUM_CONSTANT(TYPE_TRANSFORM); BIND_ENUM_CONSTANT(TYPE_METHOD); diff --git a/scene/resources/audio_stream_sample.cpp b/scene/resources/audio_stream_sample.cpp index 22992f6a40..93ed700482 100644 --- a/scene/resources/audio_stream_sample.cpp +++ b/scene/resources/audio_stream_sample.cpp @@ -542,8 +542,8 @@ void AudioStreamSample::_bind_methods() { ClassDB::bind_method(D_METHOD("set_stereo", "stereo"), &AudioStreamSample::set_stereo); ClassDB::bind_method(D_METHOD("is_stereo"), &AudioStreamSample::is_stereo); - ClassDB::bind_method(D_METHOD("set_data", "data"), &AudioStreamSample::set_data); - ClassDB::bind_method(D_METHOD("get_data"), &AudioStreamSample::get_data); + ClassDB::bind_method(D_METHOD("_set_data", "data"), &AudioStreamSample::set_data); + ClassDB::bind_method(D_METHOD("_get_data"), &AudioStreamSample::get_data); ADD_PROPERTY(PropertyInfo(Variant::INT, "format", PROPERTY_HINT_ENUM, "8-Bit,16-Bit,IMA-ADPCM"), "set_format", "get_format"); ADD_PROPERTY(PropertyInfo(Variant::INT, "loop_mode", PROPERTY_HINT_ENUM, "Disabled,Forward,Ping-Pong"), "set_loop_mode", "get_loop_mode"); @@ -551,7 +551,7 @@ void AudioStreamSample::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "loop_end"), "set_loop_end", "get_loop_end"); ADD_PROPERTY(PropertyInfo(Variant::INT, "mix_rate"), "set_mix_rate", "get_mix_rate"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "stereo"), "set_stereo", "is_stereo"); - ADD_PROPERTY(PropertyInfo(Variant::POOL_BYTE_ARRAY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_data", "get_data"); + ADD_PROPERTY(PropertyInfo(Variant::POOL_BYTE_ARRAY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_data", "_get_data"); BIND_ENUM_CONSTANT(FORMAT_8_BITS); BIND_ENUM_CONSTANT(FORMAT_16_BITS); diff --git a/scene/resources/bit_mask.cpp b/scene/resources/bit_mask.cpp index e9e15a2532..ea313b5a20 100644 --- a/scene/resources/bit_mask.cpp +++ b/scene/resources/bit_mask.cpp @@ -184,7 +184,7 @@ void BitMap::_bind_methods() { ClassDB::bind_method(D_METHOD("_set_data"), &BitMap::_set_data); ClassDB::bind_method(D_METHOD("_get_data"), &BitMap::_get_data); - ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_data", "_get_data"); + ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_data", "_get_data"); } BitMap::BitMap() { diff --git a/scene/resources/concave_polygon_shape.cpp b/scene/resources/concave_polygon_shape.cpp index 2fb500b8a8..935f041837 100644 --- a/scene/resources/concave_polygon_shape.cpp +++ b/scene/resources/concave_polygon_shape.cpp @@ -64,29 +64,6 @@ Vector ConcavePolygonShape::_gen_debug_mesh_lines() { return points; } -bool ConcavePolygonShape::_set(const StringName &p_name, const Variant &p_value) { - - if (p_name == "data") - PhysicsServer::get_singleton()->shape_set_data(get_shape(), p_value); - else - return false; - - return true; -} - -bool ConcavePolygonShape::_get(const StringName &p_name, Variant &r_ret) const { - - if (p_name == "data") - r_ret = PhysicsServer::get_singleton()->shape_get_data(get_shape()); - else - return false; - return true; -} -void ConcavePolygonShape::_get_property_list(List *p_list) const { - - p_list->push_back(PropertyInfo(Variant::ARRAY, "data")); -} - void ConcavePolygonShape::_update_shape() { } @@ -105,6 +82,7 @@ void ConcavePolygonShape::_bind_methods() { ClassDB::bind_method(D_METHOD("set_faces", "faces"), &ConcavePolygonShape::set_faces); ClassDB::bind_method(D_METHOD("get_faces"), &ConcavePolygonShape::get_faces); + ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR3_ARRAY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "set_faces", "get_faces"); } ConcavePolygonShape::ConcavePolygonShape() : diff --git a/scene/resources/concave_polygon_shape.h b/scene/resources/concave_polygon_shape.h index b659ac7311..2cc9095abf 100644 --- a/scene/resources/concave_polygon_shape.h +++ b/scene/resources/concave_polygon_shape.h @@ -58,9 +58,6 @@ class ConcavePolygonShape : public Shape { }; protected: - bool _set(const StringName &p_name, const Variant &p_value); - bool _get(const StringName &p_name, Variant &r_ret) const; - void _get_property_list(List *p_list) const; static void _bind_methods(); virtual void _update_shape(); diff --git a/scene/resources/curve.cpp b/scene/resources/curve.cpp index e95a07c8b8..5fd6f6c74d 100644 --- a/scene/resources/curve.cpp +++ b/scene/resources/curve.cpp @@ -511,7 +511,7 @@ void Curve::_bind_methods() { 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::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), "_set_data", "_get_data"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_data", "_get_data"); ADD_SIGNAL(MethodInfo(SIGNAL_RANGE_CHANGED)); @@ -915,7 +915,7 @@ void Curve2D::_bind_methods() { 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::INT, "_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_data", "_get_data"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_data", "_get_data"); } Curve2D::Curve2D() { @@ -1410,7 +1410,7 @@ void Curve3D::_bind_methods() { 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::INT, "_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_data", "_get_data"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_data", "_get_data"); } Curve3D::Curve3D() { diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp index 3d060ab7e3..3fab4d3cfc 100644 --- a/scene/resources/environment.cpp +++ b/scene/resources/environment.cpp @@ -270,19 +270,19 @@ void Environment::_validate_property(PropertyInfo &property) const { if (property.name == "background_sky" || property.name == "background_sky_custom_fov" || property.name == "ambient_light/sky_contribution") { if (bg_mode != BG_SKY && bg_mode != BG_COLOR_SKY) { - property.usage = PROPERTY_USAGE_NOEDITOR; + property.usage = PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL; } } if (property.name == "background_color") { if (bg_mode != BG_COLOR && bg_mode != BG_COLOR_SKY) { - property.usage = PROPERTY_USAGE_NOEDITOR; + property.usage = PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL; } } if (property.name == "background_canvas_max_layer") { if (bg_mode != BG_CANVAS) { - property.usage = PROPERTY_USAGE_NOEDITOR; + property.usage = PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL; } } @@ -305,7 +305,7 @@ void Environment::_validate_property(PropertyInfo &property) const { String enabled = prefix + "enabled"; if (property.name.begins_with(prefix) && property.name != enabled && !bool(get(enabled))) { - property.usage = PROPERTY_USAGE_NOEDITOR; + property.usage = PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL; return; } diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp index 5d2e3c172a..026bcea270 100644 --- a/scene/resources/font.cpp +++ b/scene/resources/font.cpp @@ -577,9 +577,9 @@ void BitmapFont::_bind_methods() { ClassDB::bind_method(D_METHOD("set_fallback", "fallback"), &BitmapFont::set_fallback); ClassDB::bind_method(D_METHOD("get_fallback"), &BitmapFont::get_fallback); - ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "textures", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_textures", "_get_textures"); - ADD_PROPERTY(PropertyInfo(Variant::POOL_INT_ARRAY, "chars", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_chars", "_get_chars"); - ADD_PROPERTY(PropertyInfo(Variant::POOL_INT_ARRAY, "kernings", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_kernings", "_get_kernings"); + ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "textures", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_textures", "_get_textures"); + ADD_PROPERTY(PropertyInfo(Variant::POOL_INT_ARRAY, "chars", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_chars", "_get_chars"); + ADD_PROPERTY(PropertyInfo(Variant::POOL_INT_ARRAY, "kernings", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_kernings", "_get_kernings"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_RANGE, "-1024,1024,1"), "set_height", "get_height"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "ascent", PROPERTY_HINT_RANGE, "-1024,1024,1"), "set_ascent", "get_ascent"); diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp index 28d5508698..d9ae912208 100644 --- a/scene/resources/material.cpp +++ b/scene/resources/material.cpp @@ -103,25 +103,19 @@ Material::~Material() { bool ShaderMaterial::_set(const StringName &p_name, const Variant &p_value) { - if (p_name == SceneStringNames::get_singleton()->shader) { - set_shader(p_value); - return true; - } else { - - if (shader.is_valid()) { + if (shader.is_valid()) { - StringName pr = shader->remap_param(p_name); - if (!pr) { - String n = p_name; - if (n.find("param/") == 0) { //backwards compatibility - pr = n.substr(6, n.length()); - } - } - if (pr) { - VisualServer::get_singleton()->material_set_param(_get_material(), pr, p_value); - return true; + StringName pr = shader->remap_param(p_name); + if (!pr) { + String n = p_name; + if (n.find("param/") == 0) { //backwards compatibility + pr = n.substr(6, n.length()); } } + if (pr) { + VisualServer::get_singleton()->material_set_param(_get_material(), pr, p_value); + return true; + } } return false; @@ -129,20 +123,12 @@ bool ShaderMaterial::_set(const StringName &p_name, const Variant &p_value) { bool ShaderMaterial::_get(const StringName &p_name, Variant &r_ret) const { - if (p_name == SceneStringNames::get_singleton()->shader) { - - r_ret = get_shader(); - return true; + if (shader.is_valid()) { - } else { - - if (shader.is_valid()) { - - StringName pr = shader->remap_param(p_name); - if (pr) { - r_ret = VisualServer::get_singleton()->material_get_param(_get_material(), pr); - return true; - } + StringName pr = shader->remap_param(p_name); + if (pr) { + r_ret = VisualServer::get_singleton()->material_get_param(_get_material(), pr); + return true; } } @@ -151,8 +137,6 @@ bool ShaderMaterial::_get(const StringName &p_name, Variant &r_ret) const { void ShaderMaterial::_get_property_list(List *p_list) const { - p_list->push_back(PropertyInfo(Variant::OBJECT, "shader", PROPERTY_HINT_RESOURCE_TYPE, "Shader,ShaderGraph")); - if (!shader.is_null()) { shader->get_param_list(p_list); @@ -193,6 +177,8 @@ void ShaderMaterial::_bind_methods() { ClassDB::bind_method(D_METHOD("get_shader"), &ShaderMaterial::get_shader); ClassDB::bind_method(D_METHOD("set_shader_param", "param", "value"), &ShaderMaterial::set_shader_param); ClassDB::bind_method(D_METHOD("get_shader_param", "param"), &ShaderMaterial::get_shader_param); + + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "shader", PROPERTY_HINT_RESOURCE_TYPE, "Shader,ShaderGraph"), "set_shader", "get_shader"); } void ShaderMaterial::get_argument_options(const StringName &p_function, int p_idx, List *r_options) const { diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp index a2008fd1a7..d59390e1b8 100644 --- a/scene/resources/mesh.cpp +++ b/scene/resources/mesh.cpp @@ -559,12 +559,6 @@ bool ArrayMesh::_set(const StringName &p_name, const Variant &p_value) { return true; } - if (sname == "custom_aabb/custom_aabb") { - - set_custom_aabb(p_value); - return true; - } - if (!sname.begins_with("surfaces")) return false; @@ -673,11 +667,6 @@ bool ArrayMesh::_get(const StringName &p_name, Variant &r_ret) const { else if (what == "name") r_ret = surface_get_name(idx); return true; - } else if (sname == "custom_aabb/custom_aabb") { - - r_ret = custom_aabb; - return true; - } else if (!sname.begins_with("surfaces")) return false; @@ -728,13 +717,13 @@ void ArrayMesh::_get_property_list(List *p_list) const { return; if (blend_shapes.size()) { - p_list->push_back(PropertyInfo(Variant::POOL_STRING_ARRAY, "blend_shape/names", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); + p_list->push_back(PropertyInfo(Variant::POOL_STRING_ARRAY, "blend_shape/names", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); p_list->push_back(PropertyInfo(Variant::INT, "blend_shape/mode", PROPERTY_HINT_ENUM, "Normalized,Relative")); } for (int i = 0; i < surfaces.size(); i++) { - p_list->push_back(PropertyInfo(Variant::DICTIONARY, "surfaces/" + itos(i), PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); + p_list->push_back(PropertyInfo(Variant::DICTIONARY, "surfaces/" + itos(i), PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); p_list->push_back(PropertyInfo(Variant::STRING, "surface_" + itos(i + 1) + "/name", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR)); if (surfaces[i].is_2d) { p_list->push_back(PropertyInfo(Variant::OBJECT, "surface_" + itos(i + 1) + "/material", PROPERTY_HINT_RESOURCE_TYPE, "ShaderMaterial,CanvasItemMaterial", PROPERTY_USAGE_EDITOR)); @@ -742,8 +731,6 @@ void ArrayMesh::_get_property_list(List *p_list) const { p_list->push_back(PropertyInfo(Variant::OBJECT, "surface_" + itos(i + 1) + "/material", PROPERTY_HINT_RESOURCE_TYPE, "ShaderMaterial,SpatialMaterial", PROPERTY_USAGE_EDITOR)); } } - - p_list->push_back(PropertyInfo(Variant::AABB, "custom_aabb/custom_aabb")); } void ArrayMesh::_recompute_aabb() { @@ -1286,6 +1273,9 @@ void ArrayMesh::_bind_methods() { ClassDB::bind_method(D_METHOD("set_custom_aabb", "aabb"), &ArrayMesh::set_custom_aabb); ClassDB::bind_method(D_METHOD("get_custom_aabb"), &ArrayMesh::get_custom_aabb); + ADD_PROPERTY(PropertyInfo(Variant::INT, "blend_shape_mode", PROPERTY_HINT_ENUM, "Normalized,Relative", PROPERTY_USAGE_NOEDITOR), "set_blend_shape_mode", "get_blend_shape_mode"); + ADD_PROPERTY(PropertyInfo(Variant::AABB, "custom_aabb", PROPERTY_HINT_NONE, ""), "set_custom_aabb", "get_custom_aabb"); + BIND_CONSTANT(NO_INDEX_ARRAY); BIND_CONSTANT(ARRAY_WEIGHTS_SIZE); diff --git a/scene/resources/multimesh.cpp b/scene/resources/multimesh.cpp index b2564fd798..4d0a14e3aa 100644 --- a/scene/resources/multimesh.cpp +++ b/scene/resources/multimesh.cpp @@ -211,8 +211,8 @@ void MultiMesh::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "transform_format", PROPERTY_HINT_ENUM, "2D,3D"), "set_transform_format", "get_transform_format"); ADD_PROPERTY(PropertyInfo(Variant::INT, "instance_count", PROPERTY_HINT_RANGE, "0,16384,1"), "set_instance_count", "get_instance_count"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "mesh", PROPERTY_HINT_RESOURCE_TYPE, "Mesh"), "set_mesh", "get_mesh"); - ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR3_ARRAY, "transform_array", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_transform_array", "_get_transform_array"); - ADD_PROPERTY(PropertyInfo(Variant::POOL_COLOR_ARRAY, "color_array", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_color_array", "_get_color_array"); + ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR3_ARRAY, "transform_array", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_transform_array", "_get_transform_array"); + ADD_PROPERTY(PropertyInfo(Variant::POOL_COLOR_ARRAY, "color_array", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_color_array", "_get_color_array"); BIND_ENUM_CONSTANT(TRANSFORM_2D); BIND_ENUM_CONSTANT(TRANSFORM_3D); diff --git a/scene/resources/polygon_path_finder.cpp b/scene/resources/polygon_path_finder.cpp index cd885d95eb..6fea2e1a8e 100644 --- a/scene/resources/polygon_path_finder.cpp +++ b/scene/resources/polygon_path_finder.cpp @@ -589,7 +589,7 @@ void PolygonPathFinder::_bind_methods() { ClassDB::bind_method(D_METHOD("_set_data"), &PolygonPathFinder::_set_data); ClassDB::bind_method(D_METHOD("_get_data"), &PolygonPathFinder::_get_data); - ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_data", "_get_data"); + ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_data", "_get_data"); } PolygonPathFinder::PolygonPathFinder() { diff --git a/scene/resources/shader_graph.cpp b/scene/resources/shader_graph.cpp index 60ba3af7d5..070cc84863 100644 --- a/scene/resources/shader_graph.cpp +++ b/scene/resources/shader_graph.cpp @@ -270,7 +270,7 @@ void ShaderGraph::_bind_methods() { ClassDB::bind_method(D_METHOD("_set_data"),&ShaderGraph::_set_data); ClassDB::bind_method(D_METHOD("_get_data"),&ShaderGraph::_get_data); - ADD_PROPERTY( PropertyInfo(Variant::DICTIONARY,"_data",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR), "_set_data","_get_data"); + ADD_PROPERTY( PropertyInfo(Variant::DICTIONARY,"_data",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_data","_get_data"); //void get_connections(ShaderType p_which,List *p_connections) const; diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp index 235e398904..6811517ead 100644 --- a/scene/resources/style_box.cpp +++ b/scene/resources/style_box.cpp @@ -912,6 +912,7 @@ 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", PROPERTY_HINT_RANGE, "-300,300,1"), "set_grow", "get_grow"); 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 2ce102dd7a..067d123b83 100644 --- a/scene/resources/texture.cpp +++ b/scene/resources/texture.cpp @@ -76,10 +76,12 @@ void Texture::_bind_methods() { ClassDB::bind_method(D_METHOD("draw_rect_region", "canvas_item", "rect", "src_rect", "modulate", "transpose", "normal_map", "clip_uv"), &Texture::draw_rect_region, DEFVAL(Color(1, 1, 1)), DEFVAL(false), DEFVAL(Variant()), DEFVAL(true)); ClassDB::bind_method(D_METHOD("get_data"), &Texture::get_data); + ADD_PROPERTY(PropertyInfo(Variant::INT, "flags", PROPERTY_HINT_FLAGS, "Mipmaps,Repeat,Filter,Ansiotropic Linear,Convert to Linear,Mirrored Repeat,Video Surface"), "set_flags", "get_flags"); + + BIND_ENUM_CONSTANT(FLAGS_DEFAULT); BIND_ENUM_CONSTANT(FLAG_MIPMAPS); BIND_ENUM_CONSTANT(FLAG_REPEAT); BIND_ENUM_CONSTANT(FLAG_FILTER); - BIND_ENUM_CONSTANT(FLAGS_DEFAULT); BIND_ENUM_CONSTANT(FLAG_ANISOTROPIC_FILTER); BIND_ENUM_CONSTANT(FLAG_CONVERT_TO_LINEAR); BIND_ENUM_CONSTANT(FLAG_MIRRORED_REPEAT); @@ -121,10 +123,6 @@ bool ImageTexture::_set(const StringName &p_name, const Variant &p_value) { w = s.width; h = s.height; VisualServer::get_singleton()->texture_set_size_override(texture, w, h); - } else if (p_name == "storage") { - storage = Storage(p_value.operator int()); - } else if (p_name == "lossy_quality") { - lossy_storage_quality = p_value; } else if (p_name == "_data") { _set_data(p_value); } else @@ -143,10 +141,6 @@ bool ImageTexture::_get(const StringName &p_name, Variant &r_ret) const { r_ret = flags; else if (p_name == "size") r_ret = Size2(w, h); - else if (p_name == "storage") - r_ret = storage; - else if (p_name == "lossy_quality") - r_ret = lossy_storage_quality; else return false; @@ -165,8 +159,6 @@ void ImageTexture::_get_property_list(List *p_list) const { p_list->push_back(PropertyInfo(Variant::INT, "flags", PROPERTY_HINT_FLAGS, "Mipmaps,Repeat,Filter,Anisotropic,sRGB,Mirrored Repeat")); p_list->push_back(PropertyInfo(Variant::OBJECT, "image", PROPERTY_HINT_RESOURCE_TYPE, "Image")); p_list->push_back(PropertyInfo(Variant::VECTOR2, "size", PROPERTY_HINT_NONE, "")); - p_list->push_back(PropertyInfo(Variant::INT, "storage", PROPERTY_HINT_ENUM, "Uncompressed,Compress Lossy,Compress Lossless")); - p_list->push_back(PropertyInfo(Variant::REAL, "lossy_quality", PROPERTY_HINT_RANGE, "0.0,1.0,0.01")); } void ImageTexture::_reload_hook(const RID &p_hook) { @@ -363,6 +355,9 @@ void ImageTexture::_bind_methods() { ClassDB::bind_method(D_METHOD("set_size_override", "size"), &ImageTexture::set_size_override); ClassDB::bind_method(D_METHOD("_reload_hook", "rid"), &ImageTexture::_reload_hook); + ADD_PROPERTY(PropertyInfo(Variant::INT, "storage", PROPERTY_HINT_ENUM, "Uncompressed,Compress Lossy,Compress Lossless"), "set_storage", "get_storage"); + ADD_PROPERTY(PropertyInfo(Variant::REAL, "lossy_quality", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_lossy_storage_quality", "get_lossy_storage_quality"); + BIND_ENUM_CONSTANT(STORAGE_RAW); BIND_ENUM_CONSTANT(STORAGE_COMPRESS_LOSSY); BIND_ENUM_CONSTANT(STORAGE_COMPRESS_LOSSLESS); @@ -1133,7 +1128,7 @@ void LargeTexture::_bind_methods() { ClassDB::bind_method(D_METHOD("_set_data", "data"), &LargeTexture::_set_data); ClassDB::bind_method(D_METHOD("_get_data"), &LargeTexture::_get_data); - ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_data", "_get_data"); + ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_data", "_get_data"); } void LargeTexture::draw(RID p_canvas_item, const Point2 &p_pos, const Color &p_modulate, bool p_transpose, const Ref &p_normal_map) const { @@ -1284,8 +1279,6 @@ bool CubeMap::_set(const StringName &p_name, const Variant &p_value) { set_side(SIDE_FRONT, p_value); } else if (p_name == "side/back") { set_side(SIDE_BACK, p_value); - } else if (p_name == "flags") { - set_flags(p_value); } else if (p_name == "storage") { storage = Storage(p_value.operator int()); } else if (p_name == "lossy_quality") { @@ -1310,8 +1303,6 @@ bool CubeMap::_get(const StringName &p_name, Variant &r_ret) const { r_ret = get_side(SIDE_FRONT); } else if (p_name == "side/back") { r_ret = get_side(SIDE_BACK); - } else if (p_name == "flags") { - r_ret = flags; } else if (p_name == "storage") { r_ret = storage; } else if (p_name == "lossy_quality") { @@ -1331,7 +1322,6 @@ void CubeMap::_get_property_list(List *p_list) const { img_hint = PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS; } - p_list->push_back(PropertyInfo(Variant::INT, "flags", PROPERTY_HINT_FLAGS, "Mipmaps,Repeat,Filter")); p_list->push_back(PropertyInfo(Variant::OBJECT, "side/left", PROPERTY_HINT_RESOURCE_TYPE, "Image")); p_list->push_back(PropertyInfo(Variant::OBJECT, "side/right", PROPERTY_HINT_RESOURCE_TYPE, "Image")); p_list->push_back(PropertyInfo(Variant::OBJECT, "side/bottom", PROPERTY_HINT_RESOURCE_TYPE, "Image")); @@ -1353,6 +1343,7 @@ void CubeMap::_bind_methods() { ClassDB::bind_method(D_METHOD("set_lossy_storage_quality", "quality"), &CubeMap::set_lossy_storage_quality); ClassDB::bind_method(D_METHOD("get_lossy_storage_quality"), &CubeMap::get_lossy_storage_quality); + ADD_PROPERTY(PropertyInfo(Variant::INT, "flags", PROPERTY_HINT_FLAGS, "Mipmaps,Repeat,Filter"), "set_flags", "get_flags"); ADD_PROPERTY(PropertyInfo(Variant::INT, "storage_mode", PROPERTY_HINT_ENUM, "Raw,Lossy Compressed,Lossless Compressed"), "set_storage", "get_storage"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "lossy_storage_quality"), "set_lossy_storage_quality", "get_lossy_storage_quality"); diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp index 4d200f5548..800710ed2a 100644 --- a/scene/resources/tile_set.cpp +++ b/scene/resources/tile_set.cpp @@ -260,14 +260,14 @@ void TileSet::_get_property_list(List *p_list) const { p_list->push_back(PropertyInfo(Variant::RECT2, pre + "region")); p_list->push_back(PropertyInfo(Variant::BOOL, pre + "is_autotile", PROPERTY_HINT_NONE, "")); if (tile_get_is_autotile(id)) { - p_list->push_back(PropertyInfo(Variant::INT, pre + "autotile/bitmask_mode", PROPERTY_HINT_ENUM, "2X2,3X3", PROPERTY_USAGE_NOEDITOR)); - p_list->push_back(PropertyInfo(Variant::VECTOR2, pre + "autotile/icon_coordinate", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); - p_list->push_back(PropertyInfo(Variant::VECTOR2, pre + "autotile/tile_size", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); - p_list->push_back(PropertyInfo(Variant::INT, pre + "autotile/spacing", PROPERTY_HINT_RANGE, "0,256,1", PROPERTY_USAGE_NOEDITOR)); - p_list->push_back(PropertyInfo(Variant::ARRAY, pre + "autotile/bitmask_flags", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); - p_list->push_back(PropertyInfo(Variant::ARRAY, pre + "autotile/occluder_map", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); - p_list->push_back(PropertyInfo(Variant::ARRAY, pre + "autotile/navpoly_map", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); - p_list->push_back(PropertyInfo(Variant::ARRAY, pre + "autotile/priority_map", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); + p_list->push_back(PropertyInfo(Variant::INT, pre + "autotile/bitmask_mode", PROPERTY_HINT_ENUM, "2X2,3X3", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); + p_list->push_back(PropertyInfo(Variant::VECTOR2, pre + "autotile/icon_coordinate", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); + p_list->push_back(PropertyInfo(Variant::VECTOR2, pre + "autotile/tile_size", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); + p_list->push_back(PropertyInfo(Variant::INT, pre + "autotile/spacing", PROPERTY_HINT_RANGE, "0,256,1", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); + p_list->push_back(PropertyInfo(Variant::ARRAY, pre + "autotile/bitmask_flags", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); + p_list->push_back(PropertyInfo(Variant::ARRAY, pre + "autotile/occluder_map", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); + p_list->push_back(PropertyInfo(Variant::ARRAY, pre + "autotile/navpoly_map", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); + p_list->push_back(PropertyInfo(Variant::ARRAY, pre + "autotile/priority_map", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); } p_list->push_back(PropertyInfo(Variant::VECTOR2, pre + "occluder_offset")); p_list->push_back(PropertyInfo(Variant::OBJECT, pre + "occluder", PROPERTY_HINT_RESOURCE_TYPE, "OccluderPolygon2D")); diff --git a/scene/resources/world.cpp b/scene/resources/world.cpp index fff336c16f..82183d24e7 100644 --- a/scene/resources/world.cpp +++ b/scene/resources/world.cpp @@ -318,6 +318,9 @@ void World::_bind_methods() { ClassDB::bind_method(D_METHOD("get_direct_space_state"), &World::get_direct_space_state); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "environment", PROPERTY_HINT_RESOURCE_TYPE, "Environment"), "set_environment", "get_environment"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "fallback_environment", PROPERTY_HINT_RESOURCE_TYPE, "Environment"), "set_fallback_environment", "get_fallback_environment"); + ADD_PROPERTY(PropertyInfo(Variant::_RID, "space", PROPERTY_HINT_NONE, "", 0), "", "get_space"); + ADD_PROPERTY(PropertyInfo(Variant::_RID, "scenario", PROPERTY_HINT_NONE, "", 0), "", "get_scenario"); + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "direct_space_state", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsDirectSpaceState", 0), "", "get_direct_space_state"); } World::World() { diff --git a/scene/resources/world_2d.cpp b/scene/resources/world_2d.cpp index 8b1f5d630f..bed6ffd1bd 100644 --- a/scene/resources/world_2d.cpp +++ b/scene/resources/world_2d.cpp @@ -373,6 +373,10 @@ void World2D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_space"), &World2D::get_space); ClassDB::bind_method(D_METHOD("get_direct_space_state"), &World2D::get_direct_space_state); + + ADD_PROPERTY(PropertyInfo(Variant::_RID, "canvas", PROPERTY_HINT_NONE, "", 0), "", "get_canvas"); + ADD_PROPERTY(PropertyInfo(Variant::_RID, "space", PROPERTY_HINT_NONE, "", 0), "", "get_space"); + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "direct_space_state", PROPERTY_HINT_RESOURCE_TYPE, "Physics2DDirectSpaceState", 0), "", "get_direct_space_state"); } Physics2DDirectSpaceState *World2D::get_direct_space_state() { diff --git a/servers/audio/effects/audio_effect_reverb.cpp b/servers/audio/effects/audio_effect_reverb.cpp index 03f5377a80..204b11746c 100644 --- a/servers/audio/effects/audio_effect_reverb.cpp +++ b/servers/audio/effects/audio_effect_reverb.cpp @@ -185,7 +185,7 @@ void AudioEffectReverb::_bind_methods() { 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,1,0.01"), "set_predelay_msec", "get_predelay_msec"); + ADD_PROPERTY(PropertyInfo(Variant::REAL, "predelay_feedback", PROPERTY_HINT_RANGE, "0,1,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"); diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp index 76d0154348..5c453a3113 100644 --- a/servers/audio_server.cpp +++ b/servers/audio_server.cpp @@ -1267,16 +1267,16 @@ bool AudioBusLayout::_get(const StringName &p_name, Variant &r_ret) const { void AudioBusLayout::_get_property_list(List *p_list) const { for (int i = 0; i < buses.size(); i++) { - p_list->push_back(PropertyInfo(Variant::STRING, "bus/" + itos(i) + "/name", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); - p_list->push_back(PropertyInfo(Variant::BOOL, "bus/" + itos(i) + "/solo", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); - p_list->push_back(PropertyInfo(Variant::BOOL, "bus/" + itos(i) + "/mute", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); - p_list->push_back(PropertyInfo(Variant::BOOL, "bus/" + itos(i) + "/bypass_fx", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); - p_list->push_back(PropertyInfo(Variant::REAL, "bus/" + itos(i) + "/volume_db", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); - p_list->push_back(PropertyInfo(Variant::REAL, "bus/" + itos(i) + "/send", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); + p_list->push_back(PropertyInfo(Variant::STRING, "bus/" + itos(i) + "/name", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); + 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)); 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)); - p_list->push_back(PropertyInfo(Variant::BOOL, "bus/" + itos(i) + "/effect/" + itos(j) + "/enabled", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); + p_list->push_back(PropertyInfo(Variant::OBJECT, "bus/" + itos(i) + "/effect/" + itos(j) + "/effect", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); + p_list->push_back(PropertyInfo(Variant::BOOL, "bus/" + itos(i) + "/effect/" + itos(j) + "/enabled", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); } } } diff --git a/servers/physics_2d_server.cpp b/servers/physics_2d_server.cpp index 18cb276d4c..180abc406c 100644 --- a/servers/physics_2d_server.cpp +++ b/servers/physics_2d_server.cpp @@ -108,6 +108,17 @@ void Physics2DDirectBodyState::_bind_methods() { ClassDB::bind_method(D_METHOD("get_step"), &Physics2DDirectBodyState::get_step); 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::VECTOR2, "total_gravity"), "", "get_total_gravity"); + ADD_PROPERTY(PropertyInfo(Variant::REAL, "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"); } Physics2DDirectBodyState::Physics2DDirectBodyState() {} @@ -204,6 +215,14 @@ void Physics2DShapeQueryParameters::_bind_methods() { ClassDB::bind_method(D_METHOD("set_exclude", "exclude"), &Physics2DShapeQueryParameters::set_exclude); ClassDB::bind_method(D_METHOD("get_exclude"), &Physics2DShapeQueryParameters::get_exclude); + + 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::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"); + ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "transform"), "set_transform", "get_transform"); } Physics2DShapeQueryParameters::Physics2DShapeQueryParameters() { @@ -436,6 +455,16 @@ void Physics2DTestMotionResult::_bind_methods() { ClassDB::bind_method(D_METHOD("get_collider_rid"), &Physics2DTestMotionResult::get_collider_rid); ClassDB::bind_method(D_METHOD("get_collider"), &Physics2DTestMotionResult::get_collider); ClassDB::bind_method(D_METHOD("get_collider_shape"), &Physics2DTestMotionResult::get_collider_shape); + + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "motion"), "", "get_motion"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "motion_remainder"), "", "get_motion_remainder"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "collision_point"), "", "get_collision_point"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "collision_normal"), "", "get_collision_normal"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "collider_velocity"), "", "get_collider_velocity"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "collider_id", PROPERTY_HINT_OBJECT_ID), "", "get_collider_id"); + ADD_PROPERTY(PropertyInfo(Variant::_RID, "collider_rid"), "", "get_collider_rid"); + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "collider"), "", "get_collider"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "collider_shape"), "", "get_collider_shape"); } Physics2DTestMotionResult::Physics2DTestMotionResult() { diff --git a/servers/physics_server.cpp b/servers/physics_server.cpp index 95875d2166..9d4807fcf0 100644 --- a/servers/physics_server.cpp +++ b/servers/physics_server.cpp @@ -113,6 +113,19 @@ void PhysicsDirectBodyState::_bind_methods() { ClassDB::bind_method(D_METHOD("get_step"), &PhysicsDirectBodyState::get_step); 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::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"); + ADD_PROPERTY(PropertyInfo(Variant::BASIS, "principal_inertia_axes"), "", "get_principal_inertia_axes"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "angular_velocity"), "set_angular_velocity", "get_angular_velocity"); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "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"); } PhysicsDirectBodyState::PhysicsDirectBodyState() {} @@ -198,6 +211,13 @@ void PhysicsShapeQueryParameters::_bind_methods() { ClassDB::bind_method(D_METHOD("set_exclude", "exclude"), &PhysicsShapeQueryParameters::set_exclude); ClassDB::bind_method(D_METHOD("get_exclude"), &PhysicsShapeQueryParameters::get_exclude); + + 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::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"); } PhysicsShapeQueryParameters::PhysicsShapeQueryParameters() { -- cgit v1.2.3 From ad79c703008394a360eb9875196a9414e1c84585 Mon Sep 17 00:00:00 2001 From: Bojidar Marinov Date: Fri, 12 Jan 2018 00:38:35 +0200 Subject: Update docs [ci skip] --- doc/classes/@GlobalScope.xml | 5 +- doc/classes/Animation.xml | 59 +---- doc/classes/AnimationPlayer.xml | 96 ++------ doc/classes/ArrayMesh.xml | 34 +-- doc/classes/AudioEffectReverb.xml | 14 -- doc/classes/AudioStreamSample.xml | 14 -- doc/classes/BakedLightmapData.xml | 64 +---- doc/classes/BoneAttachment.xml | 21 +- doc/classes/Camera2D.xml | 57 +---- doc/classes/CanvasLayer.xml | 59 +---- doc/classes/ColorPicker.xml | 59 +---- doc/classes/Control.xml | 57 +---- doc/classes/CubeMap.xml | 19 +- doc/classes/Engine.xml | 78 ++---- doc/classes/File.xml | 23 +- doc/classes/FileDialog.xml | 57 +---- doc/classes/GIProbeData.xml | 178 ++------------ doc/classes/GraphEdit.xml | 92 ++----- doc/classes/GraphNode.xml | 67 +----- doc/classes/HTTPClient.xml | 40 +--- doc/classes/HTTPRequest.xml | 19 +- doc/classes/ImageTexture.xml | 40 +--- doc/classes/ItemList.xml | 16 +- doc/classes/Label.xml | 19 +- doc/classes/LineEdit.xml | 19 +- doc/classes/NetworkedMultiplayerPeer.xml | 33 +-- doc/classes/Node.xml | 58 +---- doc/classes/Node2D.xml | 17 +- doc/classes/OS.xml | 263 ++++----------------- doc/classes/PacketPeer.xml | 18 +- doc/classes/PacketPeerStream.xml | 46 +--- doc/classes/PathFollow.xml | 140 ++--------- doc/classes/PathFollow2D.xml | 142 +++-------- doc/classes/Physics2DDirectBodyState.xml | 138 +++-------- doc/classes/Physics2DShapeQueryParameters.xml | 116 ++------- doc/classes/Physics2DTestMotionResult.xml | 74 ++---- doc/classes/PhysicsDirectBodyState.xml | 140 +++-------- doc/classes/PhysicsShapeQueryParameters.xml | 82 +------ doc/classes/Polygon2D.xml | 19 +- doc/classes/PopupMenu.xml | 16 +- doc/classes/ProximityGroup.xml | 24 +- doc/classes/Range.xml | 19 +- doc/classes/RichTextLabel.xml | 115 ++------- doc/classes/RigidBody2D.xml | 57 +---- doc/classes/SceneTree.xml | 136 ++--------- doc/classes/SceneTreeTimer.xml | 18 +- doc/classes/Script.xml | 21 +- doc/classes/ScrollContainer.xml | 44 +--- doc/classes/Shader.xml | 18 +- doc/classes/ShaderMaterial.xml | 18 +- doc/classes/Spatial.xml | 19 +- doc/classes/SpatialVelocityTracker.xml | 18 +- doc/classes/StreamPeer.xml | 21 +- doc/classes/StreamPeerBuffer.xml | 18 +- doc/classes/StyleBoxLine.xml | 16 +- doc/classes/Tabs.xml | 16 +- doc/classes/TextEdit.xml | 21 +- doc/classes/Texture.xml | 27 +-- doc/classes/Timer.xml | 29 +-- doc/classes/Tree.xml | 122 ++-------- doc/classes/TreeItem.xml | 59 +---- doc/classes/Tween.xml | 38 +-- doc/classes/VideoPlayer.xml | 57 +---- doc/classes/Viewport.xml | 55 +---- doc/classes/World.xml | 31 +-- doc/classes/World2D.xml | 32 +-- .../enet/doc_classes/NetworkedMultiplayerENet.xml | 18 +- modules/gridmap/doc_classes/GridMap.xml | 116 ++------- modules/regex/doc_classes/RegExMatch.xml | 32 +-- .../doc_classes/AudioStreamOGGVorbis.xml | 48 +--- .../doc_classes/VisualScriptYield.xml | 16 +- 71 files changed, 695 insertions(+), 3092 deletions(-) diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 6e8b760966..41adeac06a 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -29,9 +29,6 @@ [Geometry] singleton - - [GodotSharp] singleton - [IP] singleton @@ -1285,7 +1282,7 @@ - + Flag for normal method diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index f78b39eadb..4955701792 100644 --- a/doc/classes/Animation.xml +++ b/doc/classes/Animation.xml @@ -50,20 +50,6 @@ Return the index of the specified track. If the track is not found, return -1. - - - - - Return the total length of the animation (in seconds). - - - - - - - Get the animation step value. - - @@ -71,13 +57,6 @@ Return the amount of tracks in the animation. - - - - - Return whether the animation has the loop flag set. - - @@ -122,33 +101,6 @@ Remove a track by specifying the track index. - - - - - - - Set the total length of the animation (in seconds). Note that length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping. - - - - - - - - - Set a flag indicating that the animation must loop. This is uses for correct interpolation of animation cycles, and for hinting the player that it must restart the animation. - - - - - - - - - Set the animation step value. - - @@ -456,6 +408,17 @@ + + + The total length of the animation (in seconds). Note that length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping. + + + A flag indicating that the animation must loop. This is uses for correct interpolation of animation cycles, and for hinting the player that it must restart the animation. + + + The animation step value. + + Value tracks set values in node properties, but only those which can be Interpolated. diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml index a244788020..ee7e795389 100644 --- a/doc/classes/AnimationPlayer.xml +++ b/doc/classes/AnimationPlayer.xml @@ -90,13 +90,6 @@ Returns the list of stored animation names. - - - - - Returns the name of the animation that will be automatically played when the scene is loaded. - - @@ -108,34 +101,6 @@ Get the blend time (in seconds) between two animations, referenced by their names. - - - - - Returns the name of the animation being played. - - - - - - - Get the length (in seconds) of the currently being played animation. - - - - - - - Get the position (in seconds) of the currently playing animation. - - - - - - - Returns the speed scaling ratio of the current animation channel. For instance, if this value is 1 then the animation plays at normal speed. If it's 0.5 then it plays at half speed. If it's 2 then it plays at double speed. - - @@ -145,13 +110,6 @@ Returns [code]true[/code] if the [code]AnimationPlayer[/code] stores an [Animation] with key [code]name[/code]. - - - - - Returns [code]true[/code] if the player is active. - - @@ -226,24 +184,6 @@ Seek the animation to the [code]seconds[/code] point in time (in seconds). If [code]update[/code] is [code]true[/code], the animation updates too, otherwise it updates at process time. - - - - - - - Sets the player as active (playing). If [code]true[/code], updates animations in response to process-related notifications. Default value: [code]true[/code]. - - - - - - - - - Defines the name of the animation to play when the scene loads. Default value: [code]""[/code]. - - @@ -257,24 +197,6 @@ Specify a blend time (in seconds) between two animations, referenced by their names. - - - - - - - Sets the name of the current animation. If already playing, restarts the animation. Ensure [member active] is [code]true[/code] to simulate [method play]. Default value: [code]""[/code]. - - - - - - - - - Sets the speed scaling ratio in a given animation channel (or channel 0 if none is provided). Default value: [code]1[/code]. - - @@ -286,12 +208,30 @@ + + The name of the animation to play when the scene loads. Default value: [code]""[/code]. + + + The name of the current animation, "" if not playing anything. When being set, does not restart the animation. See also [method play]. Default value: [code]""[/code]. + + + The length (in seconds) of the currently being played animation. + + + The position (in seconds) of the currently playing animation. + + + If [code]true[/code], updates animations in response to process-related notifications. Default value: [code]true[/code]. + The default time in which to blend animations. Ranges from 0 to 4096 with 0.01 precision. Default value: [code]0[/code]. The process notification in which to update animations. Default value: [enum ANIMATION_PROCESS_IDLE]. + + The speed scaling ratio. For instance, if this value is 1 then the animation plays at normal speed. If it's 0.5 then it plays at half speed. If it's 2 then it plays at double speed. Default value: [code]1[/code]. + The node from which node path references will travel. Default value: [code]".."[/code]. diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index 92c4fe2fe7..2f1c0b92fd 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -51,12 +51,6 @@ - - - - - - @@ -65,12 +59,6 @@ - - - - - - @@ -84,22 +72,6 @@ - - - - - - - - - - - - - - - - @@ -212,6 +184,12 @@ + + + + + + Default value used for index_array_len when no indices are present. diff --git a/doc/classes/AudioEffectReverb.xml b/doc/classes/AudioEffectReverb.xml index 13bc66f6f3..037f4778a5 100644 --- a/doc/classes/AudioEffectReverb.xml +++ b/doc/classes/AudioEffectReverb.xml @@ -12,20 +12,6 @@ - - - - - - - - - - - - - - diff --git a/doc/classes/AudioStreamSample.xml b/doc/classes/AudioStreamSample.xml index 83e9729bc1..c3c218b1d7 100644 --- a/doc/classes/AudioStreamSample.xml +++ b/doc/classes/AudioStreamSample.xml @@ -11,20 +11,6 @@ - - - - - - - - - - - - - - diff --git a/doc/classes/BakedLightmapData.xml b/doc/classes/BakedLightmapData.xml index 2b95cff136..5d23bf876a 100644 --- a/doc/classes/BakedLightmapData.xml +++ b/doc/classes/BakedLightmapData.xml @@ -27,30 +27,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -73,42 +49,18 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + diff --git a/doc/classes/BoneAttachment.xml b/doc/classes/BoneAttachment.xml index b7f21ebf0c..6af47b940f 100644 --- a/doc/classes/BoneAttachment.xml +++ b/doc/classes/BoneAttachment.xml @@ -11,23 +11,12 @@ - - - - - Returns the name of the bone node attached to. - - - - - - - - - Changes the name of the bone node - - + + + The name of the attached bone. + + diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml index c95691d07f..72f6513e66 100644 --- a/doc/classes/Camera2D.xml +++ b/doc/classes/Camera2D.xml @@ -47,27 +47,6 @@ Returns the location of the [code]Camera2D[/code]'s screen-center, relative to the origin. - - - - - Returns the [Viewport] used by the camera if it is not using the default viewport. - - - - - - - Returns the horizontal offset of the camera. - - - - - - - Returns the vertical offset of the camera. - - @@ -83,33 +62,6 @@ This has no effect if smoothing is disabled. - - - - - - - Assigns a custom [Viewport] node to the [code]Camera2D[/code]. If [code]viewport[/code] is not a [Viewport], it re-assigns the default viewport instead. - - - - - - - - - The camera's horizontal offset is set to [code]ofs[/code]. - - - - - - - - - The camera's vertical offset is set to [code]ofs[/code]. - - @@ -118,6 +70,9 @@ If [code]true[/code] the camera is the active camera for the current scene. Only one camera can be current, so setting a different camera [code]current[/code] will disable this one. + + The custom [Viewport] node attached to the [code]Camera2D[/code]. If null or not a [Viewport], uses the default viewport instead. + Bottom margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the edge of the screen. @@ -163,6 +118,12 @@ The camera's offset, useful for looking around or camera shake animations. + + The horizontal offset of the camera, relative to the drag margins. Default value: [code]0[/code] + + + The vertical offset of the camera, relative to the drag margins. Default value: [code]0[/code] + If [code]true[/code] the camera rotates with the target. Default value: [code]false[/code] diff --git a/doc/classes/CanvasLayer.xml b/doc/classes/CanvasLayer.xml index 01c2dd6ba9..bccbf69cdf 100644 --- a/doc/classes/CanvasLayer.xml +++ b/doc/classes/CanvasLayer.xml @@ -11,27 +11,6 @@ - - - - - Returns the [Viewport] used by the camera if it is not using the default viewport. - - - - - - - Return the base rotation for this layer in radians (helper). - - - - - - - Return the base transform for this layer. - - @@ -39,47 +18,29 @@ Return the [World2D] used by this layer. - - - - - - - Assigns a custom [Viewport] node to the [code]CanvasLayer[/code]. If [code]viewport[/code] is not a [Viewport], it re-assigns the default viewport instead. - - - - - - - - - Set the base rotation for this layer in radians (helper). - - - - - - - - - Set the base transform for this layer. - - + + The custom [Viewport] node assigned to the [code]CanvasLayer[/code]. If null, uses the default viewport instead. + Layer index for draw order. Lower values are drawn first. Default value: [code]1[/code]. The layer's base offset. - + + The layer's rotation in radians. + + The layer's rotation in degrees. The layer's scale. + + The layer's transform. + diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml index 192f139ba9..1896fd46fb 100644 --- a/doc/classes/ColorPicker.xml +++ b/doc/classes/ColorPicker.xml @@ -20,55 +20,18 @@ Adds the current selected to color to a list of colors (presets), the presets will be displayed in the color picker and the user will be able to select them, notice that the presets list is only for this color picker. - - - - - Gets the current color. - - - - - - - Returns whether the color has transparency or not. - - - - - - - Returns whether this color picker is in raw mode or not, raw mode will allow the color R, G, B component values to go beyond 1, you have to consider that the max value for color components is 1, going beyond that value will not have effect in the color, but can be used for special operations that require it (like tinting without darkening or rendering sprites in HDR). - - - - - - - - - Set true if you want the color to have an alpha channel (transparency), or false if you want a solid color. - - - - - - - - - Select the current color. - - - - - - - - - Set whether this color picker is using raw mode or not, see [method is_raw_mode]. - - + + + The currently selected color. + + + If [code]true[/code], shows an alpha channel slider (transparency). + + + If [code]true[/code], allows the color R, G, B component values to go beyond 1.0, which can be used for certain special operations that require it (like tinting without darkening or rendering sprites in HDR). + + diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 214f78afab..87ed5df500 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -178,13 +178,6 @@ Returns the mouse cursor shape the control displays on mouse hover, one of the [code]CURSOR_*[/code] constants. - - - - - Returns the default cursor shape for this control. See enum [code]CURSOR_*[/code] for the list of shapes. - - @@ -200,13 +193,6 @@ Returns MARGIN_LEFT and MARGIN_TOP at the same time. This is a helper (see [method set_margin]). - - - - - Returns the focus access mode for the control (FOCUS_NONE, FOCUS_CLICK, FOCUS_ALL) (see [method set_focus_mode]). - - @@ -224,13 +210,6 @@ - - - - - Returns the Control position, relative to the top-left corner of the parent Control and independent of the anchor mode. - - @@ -490,15 +469,6 @@ Sets MARGIN_LEFT and MARGIN_TOP at the same time. This is a helper (see [method set_margin]). - - - - - - - Sets the default cursor shape for this control. See [code]CURSOR_*[/code] for the list of available cursor shapes. Useful for Godot plugins and applications or games that use the system's mouse cursors. - - @@ -524,24 +494,6 @@ Sets MARGIN_RIGHT and MARGIN_BOTTOM at the same time. This is a helper (see [method set_margin]). - - - - - - - Set the focus access mode for the control (FOCUS_NONE, FOCUS_CLICK, FOCUS_ALL). Only one Control can be focused at the same time, and it will receive keyboard signals. - - - - - - - - - Move the Control to a new position, relative to the top-left corner of the [i]window[/i] Control, and without changing current anchor mode. (see [method set_margin]). - - @@ -594,6 +546,9 @@ Anchors the top edge of the node to the origin, the center or the end of its parent container. It changes how the top margin updates when the node moves or changes size. Use one of the [code]ANCHOR_*[/code] constants. Default value: [code]ANCHOR_BEGIN[/code]. + + The focus access mode for the control (None, Click or All). Only one Control can be focused at the same time, and it will receive keyboard signals. + Tells Godot which node it should give keyboard focus to if the user presses Tab, the down arrow on the keyboard, or down on a gamepad. The node must be a [code]Control[/code]. If this property is not set, Godot will give focus to the closest [code]Control[/code] to the bottom of this one. If the user presses Tab, Godot will give focus to the closest node to the right first, then to the bottom. If the user presses Shift+Tab, Godot will look to the left of the node, then above it. @@ -631,11 +586,17 @@ Distance between the node's top edge and its parent container, based on [member anchor_top]. + + The default cursor shape for this control. Useful for Godot plugins and applications or games that use the system's mouse cursors. + Controls whether the control will be able to receive mouse button input events through [method _gui_input] and how these events should be handled. Use one of the [code]MOUSE_FILTER_*[/code] constants. See the constants to learn what each does. + + The node's global position, relative to the world (usually to the top-left corner of the window). + The minimum size of the node's bounding rectangle. If you set it to a value greater than (0, 0), the node's bounding rectangle will always have at least this size, even if its content is smaller. If it's set to (0, 0), the node sizes automatically to fit its content, be it a texture or child nodes. diff --git a/doc/classes/CubeMap.xml b/doc/classes/CubeMap.xml index 30022efd38..7639f6d409 100644 --- a/doc/classes/CubeMap.xml +++ b/doc/classes/CubeMap.xml @@ -11,13 +11,6 @@ - - - - - Returns the render flags for the [code]CubeMap[/code]. See the [code]FLAG_*[/code] constants for details. - - @@ -41,15 +34,6 @@ Returns the [code]CubeMap[/code]'s width. - - - - - - - Returns the render flags for the [code]CubeMap[/code]. See the [code]FLAG_*[/code] constants for details. - - @@ -63,6 +47,9 @@ + + The render flags for the [code]CubeMap[/code]. See the [code]FLAG_*[/code] constants for details. + The lossy storage quality of the [code]CubeMap[/code] if the storage mode is set to STORAGE_COMPRESS_LOSSY. diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml index 0fd5892860..400ec83ecc 100644 --- a/doc/classes/Engine.xml +++ b/doc/classes/Engine.xml @@ -25,13 +25,6 @@ Returns the frames per second of the running game. - - - - - Returns the number of fixed iterations per second (for fixed process and physics). - - @@ -47,20 +40,6 @@ - - - - - Returns the desired frames per second. If the hardware cannot keep up, this setting may not be respected. It defaults to 0, which indicates no limit. - - - - - - - Returns how fast or slow the in-game clock ticks versus the real life one. It defaults to 1.0. A value of 2.0 means the game moves twice as fast as real life, whilst a value of 0.5 means the game moves at half the regular speed. - - @@ -83,13 +62,6 @@ - - - - - Returns [code]true[/code] if the editor is running. - - @@ -97,43 +69,21 @@ Returns [code]true[/code] if the game is inside the fixed process and physics phase of the game loop. - - - - - - - Sets the running inside the editor hint if [code]enabled[/code] is [code]true[/code]. - - - - - - - - - Sets the number of fixed iterations per second (for fixed process and physics). - - - - - - - - - Sets the target frames per second. - - - - - - - - - Sets the time scale. - - + + + If [code]true[/code], it is running inside the editor. Useful for tool scripts. + + + The number of fixed iterations per second (for fixed process and physics). + + + The desired frames per second. If the hardware cannot keep up, this setting may not be respected. Defaults to 0, which indicates no limit. + + + Controls how fast or slow the in-game clock ticks versus the real life one. It defaults to 1.0. A value of 2.0 means the game moves twice as fast as real life, whilst a value of 0.5 means the game moves at half the regular speed. + + diff --git a/doc/classes/File.xml b/doc/classes/File.xml index 8c270ece4b..20ea064a18 100644 --- a/doc/classes/File.xml +++ b/doc/classes/File.xml @@ -109,13 +109,6 @@ Returns the next 64 bits from the file as a floating point number. - - - - - Returns [code]true[/code] if endian swap is enabled for this file. - - @@ -274,16 +267,6 @@ Changes the file reading/writing cursor to the specified position (in bytes from the end of the file). Note that this is an offset, so you should use negative numbers or the cursor will be at the end of the file. - - - - - - - If [code]true[/code] the file's endianness is swapped. Use this if you're dealing with files written in big endian machines. - Note that this is about the file format, not CPU type. This is always reseted to [code]false[/code] whenever you open the file. - - @@ -393,6 +376,12 @@ + + + If [code]true[/code] the file's endianness is swapped. Use this if you're dealing with files written in big endian machines. + Note that this is about the file format, not CPU type. This is always reseted to [code]false[/code] whenever you open the file. + + Opens the file for read operations. diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml index 3387b4a2ed..d064ae908f 100644 --- a/doc/classes/FileDialog.xml +++ b/doc/classes/FileDialog.xml @@ -33,27 +33,6 @@ - - - - - Get the current working directory of the file dialog. - - - - - - - Get the current selected file of the file dialog (empty if none). - - - - - - - Get the current selected path (directory and file) of the file dialog (empty if none). - - @@ -68,37 +47,19 @@ Invalidate and update the current dialog content list. - - - - - - - Set the current working directory of the file dialog. - - - - - - - - - Set the current selected file name of the file dialog. - - - - - - - - - Set the current selected file path of the file dialog. - - + + The current working directory of the file dialog. + + + The currently selected file of the file dialog. + + + The currently selected file path of the file dialog. + diff --git a/doc/classes/GIProbeData.xml b/doc/classes/GIProbeData.xml index aba59f57ea..2ac591889c 100644 --- a/doc/classes/GIProbeData.xml +++ b/doc/classes/GIProbeData.xml @@ -9,161 +9,31 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml index 3bc7fed1d9..d7a263bd3f 100644 --- a/doc/classes/GraphEdit.xml +++ b/doc/classes/GraphEdit.xml @@ -49,26 +49,6 @@ Return an Array containing the list of connections. A connection consists in a structure of the form {from_slot: 0, from: "GraphNode name 0", to_slot: 1, to: "GraphNode name 1" } - - - - - Return the scroll offset. - - - - - - - - - - - - - Return the current zoom value. - - @@ -84,36 +64,6 @@ Return true if the 'from_port' slot of 'from' GraphNode is connected to the 'to_port' slot of 'to' GraphNode. - - - - - Return true is the disconnection of connections is enable in the visual GraphEdit. False otherwise. - - - - - - - - - - - - - - - Enable the disconnection of existing connections in the visual GraphEdit by left-clicking a connection and releasing into the void. - - - - - - - - - - @@ -122,32 +72,24 @@ - - - - - - - - - - - - - - - - - - - - - - - Set the zoom value of the GraphEdit. Zoom value is between [0.01; 1.728]. - - + + + If [code]true[/code], enables disconnection of existing connections in the GraphEdit by dragging the right end. + + + The scroll offset. + + + The snapping distance in pixels. + + + If [code]true[/code], enables snapping. + + + The current zoom value. + + diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml index c1b18e4cd8..9a8b56f8a1 100644 --- a/doc/classes/GraphNode.xml +++ b/doc/classes/GraphNode.xml @@ -95,19 +95,6 @@ Return the type of the output connection 'idx'. - - - - - Return the offset of the GraphNode. - - - - - - - - @@ -144,18 +131,6 @@ Return the (integer) type of right (output) 'idx' slot. - - - - - - - - - - - - @@ -174,39 +149,6 @@ Return true if right (output) slot 'idx' is enabled. False otherwise. - - - - - - - - - - - - - - - Set the offset of the GraphNode. - - - - - - - - - - - - - - - - - - @@ -233,8 +175,17 @@ + + + + The offset of the GraphNode, relative to the scroll offset of the [GraphEdit]. Note that you cannot use position directly, as [GraphEdit] is a [Container]. + + + + + diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml index 80f6966e12..d54e749d72 100644 --- a/doc/classes/HTTPClient.xml +++ b/doc/classes/HTTPClient.xml @@ -39,13 +39,6 @@ [code]verify_host[/code] will check the SSL identity of the host if set to [code]true[/code]. - - - - - Returns the current connection. - - @@ -90,13 +83,6 @@ If [code]true[/code] this [code]HTTPClient[/code] has a response available. - - - - - If [code]true[/code] blocking mode is enabled. - - @@ -172,24 +158,6 @@ Sends the body data raw, as a byte array and does not encode it in any way. - - - - - - - If set to true, execution will block until all data is read from the response. - - - - - - - - - Sets connection to use for this client. - - @@ -200,6 +168,14 @@ + + + If [code]true[/code], execution will block until all data is read from the response. + + + The connection to use for this client. + + HTTP GET method. The GET method requests a representation of the specified resource. Requests using GET should only retrieve data. diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml index 985198c76f..f8da5297e1 100644 --- a/doc/classes/HTTPRequest.xml +++ b/doc/classes/HTTPRequest.xml @@ -26,13 +26,6 @@ Returns the response body length. - - - - - Returns the file this request will download into. - - @@ -63,20 +56,14 @@ - - - - - - - Sets the file to download into. Outputs the response body into the file if set. - - Maximum allowed size for response bodies. + + The file to download into. Will output any received file into it. + Maximum number of allowed redirects. diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml index a20af677cb..15b9d2298e 100644 --- a/doc/classes/ImageTexture.xml +++ b/doc/classes/ImageTexture.xml @@ -46,20 +46,6 @@ Return the format of the [code]ImageTexture[/code], one of [Image].FORMAT_*. - - - - - Return the storage quality for [code]ImageTexture[/code].STORAGE_COMPRESS_LOSSY. - - - - - - - Return the storage type. One of [code]ImageTexture[/code].STORAGE_*. - - @@ -78,15 +64,6 @@ Set the [Image] of this [code]ImageTexture[/code]. - - - - - - - Set the storage quality in case of [code]ImageTexture[/code].STORAGE_COMPRESS_LOSSY. - - @@ -96,16 +73,15 @@ Resizes the [code]ImageTexture[/code] to the specified dimensions. - - - - - - - Set the storage type. One of [code]ImageTexture[/code].STORAGE_*. - - + + + The storage quality for [code]ImageTexture[/code].STORAGE_COMPRESS_LOSSY. + + + The storage type (raw, lossy, or compressed). + + [Image] data is stored raw and unaltered. diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml index f3d0c271ac..76af678d51 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -53,12 +53,6 @@ Ensure selection is visible, adjusting the scroll position as necessary. - - - - - - @@ -198,14 +192,6 @@ Note: This method does not trigger the item selection signal. - - - - - - - - @@ -328,6 +314,8 @@ + + diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml index bfc130634d..a84294f2c5 100644 --- a/doc/classes/Label.xml +++ b/doc/classes/Label.xml @@ -33,13 +33,6 @@ Returns the total length of the text. - - - - - Returns the restricted number of characters to display. Returns -1 if unrestricted. - - @@ -47,15 +40,6 @@ Returns the number of lines shown. Useful if the [code]Label[/code] 's height cannot currently display all lines. - - - - - - - Restricts the number of characters to display. Set to -1 to disable. - - @@ -85,6 +69,9 @@ Controls the text's vertical align. Supports top, center, bottom, and fill. Set it to one of the [code]VALIGN_*[/code] constants. + + Restricts the number of characters to display. Set to -1 to disable. + diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index c28b722eb3..5dab9199e0 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -34,13 +34,6 @@ Clears the current selection. - - - - - Returns the cursor position inside the [code]LineEdit[/code]. - - @@ -81,15 +74,6 @@ Selects the whole [String]. - - - - - - - Sets the cursor position inside the [code]LineEdit[/code]. The text may scroll if needed. - - @@ -101,6 +85,9 @@ Duration (in seconds) of a caret's blinking cycle. + + The cursor's position inside the [code]LineEdit[/code]. When set, the text may scroll to accomodate it. + If [code]true[/code] the context menu will appear when right clicked. diff --git a/doc/classes/NetworkedMultiplayerPeer.xml b/doc/classes/NetworkedMultiplayerPeer.xml index a7350b3863..db345bd0d8 100644 --- a/doc/classes/NetworkedMultiplayerPeer.xml +++ b/doc/classes/NetworkedMultiplayerPeer.xml @@ -32,13 +32,6 @@ Returns the ID of this [code]NetworkedMultiplayerPeer[/code]. - - - - - Returns [code]true[/code] if this [code]NetworkedMultiplayerPeer[/code] refuses new connections. Default value: [code]false[/code]. - - @@ -46,15 +39,6 @@ Waits up to 1 second to receive a new network event. - - - - - - - If [code]true[/code] this [code]NetworkedMultiplayerPeer[/code] refuses new connections. Default value: [code]false[/code]. - - @@ -64,16 +48,15 @@ The peer to which packets will be sent. Default value: [code]0[/code]. - - - - - - - The manner in which to send packets to the [code]target_peer[/code]. See [enum TransferMode]. - - + + + If [code]true[/code] this [code]NetworkedMultiplayerPeer[/code] refuses new connections. Default value: [code]false[/code]. + + + The manner in which to send packets to the [code]target_peer[/code]. See [enum TransferMode]. + + diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index e56733f102..d16a128034 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -184,13 +184,6 @@ Returns an array of references to node's children. - - - - - Returns a filename that may be contained by the node. When a scene is instanced from a file, its topmost node contains the filename from which it was loaded (see [method set_filename]). - - @@ -205,13 +198,6 @@ Returns the node's index, i.e. its position among the siblings of its parent. - - - - - Returns the name of the node. This name is unique among the siblings (other child nodes from the same parent). - - @@ -255,13 +241,6 @@ - - - - - Returns the node owner (see [method set_owner]). - - @@ -659,24 +638,6 @@ Sets the folded state of the node in the Scene dock. - - - - - - - A node can contain a filename. This filename should not be changed by the user, unless writing editors and tools. When a scene is instanced from a file, its topmost node contains the filename from which it was loaded. - - - - - - - - - Sets the name of the node. The name must be unique within the parent. Using an existing name will cause the node to be automatically renamed. - - @@ -688,15 +649,6 @@ Sets the node network master to the peer with the given peer ID. The network master is the peer that has authority over it on the network. Inherited from the parent node by default, which ultimately defaults to peer ID 1 (the server). - - - - - - - Sets the node owner. A node can have any other node as owner (as long as it is a valid parent, grandparent, etc ascending in the tree). When saving a node (using SceneSaver) all the nodes it owns will be saved with it. This allows for the creation of complex [SceneTree]s, with instancing and subinstancing. - - @@ -768,6 +720,16 @@ + + When a scene is instanced from a file, its topmost node contains the filename from which it was loaded. + + + The name of the node. This name is unique among the siblings (other child nodes from the same parent). + When set to an existing name, the node will be automatically renamed + + + The node owner. A node can have any other node as owner (as long as it is a valid parent, grandparent, etc. ascending in the tree). When saving a node (using SceneSaver) all the nodes it owns will be saved with it. This allows for the creation of complex [SceneTree]s, with instancing and subinstancing. + diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml index 5b7def99dc..6f6fc9f835 100644 --- a/doc/classes/Node2D.xml +++ b/doc/classes/Node2D.xml @@ -38,12 +38,6 @@ Returns the [Transform2D] relative to this node's parent. - - - - - - @@ -93,14 +87,6 @@ Applies a rotation to the node, in radians, starting from its current rotation. - - - - - - - - @@ -148,6 +134,9 @@ Position, relative to the node's parent. + + Rotation in radians, relative to the node's parent. + Rotation in degrees, relative to the node's parent. diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 902bf4ebfa..f2c09feef8 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -99,20 +99,6 @@ Returns the scancode of the given string (e.g. "Escape") - - - - - Returns true if the current window is borderless. - - - - - - - Get clipboard from the host OS. - - @@ -120,13 +106,6 @@ Returns the command line arguments passed to the engine. - - - - - Returns the current screen index (0 padded). - - @@ -178,12 +157,6 @@ Returns the path to the current engine executable. - - - - - - @@ -281,13 +254,6 @@ xxxhdpi - 640 dpi - - - - - Returns the current screen orientation, the return value will be one of the SCREEN_ORIENTATION constants in this class. - - @@ -403,20 +369,6 @@ - - - - - Returns the window position relative to the screen, the origin is the top left corner, +Y axis goes to the bottom and +X axis goes to the right. - - - - - - - Returns the size of the window (without counting window manager decorations). - - @@ -464,20 +416,6 @@ Returns [code]false[/code] if the build is a release build. - - - - - Returns [code]true[/code] if low cpu usage mode is enabled. - - - - - - - Returns [code]true[/code] if the screen is being kept on. - - @@ -508,41 +446,6 @@ If [code]true[/code], the [code]user://[/code] file system is persistent, so that its state is the same after a player quits and starts the game again. Relevant to the HTML5 platform, where this persistence may be unavailable. - - - - - Returns [code]true[/code] if synchronizing the framerate to the monitor's refresh rate is enabled. - - - - - - - Returns [code]true[/code] if the window is in fullscreen mode. - - - - - - - Returns [code]true[/code] if the window is maximized. - - - - - - - Returns [code]true[/code] if the window is minimized. - - - - - - - Returns [code]true[/code] if the window is resizable. - - @@ -636,42 +539,6 @@ Request the user attention to the window. It'll flash the taskbar button on Windows or bounce the dock icon on OSX. - - - - - - - Removes the window frame. - - - - - - - - - Sets clipboard to the OS. - - - - - - - - - Sets the current screen by index. - - - - - - - - - Sets the exit code that will be returned by the game. - - @@ -689,33 +556,6 @@ - - - - - - - Sets keep screen on if true, or goes to sleep by device setting if false. (for Android/iOS) - - - - - - - - - Set to [code]true[/code] to enable the low cpu usage mode. In this mode, the screen only redraws when there are changes, and a considerable sleep time is inserted between frames. Use this in tool mode to reduce CPU usage. - - - - - - - - - Sets the current screen orientation, the argument value must be one of the SCREEN_ORIENTATION constants in this class. - - @@ -734,69 +574,6 @@ Enables backup saves if [code]enabled[/code] is [code]true[/code]. - - - - - - - If [code]true[/code] the framerate will synchronize to the monitor's refresh rate. - - - - - - - - - Sets window fullscreen mode to the [i]enabled[/i] argument, [i]enabled[/i] is a toggle for the fullscreen mode, calling the function with [i]enabled[/i] true when the screen is not on fullscreen mode will cause the screen to go to fullscreen mode, calling the function with [i]enabled[/i] false when the screen is in fullscreen mode will cause the window to exit the fullscreen mode. - - - - - - - - - Set [code]true[/code] to maximize the window. - - - - - - - - - Set [code]true[/code] to minimize the window. - - - - - - - - - Sets the position of the window to the specified position (this function could be restricted by the window manager, meaning that there could be some unreachable areas of the screen). - - - - - - - - - Sets the window resizable state, if the window is not resizable it will preserve the dimensions specified in the project settings. - - - - - - - - - Sets the window size to the specified size. - - @@ -827,6 +604,46 @@ + + + The clipboard from the host OS. Might be unavailable on some platforms. + + + The current screen index (starting from 0). + + + + + + + + + The current screen orientation. + + + + + If [code]true[/code], removes the window frame. + + + If [code]true[/code], the window is fullscreen. + + + If [code]true[/code], the window is maximized. + + + If [code]true[/code], the window is minimized. + + + The window position relative to the screen, the origin is the top left corner, +Y axis goes to the bottom and +X axis goes to the right. + + + If [code]true[/code], the window is resizable by the user. + + + The size of the window (without counting window manager decorations). + + diff --git a/doc/classes/PacketPeer.xml b/doc/classes/PacketPeer.xml index 57d88d7ff8..b920d92f3d 100644 --- a/doc/classes/PacketPeer.xml +++ b/doc/classes/PacketPeer.xml @@ -39,12 +39,6 @@ Get a Variant. - - - - - - @@ -63,15 +57,11 @@ Send a Variant as a packet. - - - - - - - - + + + + diff --git a/doc/classes/PacketPeerStream.xml b/doc/classes/PacketPeerStream.xml index 5d320a09f8..879a2f2c52 100644 --- a/doc/classes/PacketPeerStream.xml +++ b/doc/classes/PacketPeerStream.xml @@ -11,44 +11,16 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Set the [StreamPeer] object to be wrapped. - - + + + + + + + The wrapped [StreamPeer] object. + + diff --git a/doc/classes/PathFollow.xml b/doc/classes/PathFollow.xml index de7bb8715c..ac170b2ed7 100644 --- a/doc/classes/PathFollow.xml +++ b/doc/classes/PathFollow.xml @@ -12,122 +12,32 @@ - - - - - This method returns whether the position between two cached points (see [method set_cubic_interpolation]) is interpolated linearly, or cubicly. - - - - - - - Returns the X displacement this node has from its parent [Path]. - - - - - - - Returns the distance along the path in 3D units. - - - - - - - Returns the rotation mode. The constants below list which axes are allowed to rotate for each mode. - - - - - - - Returns the distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last). - - - - - - - Returns the Y displacement this node has from its parent [Path]. - - - - - - - Returns whether this node wraps its offsets around, or truncates them to the path ends. - - - - - - - - - The points along the [Curve3D] of the [Path] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough. - There are two answers to this problem: Either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations. - This method controls whether the position between two cached points is interpolated linearly, or cubicly. - - - - - - - - - Moves this node in the X axis. As this node's position will be set every time its offset is set, this allows many PathFollow to share the same curve (and thus the same movement pattern), yet not return the same position for a given path offset. - A similar effect may be achieved moving the this node's descendants. - - - - - - - - - If set, any offset outside the path's length (whether set by [method set_offset] or [method set_unit_offset] will wrap around, instead of stopping at the ends. Set it for cyclic paths. - - - - - - - - - Sets the distance from the first vertex, measured in 3D units along the path. This sets this node's position to a point within the path. - - - - - - - - - Allows or forbids rotation on one or more axes, per the constants below. - - - - - - - - - Sets the distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length. - - - - - - - - - Moves this node in the Y axis, for the same reasons of [method set_h_offset]. - - + + + If [code]true[/code] the position between two cached points is interpolated cubically, and linearly otherwise. + The points along the [Curve3D] of the [Path] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough. + There are two answers to this problem: Either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations. + + + The node's offset along the curve. + + + If [code]true[/code], any offset outside the path's length will wrap around, instead of stopping at the ends. Use it for cyclic paths. + + + The distance from the first vertex, measured in 3D units along the path. This sets this node's position to a point within the path. + + + Allows or forbids rotation on one or more axes, depending on the constants being used. + + + The distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length. + + + The node's offset perpendicular to the curve. + + Forbids the PathFollow to rotate. diff --git a/doc/classes/PathFollow2D.xml b/doc/classes/PathFollow2D.xml index 56bec3d719..eed12b610d 100644 --- a/doc/classes/PathFollow2D.xml +++ b/doc/classes/PathFollow2D.xml @@ -12,122 +12,34 @@ - - - - - This method returns whether the position between two cached points (see [method set_cubic_interpolation]) is interpolated linearly, or cubicly. - - - - - - - Returns the horizontal displacement this node has from its parent [Path2D]. - - - - - - - Returns the distance along the path in pixels. - - - - - - - Returns the distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last). - - - - - - - Returns the vertical displacement this node has from its parent [Path2D]. - - - - - - - Returns whether this node wraps its offsets around, or truncates them to the path ends. - - - - - - - Returns whether this node rotates to follow the path. - - - - - - - - - The points along the [Curve2D] of the [Path2D] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough. - There are two answers to this problem: Either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations. - This method controls whether the position between two cached points is interpolated linearly, or cubicly. - - - - - - - - - Moves this node horizontally. As this node's position will be set every time its offset is set, this allows many PathFollow2D to share the same curve (and thus the same movement pattern), yet not return the same position for a given path offset. - A similar effect may be achieved moving this node's descendants. - - - - - - - - - If set, any offset outside the path's length (whether set by [method set_offset] or [method set_unit_offset] will wrap around, instead of stopping at the ends. Set it for cyclic paths. - - - - - - - - - Sets the distance from the first vertex, measured in pixels along the path. This sets this node's position to a point within the path. - - - - - - - - - If set, this node rotates to follow the path, making its descendants rotate. - - - - - - - - - Sets the distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length. - - - - - - - - - Moves the PathFollow2D vertically, for the same reasons of [method set_h_offset]. - - + + + If [code]true[/code] the position between two cached points is interpolated cubically, and linearly otherwise. + The points along the [Curve2D] of the [Path2D] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough. + There are two answers to this problem: Either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations. + + + The node's offset along the curve. + + + + + If [code]true[/code], any offset outside the path's length will wrap around, instead of stopping at the ends. Use it for cyclic paths. + + + The distance along the path in pixels. + + + If [code]true[/code], this node rotates to follow the path, making its descendants rotate. + + + The distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last). This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length. + + + The node's offset perpendicular to the curve. + + diff --git a/doc/classes/Physics2DDirectBodyState.xml b/doc/classes/Physics2DDirectBodyState.xml index a229ca494d..c359801020 100644 --- a/doc/classes/Physics2DDirectBodyState.xml +++ b/doc/classes/Physics2DDirectBodyState.xml @@ -11,13 +11,6 @@ - - - - - Return the angular velocity of the body. - - @@ -115,27 +108,6 @@ Return the local shape index of the collision. - - - - - Return the inverse of the inertia of the body. - - - - - - - Return the inverse of the mass of the body. - - - - - - - Return the current linear velocity of the body. - - @@ -143,41 +115,6 @@ Return the current state of space, useful for queries. - - - - - Return the timestep (delta) used for the simulation. - - - - - - - Return the rate at which the body stops rotating, if there are not any other forces moving it. - - - - - - - Return the total gravity vector being currently applied to this body. - - - - - - - Return the rate at which the body stops moving, if there are not any other forces moving it. - - - - - - - Return the transform matrix of the body. - - @@ -185,50 +122,39 @@ Call the built-in force integration code. - - - - - Return true if this body is currently sleeping (not active). - - - - - - - - - Change the angular velocity of the body. - - - - - - - - - Change the linear velocity of the body. - - - - - - - - - Set the sleeping state of the body, only affects character/rigid bodies. - - - - - - - - - Change the transform matrix of the body. - - + + + The angular velocity of the body. + + + The inverse of the inertia of the body. + + + The inverse of the mass of the body. + + + The linear velocity of the body. + + + [code]true[/code] if this body is currently sleeping (not active). + + + The timestep (delta) used for the simulation. + + + The rate at which the body stops rotating, if there are not any other forces moving it. + + + The total gravity vector being currently applied to this body. + + + The rate at which the body stops moving, if there are not any other forces moving it. + + + The transformation matrix of the body. + + diff --git a/doc/classes/Physics2DShapeQueryParameters.xml b/doc/classes/Physics2DShapeQueryParameters.xml index 93165afe60..eeba622f85 100644 --- a/doc/classes/Physics2DShapeQueryParameters.xml +++ b/doc/classes/Physics2DShapeQueryParameters.xml @@ -11,84 +11,6 @@ - - - - - Return the physics layer the shape belongs to. - - - - - - - Return the list of objects, or object [RID]s, that will be excluded from collisions. - - - - - - - Return the collision margin for the shape. - - - - - - - Return the current movement speed of the shape. - - - - - - - Return the [RID] of the shape queried. - - - - - - - Return the transform matrix of the shape queried. - - - - - - - - - Set the physics layer the shape belongs to. - - - - - - - - - Set the list of objects, or object [RID]s, that will be excluded from collisions. - - - - - - - - - Set the collision margin for the shape. A collision margin is an amount (in pixels) that the shape will grow when computing collisions, to account for numerical imprecision. - - - - - - - - - Set the current movement speed of the shape. - - @@ -98,25 +20,27 @@ Set the [Shape2D] that will be used for collision/intersection queries. - - - - - - - Set the [RID] of the shape to be used in queries. - - - - - - - - - Set the transformation matrix of the shape. This is necessary to set its position/rotation/scale. - - + + + The physics layer the query should be made on. + + + The list of objects or object [RID]s, that will be excluded from collisions. + + + The collision margin for the shape. + + + The motion of the shape being queried for. + + + The [RID] of the queried shape. See [method set_shape] also. + + + the transform matrix of the queried shape. + + diff --git a/doc/classes/Physics2DTestMotionResult.xml b/doc/classes/Physics2DTestMotionResult.xml index bc7cb68bc9..93809ca2a4 100644 --- a/doc/classes/Physics2DTestMotionResult.xml +++ b/doc/classes/Physics2DTestMotionResult.xml @@ -9,61 +9,27 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/PhysicsDirectBodyState.xml b/doc/classes/PhysicsDirectBodyState.xml index 1d588ecfff..486804f196 100644 --- a/doc/classes/PhysicsDirectBodyState.xml +++ b/doc/classes/PhysicsDirectBodyState.xml @@ -37,18 +37,6 @@ - - - - - - - - - - - - @@ -127,111 +115,55 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + The angular velocity of the body. + + + + + The inverse of the inertia of the body. + + + The inverse of the mass of the body. + + + The linear velocity of the body. + + + + + [code]true[/code] if this body is currently sleeping (not active). + + + The timestep (delta) used for the simulation. + + + The rate at which the body stops rotating, if there are not any other forces moving it. + + + The total gravity vector being currently applied to this body. + + + The rate at which the body stops moving, if there are not any other forces moving it. + + + The transformation matrix of the body. + + diff --git a/doc/classes/PhysicsShapeQueryParameters.xml b/doc/classes/PhysicsShapeQueryParameters.xml index 98d6846b13..19036151ed 100644 --- a/doc/classes/PhysicsShapeQueryParameters.xml +++ b/doc/classes/PhysicsShapeQueryParameters.xml @@ -9,60 +9,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -71,23 +17,19 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml index f69010458e..26ddf617ea 100644 --- a/doc/classes/Polygon2D.xml +++ b/doc/classes/Polygon2D.xml @@ -11,22 +11,6 @@ - - - - - Return the rotation in radians of the texture polygon. - - - - - - - - - Set the amount of rotation of the polygon texture, [code]texture_rotation[/code] is specified in radians and clockwise rotation. - - @@ -54,6 +38,9 @@ Amount to offset the polygon's [code]texture[/code]. If [code](0, 0)[/code] the texture's origin (its top-left corner) will be placed at the polygon's [code]position[/code]. + The texture's rotation in radians. + + The texture's rotation in degrees. diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index 13cf16d2ee..c9a8b2a9fd 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -233,12 +233,6 @@ - - - - - - @@ -284,14 +278,6 @@ Removes the item at index "idx" from the menu. Note that the indexes of items after the removed item are going to be shifted by one. - - - - - - - - @@ -455,6 +441,8 @@ + + diff --git a/doc/classes/ProximityGroup.xml b/doc/classes/ProximityGroup.xml index 42e2c5e690..4c9a20d630 100644 --- a/doc/classes/ProximityGroup.xml +++ b/doc/classes/ProximityGroup.xml @@ -21,26 +21,14 @@ - - - - - - - - - - - - - - - - + + + + @@ -53,5 +41,9 @@ + + + + diff --git a/doc/classes/Range.xml b/doc/classes/Range.xml index d86ff57661..169f28bd7a 100644 --- a/doc/classes/Range.xml +++ b/doc/classes/Range.xml @@ -11,22 +11,6 @@ - - - - - Return value mapped to 0 to 1 range. - - - - - - - - - Set value mapped to 0 to 1 (unit) range, it will then be converted to the actual value within min and max. - - @@ -57,6 +41,9 @@ Page size. Used mainly for [ScrollBar]. ScrollBar's length is its size multiplied by [code]page[/code] over the difference between [code]min_value[/code] and [code]max_value[/code]. + + The value mapped between 0 and 1. + If [code]true[/code], [code]value[/code] will always be rounded to the nearest integer. diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 5c04d3406e..39b0e80775 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -53,20 +53,6 @@ Returns the total number of newlines in the tag stack's text tags. Considers wrapped text as one line. - - - - - Returns the number of spaces associated with a single tab length. Does not affect "\t" in text tags, only indent tags. - - - - - - - Returns the raw content of [member bbcode_text]. - - @@ -88,34 +74,6 @@ Returns the number of visible lines. - - - - - Returns [code]true[/code] if the label underlines meta tags such as [url]{text}[/url]. - - - - - - - Returns [code]true[/code] if the scrollbar is visible. Does not block scrolling completely. See [method scroll_to_line]. - - - - - - - Returns [code]true[/code] if the window scrolls down to display new content automatically. - - - - - - - Returns [code]true[/code] if the label allows text selection. - - @@ -234,51 +192,6 @@ Scrolls the window's top line to match [code]line[/code]. - - - - - - - If [code]true[/code] will underline meta tags such as the [url] bbcode. Default value: [code]true[/code]. - - - - - - - - - If [code]false[/code] the vertical scrollbar is hidden. Default value: [code]true[/code]. - - - - - - - - - If [code]true[/code] the window scrolls to reveal new content. Default value: [code]false[/code]. - - - - - - - - - If [code]true[/code] text can be selected. - - - - - - - - - Sets the current tab length in spaces. Use with [method push_indent] to redefine indent length. - - @@ -294,15 +207,6 @@ Columns with a [code]false[/code] expand will not contribute to the total ratio. - - - - - - - Clears the tag stack and adds a raw text tag to the top of it. Does not parse bbcodes. Does not modify [member bbcode_text]. - - @@ -311,12 +215,31 @@ The label's text in BBCode format. Is not representative of manual modifications to the internal tag stack. Erases changes made by other methods when edited. + + If [code]true[/code], the label underlines meta tags such as [url]{text}[/url]. Default value: [code]true[/code]. + If [code]true[/code] the label uses the custom font color. Default value: [code]false[/code]. The text's visibility, as a [float] between 0.0 and 1.0. + + If [code]true[/code], the scrollbar is visible. Does not block scrolling completely. See [method scroll_to_line]. Default value: [code]true[/code]. + + + If [code]true[/code], the window scrolls down to display new content automatically. Default value: [code]false[/code]. + + + If [code]true[/code], the label allows text selection. + + + The number of spaces associated with a single tab length. Does not affect "\t" in text tags, only indent tags. + + + The raw text of the label. + When set, clears the tag stack and adds a raw text tag to the top of it. Does not parse bbcodes. Does not modify [member bbcode_text]. + The restricted number of characters to display in the label. diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml index 991e0fa3f4..3465c851f8 100644 --- a/doc/classes/RigidBody2D.xml +++ b/doc/classes/RigidBody2D.xml @@ -49,20 +49,6 @@ Applies a positioned impulse to the body (which will be affected by the body mass and shape). This is the equivalent of hitting a billiard ball with a cue: a force that is applied instantaneously. Both the impulse and the offset from the body origin are in global coordinates. - - - - - Returns the body's total applied force. - - - - - - - Returns the body's total applied torque. - - @@ -70,31 +56,6 @@ Returns a list of the bodies colliding with this one. Use [member contacts_reported] to set the maximum number reported. You must also set [member contact_monitor] to [code]true[/code]. Note that the result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. - - - - - Returns the body's moment of inertia, which is computed automatically from the body's mass and assigned [Shape2D]s during the physics frame. Note that it will not yet have a value in the [code]_ready()[/code] function. - - - - - - - - - Sets the applied force vector. This is the equivalent of firing a rocket: the force is applied constantly. - - - - - - - - - Sets the applied torque. - - @@ -104,15 +65,6 @@ Sets the body's velocity on the given axis. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. - - - - - - - Set the body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body. The moment of inertia is usually computed automatically from the mass and the shapes, but this function allows you to set a custom value. Set 0 (or negative) inertia to return to automatically computing it. - - @@ -134,6 +86,12 @@ The body's rotational velocity. + + The body's total applied force. + + + The body's total applied torque. + The body's bounciness. Default value: [code]0[/code]. @@ -159,6 +117,9 @@ Multiplies the gravity applied to the body. The body's gravity is calculated from the "Default Gravity" value in "Project > Project Settings > Physics > 2d" and/or any additional gravity vector applied by [Area2D]s. Default value: [code]1[/code]. + + The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body. The moment of inertia is usually computed automatically from the mass and the shapes, but this function allows you to set a custom value. Set 0 (or negative) inertia to return to automatically computing it. + Damps the body's [member linear_velocity]. If [code]-1[/code] the body will use the "Default Linear Damp" in "Project > Project Settings > Physics > 2d". Default value: [code]-1[/code]. diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml index 3a4b843b06..fff7f2aa26 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -1,4 +1,4 @@ - +xml version="1.0" encoding="UTF-8" ?> @@ -57,18 +57,6 @@ - - - - - - - - - - - - @@ -101,12 +89,6 @@ - - - - - - @@ -128,18 +110,6 @@ Returns true if there is a [NetworkedMultiplayerPeer] set (with [method SceneTree.set_network_peer]). - - - - - - - - - - - - @@ -153,24 +123,6 @@ Returns true if this SceneTree's [NetworkedMultiplayerPeer] is in server mode (listening for connections). - - - - - - - - - - - - - - - - - - @@ -221,38 +173,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -285,23 +205,6 @@ - - - - - - - Set the peer object to handle the RPC system (effectively enabling networking). Depending on the peer itself, the SceneTree will become a network server (check with [method is_network_server()]) and will set root node's network mode to master (see NETWORK_MODE_* constants in [Node]), or it will become a regular peer with root node set to slave. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to SceneTree's signals. - - - - - - - - - - @@ -310,14 +213,6 @@ - - - - - - - - @@ -332,15 +227,28 @@ - - - - - - - - + + + + + + + + + + + The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the SceneTree will become a network server (check with [method is_network_server()]) and will set root node's network mode to master (see NETWORK_MODE_* constants in [Node]), or it will become a regular peer with root node set to slave. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to SceneTree's signals. + + + + + + + + + + diff --git a/doc/classes/SceneTreeTimer.xml b/doc/classes/SceneTreeTimer.xml index 0fdcb26e6e..c05f4d1fd6 100644 --- a/doc/classes/SceneTreeTimer.xml +++ b/doc/classes/SceneTreeTimer.xml @@ -9,21 +9,11 @@ - - - - - - - - - - - - - - + + + + diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml index c7df24879e..4fcd4b20d9 100644 --- a/doc/classes/Script.xml +++ b/doc/classes/Script.xml @@ -31,13 +31,6 @@ - - - - - Returns the script source code, or an empty string if source code is not available. - - @@ -79,16 +72,12 @@ Reloads the script's class implementation. Returns an error code. - - - - - - - Sets the script source code. Does not reload the class implementation. - - + + + The script source code, or an empty string if source code is not available. When set, does not reload the class implementation automatically. + + diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml index 87ad7d57f5..65ea3216f8 100644 --- a/doc/classes/ScrollContainer.xml +++ b/doc/classes/ScrollContainer.xml @@ -11,43 +11,19 @@ - - - - - Return current horizontal scroll value. - - - - - - - Return current vertical scroll value. - - - - - - - - - Set horizontal scroll value. - - - - - - - - - Set vertical scroll value. - - - + + The current horizontal scroll value. - + + If [code]true[/code], enables horizontal scrolling. + + + The current horizontal scroll value. + + + If [code]true[/code], enables vertical scrolling. diff --git a/doc/classes/Shader.xml b/doc/classes/Shader.xml index 082c48dfce..543164d92e 100644 --- a/doc/classes/Shader.xml +++ b/doc/classes/Shader.xml @@ -11,12 +11,6 @@ - - - - - - @@ -39,14 +33,6 @@ - - - - - - - - @@ -58,6 +44,10 @@ + + + + diff --git a/doc/classes/ShaderMaterial.xml b/doc/classes/ShaderMaterial.xml index 096d6d4332..1c2ff15a63 100644 --- a/doc/classes/ShaderMaterial.xml +++ b/doc/classes/ShaderMaterial.xml @@ -9,12 +9,6 @@ - - - - - - @@ -23,14 +17,6 @@ - - - - - - - - @@ -42,6 +28,10 @@ + + + + diff --git a/doc/classes/Spatial.xml b/doc/classes/Spatial.xml index d0addcf9f9..4f23dbf053 100644 --- a/doc/classes/Spatial.xml +++ b/doc/classes/Spatial.xml @@ -13,13 +13,6 @@ - - - - - Returns the SpatialGizmo for this node. Used for example in [EditorSpatialGizmo] as custom visualization and editing handles in Editor. - - @@ -195,15 +188,6 @@ Makes the node ignore its parents transformations. Node transformations are only in global space. - - - - - - - Set [SpatialGizmo] for this node. Used for example in [EditorSpatialGizmo] as custom visualization and editing handles in Editor. - - @@ -289,6 +273,9 @@ + + The SpatialGizmo for this node. Used for example in [EditorSpatialGizmo] as custom visualization and editing handles in Editor. + World space (global) [Transform] of this node. diff --git a/doc/classes/SpatialVelocityTracker.xml b/doc/classes/SpatialVelocityTracker.xml index a58049a141..deb58c54ee 100644 --- a/doc/classes/SpatialVelocityTracker.xml +++ b/doc/classes/SpatialVelocityTracker.xml @@ -15,12 +15,6 @@ - - - - - - @@ -29,14 +23,6 @@ - - - - - - - - @@ -46,6 +32,10 @@ + + + + diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml index 8ecd9e5816..c4cb816dc8 100644 --- a/doc/classes/StreamPeer.xml +++ b/doc/classes/StreamPeer.xml @@ -131,13 +131,6 @@ Get a Variant from the stream. - - - - - Return whether this [code]StreamPeer[/code] is using big-endian format. - - @@ -264,16 +257,12 @@ Put a Variant into the stream. - - - - - - - Set this [code]StreamPeer[/code] to use big-endian format. Default is false. - - + + + If [code]true[/code], this [code]StreamPeer[/code] will using big-endian format for encoding and decoding. + + diff --git a/doc/classes/StreamPeerBuffer.xml b/doc/classes/StreamPeerBuffer.xml index 66696ed416..d2a83f1384 100644 --- a/doc/classes/StreamPeerBuffer.xml +++ b/doc/classes/StreamPeerBuffer.xml @@ -21,12 +21,6 @@ - - - - - - @@ -55,15 +49,11 @@ - - - - - - - - + + + + diff --git a/doc/classes/StyleBoxLine.xml b/doc/classes/StyleBoxLine.xml index e18af2334c..051cc90a7c 100644 --- a/doc/classes/StyleBoxLine.xml +++ b/doc/classes/StyleBoxLine.xml @@ -9,24 +9,12 @@ - - - - - - - - - - - - - - + + diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml index fbda1aedb4..4bb175701f 100644 --- a/doc/classes/Tabs.xml +++ b/doc/classes/Tabs.xml @@ -35,12 +35,6 @@ - - - - - - @@ -105,14 +99,6 @@ - - - - - - - - @@ -149,6 +135,8 @@ + + diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index f4d80c46b4..c7b3794e29 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -294,24 +294,6 @@ - - - - - - - Set the maximum amount of characters editable. - - - - - - - - - Enable text wrapping when it goes beyond he edge of what is visible. - - @@ -384,6 +366,9 @@ String value of the [TextEdit]. + If [code]true[/code], enables text wrapping when it goes beyond he edge of what is visible. + + diff --git a/doc/classes/Texture.xml b/doc/classes/Texture.xml index bf27bc4768..fd1598996a 100644 --- a/doc/classes/Texture.xml +++ b/doc/classes/Texture.xml @@ -71,13 +71,6 @@ - - - - - Return the current texture flags. - - @@ -105,17 +98,16 @@ - - - - - - - Change the texture flags. - - + + + The texture's flags. + + + + Default flags. Generate mipmaps, repeat, and filter are enabled. + Generate mipmaps, which are smaller versions of the same texture to use when zoomed out, keeping the aspect ratio. @@ -125,9 +117,6 @@ Magnifying filter, to enable smooth zooming in of the texture. - - Default flags. Generate mipmaps, repeat, and filter are enabled. - Anisotropic mipmap filtering. Generates smaller versions of the same texture with different aspect ratios. More effective on planes often shown going to the horrizon as those textures (Walls or Ground for example) get squashed in the viewport to different aspect ratios and regular mipmaps keep the aspect ratio so they don't optimize storage that well in those cases. diff --git a/doc/classes/Timer.xml b/doc/classes/Timer.xml index 09071b2ad1..876eed92ae 100644 --- a/doc/classes/Timer.xml +++ b/doc/classes/Timer.xml @@ -11,20 +11,6 @@ - - - - - Returns the timer's remaining time in seconds. Returns 0 if the timer is inactive. - - - - - - - Returns [code]true[/code] if the timer is paused. - - @@ -32,15 +18,6 @@ Returns [code]true[/code] if the timer is stopped. - - - - - - - Pauses the timer. If [code]paused[/code] is [code]true[/code], the timer will not process until it is started or unpaused again, even if [method start] is called. - - @@ -64,9 +41,15 @@ If [code]true[/code], Timer will stop when reaching 0. If [code]false[/code], it will restart. Default value: [code]false[/code]. + + If [code]true[/code], the timer is paused and will not process until it is unpaused again, even if [method start] is called. + Processing mode. Uses TIMER_PROCESS_* constants as value. + + The timer's remaining time in seconds. Returns 0 if the timer is inactive. + Wait time in seconds. diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index e26082c47e..7e11421b74 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -54,20 +54,6 @@ Makes the currently selected item visible. This will scroll the tree to make sure the selected item is visible. - - - - - Returns [code]true[/code] if a cell that is currently already selected may be selected again. - - - - - - - Returns [code]true[/code] if a right click can select items. - - @@ -95,13 +81,6 @@ Returns the column's width in pixels. - - - - - Returns the amount of columns. - - @@ -109,13 +88,6 @@ Returns the rectangle for custom popups. Helper to create custom cell controls that display a popup. See [method TreeItem.set_cell_mode]. - - - - - Returns the current drop mode's flags. - - @@ -202,31 +174,6 @@ Returns the current selection's column. - - - - - Returns [code]true[/code] if the folding arrow is hidden. - - - - - - - - - If [code]true[/code] the currently selected cell may be selected again. - - - - - - - - - If [code]true[/code] a right mouse button click can select items. - - @@ -269,52 +216,31 @@ If [code]true[/code] column titles are visible. - - - - - - - Set the amount of columns. - - - - - - - - - Set the drop mode as an OR combination of flags. See [code]DROP_MODE_*[/code] constants. - - - - - - - - - If [code]true[/code] the folding arrow is hidden. - - - - - - - - - If [code]true[/code] the tree's root is hidden. - - - - - - - - - Allow single or multiple selection. See the [code]SELECT_*[/code] constants. - - + + + If [code]true[/code] the currently selected cell may be selected again. + + + If [code]true[/code] a right mouse button click can select items. + + + + The amount of columns. + + + The drop mode as an OR combination of flags. See [code]DROP_MODE_*[/code] constants. + + + If [code]true[/code] the folding arrow is hidden. + + + If [code]true[/code] the tree's root is hidden. + + + Allow single or multiple selection. See the [code]SELECT_*[/code] constants. + + diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index 421185fe51..d5bb5a2726 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -111,13 +111,6 @@ Returns the custom background color of column [code]column[/code]. - - - - - Returns the custom minimum height. - - @@ -260,13 +253,6 @@ Returns [code]true[/code] if the given column is checked. - - - - - Returns [code]true[/code] if this TreeItem is collapsed. - - @@ -284,13 +270,6 @@ Returns [code]true[/code] if column [code]column[/code] is editable. - - - - - Returns [code]true[/code] if folding is disabled for this TreeItem. - - @@ -376,15 +355,6 @@ If [code]true[/code] the column [code]column[/code] is checked. - - - - - - - If [code]true[/code] the TreeItem is collapsed. - - @@ -432,24 +402,6 @@ Sets the given column's custom draw callback to [code]callback[/code] method on [code]object[/code]. - - - - - - - Sets the custom minimum height of this TreeItem. - - - - - - - - - If [code]true[/code] folding is disabled for this TreeItem. - - @@ -585,6 +537,17 @@ + + + If [code]true[/code] the TreeItem is collapsed. + + + The custom minimum height. + + + If [code]true[/code] folding is disabled for this TreeItem. + + Cell contains a string. diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml index a11580860a..3d1dd8abf6 100644 --- a/doc/classes/Tween.xml +++ b/doc/classes/Tween.xml @@ -78,13 +78,6 @@ Returns the time needed for all tweens to end in seconds, measured from the start. Thus, if you have two tweens, one ending 10 seconds after the start and the other - 20 seconds, it would return 20 seconds, as by that time all tweens would have finished. - - - - - Returns the speed that has been set from editor GUI or [method set_repeat]. - - @@ -186,13 +179,6 @@ Returns true if any tweens are currently running, and false otherwise. Note that this method doesn't consider tweens that have ended. - - - - - Returns true if repeat has been set from editor GUI or [method set_repeat]. - - @@ -265,24 +251,6 @@ Activate/deactivate the tween. You can use this for pausing animations, though [method stop_all] and [method resume_all] might be more fit for this. - - - - - - - Make the tween repeat after all tweens have finished. - - - - - - - - - Set the speed multiplier of the tween. Set it to 1 for normal speed, 2 for two times nromal speed, and 0.5 for half of the normal speed. Setting it to 0 would pause the animation, but you might consider using [method set_active] or [method stop_all] and [method resume_all] for this. - - @@ -371,6 +339,12 @@ + + The speed multiplier of the tween. Set it to 1 for normal speed, 2 for two times nromal speed, and 0.5 for half of the normal speed. Setting it to 0 would pause the animation, but you might consider using [method set_active] or [method stop_all] and [method resume_all] for this. + + + If [code]true[/code], the tween will repeat. + diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoPlayer.xml index 281dc1f071..2ea1a1a841 100644 --- a/doc/classes/VideoPlayer.xml +++ b/doc/classes/VideoPlayer.xml @@ -11,13 +11,6 @@ - - - - - Get the amount of milliseconds to store in buffer while playing. - - @@ -25,13 +18,6 @@ Get the name of the video stream. - - - - - Get the current position of the stream, in seconds. - - @@ -39,13 +25,6 @@ Get the current frame of the video as a [Texture]. - - - - - Get the volume of the audio track as a linear value. - - @@ -60,33 +39,6 @@ Start the video playback. - - - - - - - Set the amount of milliseconds to buffer during playback. - - - - - - - - - Set the current position of the stream, in seconds. - - - - - - - - - Set the audio volume as a linear value. - - @@ -100,6 +52,9 @@ + + The amount of milliseconds to store in buffer while playing. + @@ -108,6 +63,12 @@ + + The current position of the stream, in seconds. + + + The volume of the audio track as a linear value. + diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index ad3903d549..acef5a6ea1 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -37,13 +37,6 @@ Return the active 3D camera. - - - - - Get the canvas transform of the viewport. - - @@ -51,13 +44,6 @@ Get the total transform of the viewport. - - - - - Get the global canvas transform of the viewport. - - @@ -101,13 +87,6 @@ Return the final, visible rect in global screen coordinates. - - - - - Return the 2D world of the viewport. - - @@ -152,24 +131,6 @@ - - - - - - - Set the canvas transform of the viewport, useful for changing the on-screen positions of all child [CanvasItem]s. This is relative to the global canvas transform of the viewport. - - - - - - - - - Set the global canvas transform of the viewport. The canvas transform is relative to this. - - @@ -192,14 +153,6 @@ Set whether the size override affects stretch as well. - - - - - - - - @@ -232,10 +185,16 @@ + + The canvas transform of the viewport, useful for changing the on-screen positions of all child [CanvasItem]s. This is relative to the global canvas transform of the viewport. + + + The global canvas transform of the viewport. The canvas transform is relative to this. + @@ -272,6 +231,8 @@ + + diff --git a/doc/classes/World.xml b/doc/classes/World.xml index 9011d39669..d5bbef268a 100644 --- a/doc/classes/World.xml +++ b/doc/classes/World.xml @@ -11,35 +11,24 @@ - - - - - Returns the World's physics space. - - - - - - - Returns the World's visual scenario. - - - - - - - Returns the World's sound space. - - + + The World's physics direct space state, used for making various queries. Might be used only during [code]_physics_process[/code]. + The World's [Environment]. The World's fallback_environment will be used if the World's [Environment] fails or is missing. + + The World's visual scenario. + + + + The World's physics space. + diff --git a/doc/classes/World2D.xml b/doc/classes/World2D.xml index 93c88968ac..c9524c85a1 100644 --- a/doc/classes/World2D.xml +++ b/doc/classes/World2D.xml @@ -11,28 +11,18 @@ - - - - - Retrieve the [RID] of this world's canvas resource. Used by the [VisualServer] for 2D drawing. - - - - - - - Retrieve the state of this world's physics space. This allows arbitrary querying for collision. - - - - - - - Retrieve the [RID] of this world's physics space resource. Used by the [Physics2DServer] for 2D physics, treating it as both a space and an area. - - + + + The [RID] of this world's canvas resource. Used by the [VisualServer] for 2D drawing. + + + The state of this world's physics space. This allows arbitrary querying for collision. + + + The [RID] of this world's physics space resource. Used by the [Physics2DServer] for 2D physics, treating it as both a space and an area. + + diff --git a/modules/enet/doc_classes/NetworkedMultiplayerENet.xml b/modules/enet/doc_classes/NetworkedMultiplayerENet.xml index 25d17542ea..00162d6e60 100644 --- a/modules/enet/doc_classes/NetworkedMultiplayerENet.xml +++ b/modules/enet/doc_classes/NetworkedMultiplayerENet.xml @@ -47,12 +47,6 @@ Create server that listens to connections via [code]port[/code]. - - - - - - @@ -61,15 +55,11 @@ - - - - - - - - + + + + diff --git a/modules/gridmap/doc_classes/GridMap.xml b/modules/gridmap/doc_classes/GridMap.xml index c30c6d77b9..f814304180 100644 --- a/modules/gridmap/doc_classes/GridMap.xml +++ b/modules/gridmap/doc_classes/GridMap.xml @@ -67,34 +67,6 @@ The orientation of the cell at the grid-based X, Y and Z coordinates. -1 is retuned if the cell is empty. - - - - - The dimensions of the grid's cells. - - - - - - - Returns whether or not grid items are centered on the X axis. - - - - - - - Returns whether or not grid items are centered on the Y axis. - - - - - - - Returns whether or not grid items are centered on the Z axis. - - @@ -118,20 +90,6 @@ Array of [Transform] and [Mesh] references corresponding to the non empty cells in the grid. The transforms are specified in world space. - - - - - The size of each octant measured in number of cells. This applies to all three axis. - - - - - - - The assigned [MeshLibrary]. - - @@ -188,42 +146,6 @@ Optionally, the item's orientation can be passed. - - - - - - - Sets the height, width and depth of the grid's cells. - - - - - - - - - Set grid items to be centered on the X axis. By default it is enabled. - - - - - - - - - Set grid items to be centered on the Y axis. By default it is enabled. - - - - - - - - - Set grid items to be centered on the Z axis. By default it is enabled. - - @@ -258,24 +180,6 @@ - - - - - - - Sets the size for each octant measured in number of cells. This applies to all three axis. - - - - - - - - - Sets the collection of meshes for the map. - - @@ -286,10 +190,30 @@ + + If [code]true[/code] grid items are centered on the X axis. + + + If [code]true[/code] grid items are centered on the Y axis. + + + If [code]true[/code] grid items are centered on the Z axis. + + + The size of each octant measured in number of cells. This applies to all three axis. + + + + + The dimensions of the grid's cells. + + + The assigned [MeshLibrary]. + diff --git a/modules/regex/doc_classes/RegExMatch.xml b/modules/regex/doc_classes/RegExMatch.xml index 0217099ce6..b84a98ff6d 100644 --- a/modules/regex/doc_classes/RegExMatch.xml +++ b/modules/regex/doc_classes/RegExMatch.xml @@ -28,13 +28,6 @@ Returns the number of capturing groups. - - - - - Returns a dictionary of named groups and its corresponding group number. Only groups with that were matched are included. If multiple groups have the same name, that name would refer to the first matching one. - - @@ -55,21 +48,18 @@ Returns an empty string if the group did not match or doesn't exist. - - - - - Returns an [Array] of the match and its capturing groups. - - - - - - - Returns the source string used with the search pattern to find this matching result. - - + + + A dictionary of named groups and its corresponding group number. Only groups with that were matched are included. If multiple groups have the same name, that name would refer to the first matching one. + + + An [Array] of the match and its capturing groups. + + + The source string used with the search pattern to find this matching result. + + diff --git a/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml b/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml index 4533d59cae..57fcc75887 100644 --- a/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml +++ b/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml @@ -11,49 +11,13 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + diff --git a/modules/visual_script/doc_classes/VisualScriptYield.xml b/modules/visual_script/doc_classes/VisualScriptYield.xml index 72ef586c1f..b42fc027cf 100644 --- a/modules/visual_script/doc_classes/VisualScriptYield.xml +++ b/modules/visual_script/doc_classes/VisualScriptYield.xml @@ -9,22 +9,10 @@ - - - - - - - - - - - - - - + + -- cgit v1.2.3