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
This commit is contained in:
parent
c1c17b04bd
commit
9b8e8b2220
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<StreamPeer> &p_peer) {
|
|||
peer = p_peer;
|
||||
}
|
||||
|
||||
Ref<StreamPeer> PacketPeerStream::get_stream_peer() const {
|
||||
|
||||
return peer;
|
||||
}
|
||||
|
||||
void PacketPeerStream::set_input_buffer_max_size(int p_max_size) {
|
||||
|
||||
//warning may lose packets
|
||||
|
|
|
@ -98,6 +98,7 @@ public:
|
|||
virtual int get_max_packet_size() const;
|
||||
|
||||
void set_stream_peer(const Ref<StreamPeer> &p_peer);
|
||||
Ref<StreamPeer> 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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -605,11 +605,11 @@ void Object::get_property_list(List<PropertyInfo> *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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
|
@ -213,7 +213,7 @@ void EditorSettings::_get_property_list(List<PropertyInfo> *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) {
|
||||
|
|
|
@ -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<Animation> 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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -705,7 +705,7 @@ bool GDScript::_set(const StringName &p_name, const Variant &p_value) {
|
|||
|
||||
void GDScript::_get_property_list(List<PropertyInfo> *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() {
|
||||
|
|
|
@ -43,27 +43,6 @@ 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") {
|
||||
PoolVector<int> cells = p_value;
|
||||
int amount=cells.size();
|
||||
|
@ -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<PropertyInfo> *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");
|
||||
|
|
|
@ -1676,7 +1676,7 @@ bool CSharpScript::_set(const StringName &p_name, const Variant &p_value) {
|
|||
|
||||
void CSharpScript::_get_property_list(List<PropertyInfo> *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() {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -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")));
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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"));
|
||||
|
|
|
@ -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() :
|
||||
|
|
|
@ -244,66 +244,16 @@ bool PathFollow2D::get_cubic_interpolation() const {
|
|||
return cubic;
|
||||
}
|
||||
|
||||
bool PathFollow2D::_set(const StringName &p_name, const Variant &p_value) {
|
||||
void PathFollow2D::_validate_property(PropertyInfo &property) const {
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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<PropertyInfo> *p_list) const {
|
||||
if (property.name == "offset") {
|
||||
|
||||
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"));
|
||||
|
||||
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) {
|
||||
|
|
|
@ -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<PropertyInfo> *p_list) const;
|
||||
virtual void _validate_property(PropertyInfo &property) const;
|
||||
|
||||
void _notification(int p_what);
|
||||
static void _bind_methods();
|
||||
|
|
|
@ -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")));
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -999,8 +999,8 @@ void TileMap::_set_tile_data(const PoolVector<int> &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<PropertyInfo> *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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -30,28 +30,9 @@
|
|||
|
||||
#include "bone_attachment.h"
|
||||
|
||||
bool BoneAttachment::_get(const StringName &p_name, Variant &r_ret) const {
|
||||
|
||||
if (String(p_name) == "bone_name") {
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
void BoneAttachment::_get_property_list(List<PropertyInfo> *p_list) const {
|
||||
void BoneAttachment::_validate_property(PropertyInfo &property) const {
|
||||
|
||||
if (property.name == "bone_name") {
|
||||
Skeleton *parent = Object::cast_to<Skeleton>(get_parent());
|
||||
|
||||
if (parent) {
|
||||
|
@ -63,10 +44,13 @@ void BoneAttachment::_get_property_list(List<PropertyInfo> *p_list) const {
|
|||
names += parent->get_bone_name(i);
|
||||
}
|
||||
|
||||
p_list->push_back(PropertyInfo(Variant::STRING, "bone_name", PROPERTY_HINT_ENUM, names));
|
||||
property.hint = PROPERTY_HINT_ENUM;
|
||||
property.hint_string = names;
|
||||
} else {
|
||||
|
||||
p_list->push_back(PropertyInfo(Variant::STRING, "bone_name"));
|
||||
property.hint = PROPERTY_HINT_NONE;
|
||||
property.hint_string = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -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<PropertyInfo> *p_list) const;
|
||||
virtual void _validate_property(PropertyInfo &property) const;
|
||||
void _notification(int p_what);
|
||||
|
||||
static void _bind_methods();
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
|
@ -190,61 +190,16 @@ bool PathFollow::get_cubic_interpolation() const {
|
|||
return cubic;
|
||||
}
|
||||
|
||||
bool PathFollow::_set(const StringName &p_name, const Variant &p_value) {
|
||||
void PathFollow::_validate_property(PropertyInfo &property) const {
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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<PropertyInfo> *p_list) const {
|
||||
if (property.name == "offset") {
|
||||
|
||||
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"));
|
||||
|
||||
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);
|
||||
|
|
|
@ -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<PropertyInfo> *p_list) const;
|
||||
virtual void _validate_property(PropertyInfo &property) const;
|
||||
|
||||
void _notification(int p_what);
|
||||
static void _bind_methods();
|
||||
|
|
|
@ -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) {
|
||||
|
||||
dispatch_mode = (DispatchMode)p_mode;
|
||||
group_name = p_group_name;
|
||||
};
|
||||
|
||||
String ProximityGroup::get_group_name() const {
|
||||
|
||||
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() {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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"));
|
||||
}
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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,27 +132,14 @@ bool AnimationPlayer::_get(const StringName &p_name, Variant &r_ret) const {
|
|||
return true;
|
||||
}
|
||||
|
||||
void AnimationPlayer::_get_property_list(List<PropertyInfo> *p_list) const {
|
||||
void AnimationPlayer::_validate_property(PropertyInfo &property) const {
|
||||
|
||||
if (property.name == "current_animation") {
|
||||
List<String> names;
|
||||
|
||||
List<PropertyInfo> anim_names;
|
||||
|
||||
for (Map<StringName, AnimationData>::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));
|
||||
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.sort();
|
||||
|
||||
for (List<PropertyInfo>::Element *E = anim_names.front(); E; E = E->next()) {
|
||||
p_list->push_back(E->get());
|
||||
}
|
||||
|
||||
{
|
||||
names.sort();
|
||||
names.push_front("[stop]");
|
||||
String hint;
|
||||
|
@ -181,12 +150,28 @@ void AnimationPlayer::_get_property_list(List<PropertyInfo> *p_list) const {
|
|||
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"));
|
||||
property.hint_string = hint;
|
||||
}
|
||||
}
|
||||
|
||||
void AnimationPlayer::_get_property_list(List<PropertyInfo> *p_list) const {
|
||||
|
||||
List<PropertyInfo> anim_names;
|
||||
|
||||
for (Map<StringName, AnimationData>::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_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 | PROPERTY_USAGE_INTERNAL));
|
||||
}
|
||||
|
||||
p_list->push_back(PropertyInfo(Variant::ARRAY, "blend_times", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR));
|
||||
anim_names.sort();
|
||||
|
||||
for (List<PropertyInfo>::Element *E = anim_names.front(); E; E = E->next()) {
|
||||
p_list->push_back(E->get());
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
|
@ -994,19 +979,25 @@ bool AnimationPlayer::is_playing() const {
|
|||
}
|
||||
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 {
|
||||
// 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")));
|
||||
|
|
|
@ -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<PropertyInfo> *p_list) const;
|
||||
void _notification(int p_what);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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")));
|
||||
}
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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")));
|
||||
|
|
|
@ -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")));
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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"));
|
||||
}
|
||||
|
|
|
@ -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")));
|
||||
}
|
||||
|
||||
|
|
|
@ -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")));
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -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)));
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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")));
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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")));
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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<NetworkedMultiplayerPeer> &p_network_
|
|||
}
|
||||
}
|
||||
|
||||
Ref<NetworkedMultiplayerPeer> 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")));
|
||||
|
|
|
@ -451,6 +451,7 @@ public:
|
|||
//network API
|
||||
|
||||
void set_network_peer(const Ref<NetworkedMultiplayerPeer> &p_network_peer);
|
||||
Ref<NetworkedMultiplayerPeer> get_network_peer() const;
|
||||
bool is_network_server() const;
|
||||
bool has_network_peer() const;
|
||||
int get_network_unique_id() const;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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"));
|
||||
|
||||
|
|
|
@ -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<PropertyInfo> *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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -64,29 +64,6 @@ Vector<Vector3> 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<PropertyInfo> *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() :
|
||||
|
|
|
@ -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<PropertyInfo> *p_list) const;
|
||||
static void _bind_methods();
|
||||
|
||||
virtual void _update_shape();
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -103,11 +103,6 @@ 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()) {
|
||||
|
||||
StringName pr = shader->remap_param(p_name);
|
||||
|
@ -122,20 +117,12 @@ bool ShaderMaterial::_set(const StringName &p_name, const Variant &p_value) {
|
|||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ShaderMaterial::_get(const StringName &p_name, Variant &r_ret) const {
|
||||
|
||||
if (p_name == SceneStringNames::get_singleton()->shader) {
|
||||
|
||||
r_ret = get_shader();
|
||||
return true;
|
||||
|
||||
} else {
|
||||
|
||||
if (shader.is_valid()) {
|
||||
|
||||
StringName pr = shader->remap_param(p_name);
|
||||
|
@ -144,15 +131,12 @@ bool ShaderMaterial::_get(const StringName &p_name, Variant &r_ret) const {
|
|||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void ShaderMaterial::_get_property_list(List<PropertyInfo> *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<String> *r_options) const {
|
||||
|
|
|
@ -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<PropertyInfo> *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<PropertyInfo> *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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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<Connection> *p_connections) const;
|
||||
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -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<PropertyInfo> *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<Texture> &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<PropertyInfo> *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");
|
||||
|
||||
|
|
|
@ -260,14 +260,14 @@ void TileSet::_get_property_list(List<PropertyInfo> *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"));
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -1267,16 +1267,16 @@ bool AudioBusLayout::_get(const StringName &p_name, Variant &r_ret) const {
|
|||
void AudioBusLayout::_get_property_list(List<PropertyInfo> *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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue