Merge pull request #88455 from akien-mga/revert-68420-get_configuration_warnings-compat-breakage
Revert #68420 to undo `get_configuration_warnings` compat breakage
This commit is contained in:
commit
9ae8a0e9cd
|
@ -72,9 +72,6 @@
|
|||
<member name="checked" type="bool" setter="set_checked" getter="is_checked" default="false">
|
||||
Used by the inspector, set to [code]true[/code] when the property is checked.
|
||||
</member>
|
||||
<member name="configuration_warning" type="String" setter="set_configuration_warning" getter="get_configuration_warning" default="""">
|
||||
Used by the inspector, set to show a configuration warning on the property.
|
||||
</member>
|
||||
<member name="deletable" type="bool" setter="set_deletable" getter="is_deletable" default="false">
|
||||
Used by the inspector, set to [code]true[/code] when the property can be deleted by the user.
|
||||
</member>
|
||||
|
|
|
@ -37,13 +37,9 @@
|
|||
</description>
|
||||
</method>
|
||||
<method name="_get_configuration_warnings" qualifiers="virtual const">
|
||||
<return type="Array" />
|
||||
<return type="PackedStringArray" />
|
||||
<description>
|
||||
The elements in the array returned from this method are displayed as warnings in the Scene dock if the script that overrides it is a [code]tool[/code] script.
|
||||
Each array element must either be a [String] or a [Dictionary].
|
||||
A dictionary element must contain a key [code]message[/code] of type [String] which is shown in the user interface.
|
||||
The dictionary may optionally contain a key [code]property[/code] of type [NodePath], which also shows this warning in the inspector on the corresponding property.
|
||||
If a string is found in the returned array, it is converted to an equivalent dictionary with the [code]message[/code] field set.
|
||||
Returning an empty array produces no warnings.
|
||||
Call [method update_configuration_warnings] when the warnings need to be updated for this node.
|
||||
[codeblock]
|
||||
|
|
|
@ -214,22 +214,6 @@ void EditorProperty::_notification(int p_what) {
|
|||
text_size -= close->get_width() + 4 * EDSCALE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!configuration_warning.is_empty() && !read_only) {
|
||||
Ref<Texture2D> warning;
|
||||
|
||||
warning = get_theme_icon(SNAME("NodeWarning"), SNAME("EditorIcons"));
|
||||
|
||||
rect.size.x -= warning->get_width() + get_theme_constant(SNAME("hseparator"), SNAME("Tree"));
|
||||
|
||||
if (is_layout_rtl()) {
|
||||
rect.position.x += warning->get_width() + get_theme_constant(SNAME("hseparator"), SNAME("Tree"));
|
||||
}
|
||||
|
||||
if (no_children) {
|
||||
text_size -= warning->get_width() + 4 * EDSCALE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//set children
|
||||
|
@ -415,38 +399,6 @@ void EditorProperty::_notification(int p_what) {
|
|||
} else {
|
||||
delete_rect = Rect2();
|
||||
}
|
||||
|
||||
if (!configuration_warning.is_empty() && !read_only) {
|
||||
Ref<Texture2D> warning;
|
||||
|
||||
StringName warning_icon;
|
||||
Node *node = Object::cast_to<Node>(object);
|
||||
if (node) {
|
||||
const int warning_num = node->get_configuration_warnings_of_property(property_path).size();
|
||||
warning_icon = Node::get_configuration_warning_icon(warning_num);
|
||||
} else {
|
||||
// This shouldn't happen, but let's not crash over an icon.
|
||||
warning_icon = "NodeWarning";
|
||||
}
|
||||
warning = get_theme_icon(warning_icon, SNAME("EditorIcons"));
|
||||
|
||||
ofs -= warning->get_width() + get_theme_constant(SNAME("hseparator"), SNAME("Tree"));
|
||||
|
||||
Color color2(1, 1, 1);
|
||||
if (configuration_warning_hover) {
|
||||
color2.r *= 1.2;
|
||||
color2.g *= 1.2;
|
||||
color2.b *= 1.2;
|
||||
}
|
||||
configuration_warning_rect = Rect2(ofs, ((size.height - warning->get_height()) / 2), warning->get_width(), warning->get_height());
|
||||
if (rtl) {
|
||||
draw_texture(warning, Vector2(size.width - configuration_warning_rect.position.x - warning->get_width(), configuration_warning_rect.position.y), color2);
|
||||
} else {
|
||||
draw_texture(warning, configuration_warning_rect.position, color2);
|
||||
}
|
||||
} else {
|
||||
configuration_warning_rect = Rect2();
|
||||
}
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
@ -722,12 +674,6 @@ void EditorProperty::gui_input(const Ref<InputEvent> &p_event) {
|
|||
check_hover = new_check_hover;
|
||||
queue_redraw();
|
||||
}
|
||||
|
||||
bool new_configuration_warning_hover = configuration_warning_rect.has_point(mpos) && !button_left;
|
||||
if (new_configuration_warning_hover != configuration_warning_hover) {
|
||||
configuration_warning_hover = new_configuration_warning_hover;
|
||||
queue_redraw();
|
||||
}
|
||||
}
|
||||
|
||||
Ref<InputEventMouseButton> mb = p_event;
|
||||
|
@ -784,16 +730,6 @@ void EditorProperty::gui_input(const Ref<InputEvent> &p_event) {
|
|||
queue_redraw();
|
||||
emit_signal(SNAME("property_checked"), property, checked);
|
||||
}
|
||||
|
||||
if (configuration_warning_rect.has_point(mpos)) {
|
||||
if (warning_dialog == nullptr) {
|
||||
warning_dialog = memnew(AcceptDialog);
|
||||
add_child(warning_dialog);
|
||||
warning_dialog->set_title(TTR("Node Configuration Warning!"));
|
||||
}
|
||||
warning_dialog->set_text(configuration_warning);
|
||||
warning_dialog->popup_centered();
|
||||
}
|
||||
} else if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MouseButton::RIGHT) {
|
||||
accept_event();
|
||||
_update_popup();
|
||||
|
@ -919,16 +855,6 @@ float EditorProperty::get_name_split_ratio() const {
|
|||
return split_ratio;
|
||||
}
|
||||
|
||||
void EditorProperty::set_configuration_warning(const String &p_configuration_warning) {
|
||||
configuration_warning = p_configuration_warning;
|
||||
queue_redraw();
|
||||
queue_sort();
|
||||
}
|
||||
|
||||
String EditorProperty::get_configuration_warning() const {
|
||||
return configuration_warning;
|
||||
}
|
||||
|
||||
void EditorProperty::set_object_and_property(Object *p_object, const StringName &p_property) {
|
||||
object = p_object;
|
||||
property = p_property;
|
||||
|
@ -985,15 +911,6 @@ void EditorProperty::_update_pin_flags() {
|
|||
}
|
||||
}
|
||||
|
||||
void EditorProperty::_update_configuration_warnings() {
|
||||
Node *node = Object::cast_to<Node>(object);
|
||||
if (node) {
|
||||
const PackedStringArray warnings = node->get_configuration_warnings_as_strings(true, property_path);
|
||||
const String warning_lines = String("\n").join(warnings);
|
||||
set_configuration_warning(warning_lines);
|
||||
}
|
||||
}
|
||||
|
||||
Control *EditorProperty::make_custom_tooltip(const String &p_text) const {
|
||||
EditorHelpBit *tooltip = nullptr;
|
||||
|
||||
|
@ -1069,9 +986,6 @@ void EditorProperty::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("set_deletable", "deletable"), &EditorProperty::set_deletable);
|
||||
ClassDB::bind_method(D_METHOD("is_deletable"), &EditorProperty::is_deletable);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("set_configuration_warning", "configuration_warning"), &EditorProperty::set_configuration_warning);
|
||||
ClassDB::bind_method(D_METHOD("get_configuration_warning"), &EditorProperty::get_configuration_warning);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_edited_property"), &EditorProperty::get_edited_property);
|
||||
ClassDB::bind_method(D_METHOD("get_edited_object"), &EditorProperty::get_edited_object);
|
||||
|
||||
|
@ -1089,7 +1003,6 @@ void EditorProperty::_bind_methods() {
|
|||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "draw_warning"), "set_draw_warning", "is_draw_warning");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "keying"), "set_keying", "is_keying");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "deletable"), "set_deletable", "is_deletable");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::STRING, "configuration_warning"), "set_configuration_warning", "get_configuration_warning");
|
||||
|
||||
ADD_SIGNAL(MethodInfo("property_changed", PropertyInfo(Variant::STRING_NAME, "property"), PropertyInfo(Variant::NIL, "value", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NIL_IS_VARIANT), PropertyInfo(Variant::STRING_NAME, "field"), PropertyInfo(Variant::BOOL, "changing")));
|
||||
ADD_SIGNAL(MethodInfo("multiple_properties_changed", PropertyInfo(Variant::PACKED_STRING_ARRAY, "properties"), PropertyInfo(Variant::ARRAY, "value")));
|
||||
|
@ -3409,7 +3322,6 @@ void EditorInspector::update_tree() {
|
|||
ep->set_keying(keying);
|
||||
ep->set_read_only(property_read_only || all_read_only);
|
||||
ep->set_deletable(deletable_properties || p.name.begins_with("metadata/"));
|
||||
ep->_update_configuration_warnings();
|
||||
}
|
||||
|
||||
current_vbox->add_child(editors[i].property_editor);
|
||||
|
@ -3535,9 +3447,6 @@ void EditorInspector::edit(Object *p_object) {
|
|||
|
||||
object = p_object;
|
||||
|
||||
property_configuration_warnings.clear();
|
||||
_update_configuration_warnings();
|
||||
|
||||
if (object) {
|
||||
update_scroll_request = 0; //reset
|
||||
if (scroll_cache.has(object->get_instance_id())) { //if exists, set something else
|
||||
|
@ -4059,52 +3968,6 @@ void EditorInspector::_node_removed(Node *p_node) {
|
|||
}
|
||||
}
|
||||
|
||||
void EditorInspector::_warning_changed(Node *p_node) {
|
||||
if (p_node == object) {
|
||||
// Only update the tree if the list of configuration warnings has changed.
|
||||
if (_update_configuration_warnings()) {
|
||||
update_tree_pending = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool EditorInspector::_update_configuration_warnings() {
|
||||
Node *node = Object::cast_to<Node>(object);
|
||||
if (!node) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool changed = false;
|
||||
LocalVector<int> found_warning_indices;
|
||||
|
||||
// New and changed warnings.
|
||||
Vector<Dictionary> warnings = node->get_configuration_warnings_as_dicts();
|
||||
for (const Dictionary &warning : warnings) {
|
||||
if (!warning.has("property")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
int found_warning_index = property_configuration_warnings.find(warning);
|
||||
if (found_warning_index < 0) {
|
||||
found_warning_index = property_configuration_warnings.size();
|
||||
property_configuration_warnings.push_back(warning);
|
||||
changed = true;
|
||||
}
|
||||
found_warning_indices.push_back(found_warning_index);
|
||||
}
|
||||
|
||||
// Removed warnings.
|
||||
for (uint32_t i = 0; i < property_configuration_warnings.size(); i++) {
|
||||
if (found_warning_indices.find(i) < 0) {
|
||||
property_configuration_warnings.remove_at(i);
|
||||
i--;
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
return changed;
|
||||
}
|
||||
|
||||
void EditorInspector::_notification(int p_what) {
|
||||
switch (p_what) {
|
||||
case NOTIFICATION_READY: {
|
||||
|
@ -4116,7 +3979,6 @@ void EditorInspector::_notification(int p_what) {
|
|||
case NOTIFICATION_ENTER_TREE: {
|
||||
if (!sub_inspector) {
|
||||
get_tree()->connect("node_removed", callable_mp(this, &EditorInspector::_node_removed));
|
||||
get_tree()->connect("node_configuration_warning_changed", callable_mp(this, &EditorInspector::_warning_changed));
|
||||
}
|
||||
} break;
|
||||
|
||||
|
@ -4127,7 +3989,6 @@ void EditorInspector::_notification(int p_what) {
|
|||
case NOTIFICATION_EXIT_TREE: {
|
||||
if (!sub_inspector) {
|
||||
get_tree()->disconnect("node_removed", callable_mp(this, &EditorInspector::_node_removed));
|
||||
get_tree()->disconnect("node_configuration_warning_changed", callable_mp(this, &EditorInspector::_warning_changed));
|
||||
}
|
||||
edit(nullptr);
|
||||
} break;
|
||||
|
|
|
@ -76,7 +76,6 @@ private:
|
|||
String doc_path;
|
||||
bool internal = false;
|
||||
bool has_doc_tooltip = false;
|
||||
AcceptDialog *warning_dialog = nullptr;
|
||||
|
||||
int property_usage;
|
||||
|
||||
|
@ -99,8 +98,6 @@ private:
|
|||
bool check_hover = false;
|
||||
Rect2 delete_rect;
|
||||
bool delete_hover = false;
|
||||
Rect2 configuration_warning_rect;
|
||||
bool configuration_warning_hover = false;
|
||||
|
||||
bool can_revert = false;
|
||||
bool can_pin = false;
|
||||
|
@ -124,15 +121,12 @@ private:
|
|||
Control *bottom_editor = nullptr;
|
||||
PopupMenu *menu = nullptr;
|
||||
|
||||
String configuration_warning;
|
||||
|
||||
HashMap<StringName, Variant> cache;
|
||||
|
||||
GDVIRTUAL0(_update_property)
|
||||
GDVIRTUAL1(_set_read_only, bool)
|
||||
|
||||
void _update_pin_flags();
|
||||
void _update_configuration_warnings();
|
||||
|
||||
protected:
|
||||
void _notification(int p_what);
|
||||
|
@ -209,9 +203,6 @@ public:
|
|||
void set_name_split_ratio(float p_ratio);
|
||||
float get_name_split_ratio() const;
|
||||
|
||||
void set_configuration_warning(const String &p_configuration_warning);
|
||||
String get_configuration_warning() const;
|
||||
|
||||
void set_object_and_property(Object *p_object, const StringName &p_property);
|
||||
virtual Control *make_custom_tooltip(const String &p_text) const override;
|
||||
|
||||
|
@ -514,7 +505,6 @@ class EditorInspector : public ScrollContainer {
|
|||
int property_focusable;
|
||||
int update_scroll_request;
|
||||
|
||||
LocalVector<Dictionary> property_configuration_warnings;
|
||||
HashMap<StringName, HashMap<StringName, String>> doc_path_cache;
|
||||
HashSet<StringName> restart_request_props;
|
||||
HashMap<String, String> custom_property_descriptions;
|
||||
|
@ -543,8 +533,6 @@ class EditorInspector : public ScrollContainer {
|
|||
void _object_id_selected(const String &p_path, ObjectID p_id);
|
||||
|
||||
void _node_removed(Node *p_node);
|
||||
void _warning_changed(Node *p_node);
|
||||
bool _update_configuration_warnings();
|
||||
|
||||
HashMap<StringName, int> per_array_page;
|
||||
void _page_change_request(int p_new_page, const StringName &p_array_prefix);
|
||||
|
|
|
@ -132,13 +132,32 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_i
|
|||
}
|
||||
undo_redo->commit_action();
|
||||
} else if (p_id == BUTTON_WARNING) {
|
||||
const PackedStringArray warnings = n->get_configuration_warnings_as_strings(true);
|
||||
const PackedStringArray warnings = n->get_configuration_warnings();
|
||||
|
||||
if (warnings.is_empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
const String warning_lines = String("\n").join(warnings);
|
||||
warning->set_text(warning_lines);
|
||||
// Improve looks on tooltip, extra spacing on non-bullet point newlines.
|
||||
const String bullet_point = U"• ";
|
||||
String all_warnings;
|
||||
for (const String &w : warnings) {
|
||||
all_warnings += "\n" + bullet_point + w;
|
||||
}
|
||||
|
||||
// Limit the line width while keeping some padding.
|
||||
// It is not efficient, but it does not have to be.
|
||||
const PackedInt32Array boundaries = TS->string_get_word_breaks(all_warnings, "", 80);
|
||||
PackedStringArray lines;
|
||||
for (int i = 0; i < boundaries.size(); i += 2) {
|
||||
const int start = boundaries[i];
|
||||
const int end = boundaries[i + 1];
|
||||
const String line = all_warnings.substr(start, end - start);
|
||||
lines.append(line);
|
||||
}
|
||||
all_warnings = String("\n").join(lines).indent(" ").replace(U" •", U"\n•").substr(2); // We don't want the first two newlines.
|
||||
|
||||
warning->set_text(all_warnings);
|
||||
warning->popup_centered();
|
||||
|
||||
} else if (p_id == BUTTON_SIGNALS) {
|
||||
|
@ -275,12 +294,29 @@ void SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
|
|||
|
||||
if (can_rename) { //should be can edit..
|
||||
|
||||
const PackedStringArray warnings = p_node->get_configuration_warnings_as_strings(false);
|
||||
const PackedStringArray warnings = p_node->get_configuration_warnings();
|
||||
const int num_warnings = warnings.size();
|
||||
if (num_warnings > 0) {
|
||||
const StringName warning_icon = Node::get_configuration_warning_icon(num_warnings);
|
||||
const String warning_lines = String("\n\n").join(warnings);
|
||||
item->add_button(0, get_editor_theme_icon(warning_icon), BUTTON_WARNING, false, TTR("Node configuration warning:") + "\n\n" + warning_lines);
|
||||
String warning_icon;
|
||||
if (num_warnings == 1) {
|
||||
warning_icon = SNAME("NodeWarning");
|
||||
} else if (num_warnings <= 3) {
|
||||
warning_icon = vformat("NodeWarnings%d", num_warnings);
|
||||
} else {
|
||||
warning_icon = SNAME("NodeWarnings4Plus");
|
||||
}
|
||||
|
||||
// Improve looks on tooltip, extra spacing on non-bullet point newlines.
|
||||
const String bullet_point = U"• ";
|
||||
String all_warnings;
|
||||
for (const String &w : warnings) {
|
||||
all_warnings += "\n\n" + bullet_point + w.replace("\n", "\n ");
|
||||
}
|
||||
if (num_warnings == 1) {
|
||||
all_warnings.remove_at(0); // With only one warning, two newlines do not look great.
|
||||
}
|
||||
|
||||
item->add_button(0, get_editor_theme_icon(warning_icon), BUTTON_WARNING, false, TTR("Node configuration warning:") + all_warnings);
|
||||
}
|
||||
|
||||
if (p_node->is_unique_name_in_owner()) {
|
||||
|
|
|
@ -84,13 +84,6 @@ Validate extension JSON: Error: Field 'classes/Sky/properties/sky_material': typ
|
|||
Property hints reordered to improve editor usability. The types allowed are still the same as before. No adjustments should be necessary.
|
||||
|
||||
|
||||
GH-68420
|
||||
--------
|
||||
Validate extension JSON: Error: Field 'classes/Node/methods/_get_configuration_warnings/return_value': type changed value in new API, from "PackedStringArray" to "Array".
|
||||
|
||||
Allow configuration warnings to refer to a property. Compatibility method registered.
|
||||
|
||||
|
||||
GH-86907
|
||||
--------
|
||||
|
||||
|
|
|
@ -87,8 +87,8 @@ void MultiplayerSpawner::_get_property_list(List<PropertyInfo> *p_list) const {
|
|||
}
|
||||
#endif
|
||||
|
||||
Array MultiplayerSpawner::get_configuration_warnings() const {
|
||||
Array warnings = Node::get_configuration_warnings();
|
||||
PackedStringArray MultiplayerSpawner::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
|
||||
if (spawn_path.is_empty() || !has_node(spawn_path)) {
|
||||
warnings.push_back(RTR("A valid NodePath must be set in the \"Spawn Path\" property in order for MultiplayerSpawner to be able to spawn Nodes."));
|
||||
|
|
|
@ -91,7 +91,7 @@ protected:
|
|||
void _get_property_list(List<PropertyInfo> *p_list) const;
|
||||
#endif
|
||||
public:
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
Node *get_spawn_node() const {
|
||||
return spawn_node.is_valid() ? Object::cast_to<Node>(ObjectDB::get_instance(spawn_node)) : nullptr;
|
||||
|
|
|
@ -143,8 +143,8 @@ bool MultiplayerSynchronizer::update_inbound_sync_time(uint16_t p_network_time)
|
|||
return true;
|
||||
}
|
||||
|
||||
Array MultiplayerSynchronizer::get_configuration_warnings() const {
|
||||
Array warnings = Node::get_configuration_warnings();
|
||||
PackedStringArray MultiplayerSynchronizer::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
|
||||
if (root_path.is_empty() || !has_node(root_path)) {
|
||||
warnings.push_back(RTR("A valid NodePath must be set in the \"Root Path\" property in order for MultiplayerSynchronizer to be able to synchronize properties."));
|
||||
|
|
|
@ -91,7 +91,7 @@ public:
|
|||
bool update_outbound_sync_time(uint64_t p_usec);
|
||||
bool update_inbound_sync_time(uint16_t p_network_time);
|
||||
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
void set_replication_interval(double p_interval);
|
||||
double get_replication_interval() const;
|
||||
|
|
|
@ -569,8 +569,8 @@ StringName AnimatedSprite2D::get_animation() const {
|
|||
return animation;
|
||||
}
|
||||
|
||||
Array AnimatedSprite2D::get_configuration_warnings() const {
|
||||
Array warnings = Node2D::get_configuration_warnings();
|
||||
PackedStringArray AnimatedSprite2D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node2D::get_configuration_warnings();
|
||||
if (frames.is_null()) {
|
||||
warnings.push_back(RTR("A SpriteFrames resource must be created or set in the \"Frames\" property in order for AnimatedSprite2D to display frames."));
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@ public:
|
|||
void set_flip_v(bool p_flip);
|
||||
bool is_flipped_v() const;
|
||||
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
virtual void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const override;
|
||||
|
||||
AnimatedSprite2D();
|
||||
|
|
|
@ -113,8 +113,8 @@ Color CanvasModulate::get_color() const {
|
|||
return color;
|
||||
}
|
||||
|
||||
Array CanvasModulate::get_configuration_warnings() const {
|
||||
Array warnings = Node::get_configuration_warnings();
|
||||
PackedStringArray CanvasModulate::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
|
||||
if (is_in_canvas && is_visible_in_tree()) {
|
||||
List<Node *> nodes;
|
||||
|
|
|
@ -54,7 +54,7 @@ public:
|
|||
void set_color(const Color &p_color);
|
||||
Color get_color() const;
|
||||
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
CanvasModulate();
|
||||
~CanvasModulate();
|
||||
|
|
|
@ -582,8 +582,8 @@ void CollisionObject2D::_update_pickable() {
|
|||
}
|
||||
}
|
||||
|
||||
Array CollisionObject2D::get_configuration_warnings() const {
|
||||
Array warnings = Node::get_configuration_warnings();
|
||||
PackedStringArray CollisionObject2D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
|
||||
if (shapes.is_empty()) {
|
||||
warnings.push_back(RTR("This node has no shape, so it can't collide or interact with other objects.\nConsider adding a CollisionShape2D or CollisionPolygon2D as a child to define its shape."));
|
||||
|
|
|
@ -166,7 +166,7 @@ public:
|
|||
void set_pickable(bool p_enabled);
|
||||
bool is_pickable() const;
|
||||
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
_FORCE_INLINE_ RID get_rid() const { return rid; }
|
||||
|
||||
|
|
|
@ -232,8 +232,8 @@ bool CollisionPolygon2D::_edit_is_selected_on_click(const Point2 &p_point, doubl
|
|||
}
|
||||
#endif
|
||||
|
||||
Array CollisionPolygon2D::get_configuration_warnings() const {
|
||||
Array warnings = Node::get_configuration_warnings();
|
||||
PackedStringArray CollisionPolygon2D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
|
||||
if (!Object::cast_to<CollisionObject2D>(get_parent())) {
|
||||
warnings.push_back(RTR("CollisionPolygon2D only serves to provide a collision shape to a CollisionObject2D derived node. Please only use it as a child of Area2D, StaticBody2D, RigidBody2D, CharacterBody2D, etc. to give them a shape."));
|
||||
|
|
|
@ -77,7 +77,7 @@ public:
|
|||
void set_polygon(const Vector<Point2> &p_polygon);
|
||||
Vector<Point2> get_polygon() const;
|
||||
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
void set_disabled(bool p_disabled);
|
||||
bool is_disabled() const;
|
||||
|
|
|
@ -173,8 +173,8 @@ bool CollisionShape2D::_edit_is_selected_on_click(const Point2 &p_point, double
|
|||
return shape->_edit_is_selected_on_click(p_point, p_tolerance);
|
||||
}
|
||||
|
||||
Array CollisionShape2D::get_configuration_warnings() const {
|
||||
Array warnings = Node::get_configuration_warnings();
|
||||
PackedStringArray CollisionShape2D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
|
||||
CollisionObject2D *col_object = Object::cast_to<CollisionObject2D>(get_parent());
|
||||
if (col_object == nullptr) {
|
||||
|
|
|
@ -80,7 +80,7 @@ public:
|
|||
void set_debug_color(const Color &p_color);
|
||||
Color get_debug_color() const;
|
||||
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
CollisionShape2D();
|
||||
};
|
||||
|
|
|
@ -246,8 +246,8 @@ bool CPUParticles2D::get_fractional_delta() const {
|
|||
return fractional_delta;
|
||||
}
|
||||
|
||||
Array CPUParticles2D::get_configuration_warnings() const {
|
||||
Array warnings = Node2D::get_configuration_warnings();
|
||||
PackedStringArray CPUParticles2D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node2D::get_configuration_warnings();
|
||||
|
||||
CanvasItemMaterial *mat = Object::cast_to<CanvasItemMaterial>(get_material().ptr());
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ public:
|
|||
void set_gravity(const Vector2 &p_gravity);
|
||||
Vector2 get_gravity() const;
|
||||
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
void restart();
|
||||
|
||||
|
|
|
@ -327,8 +327,8 @@ float GPUParticles2D::get_interp_to_end() const {
|
|||
return interp_to_end_factor;
|
||||
}
|
||||
|
||||
Array GPUParticles2D::get_configuration_warnings() const {
|
||||
Array warnings = Node2D::get_configuration_warnings();
|
||||
PackedStringArray GPUParticles2D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node2D::get_configuration_warnings();
|
||||
|
||||
if (process_material.is_null()) {
|
||||
warnings.push_back(RTR("A material to process the particles is not assigned, so no behavior is imprinted."));
|
||||
|
|
|
@ -161,7 +161,7 @@ public:
|
|||
void set_amount_ratio(float p_ratio);
|
||||
float get_amount_ratio() const;
|
||||
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
void set_sub_emitter(const NodePath &p_path);
|
||||
NodePath get_sub_emitter() const;
|
||||
|
|
|
@ -212,8 +212,8 @@ bool Joint2D::get_exclude_nodes_from_collision() const {
|
|||
return exclude_from_collision;
|
||||
}
|
||||
|
||||
Array Joint2D::get_configuration_warnings() const {
|
||||
Array warnings = Node2D::get_configuration_warnings();
|
||||
PackedStringArray Joint2D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node2D::get_configuration_warnings();
|
||||
|
||||
if (!warning.is_empty()) {
|
||||
warnings.push_back(warning);
|
||||
|
|
|
@ -62,7 +62,7 @@ protected:
|
|||
_FORCE_INLINE_ bool is_configured() const { return configured; }
|
||||
|
||||
public:
|
||||
virtual Array get_configuration_warnings() const override;
|
||||
virtual PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
void set_node_a(const NodePath &p_node_a);
|
||||
NodePath get_node_a() const;
|
||||
|
|
|
@ -401,14 +401,11 @@ Vector2 PointLight2D::get_texture_offset() const {
|
|||
return texture_offset;
|
||||
}
|
||||
|
||||
Array PointLight2D::get_configuration_warnings() const {
|
||||
Array warnings = Node::get_configuration_warnings();
|
||||
PackedStringArray PointLight2D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
|
||||
if (!texture.is_valid()) {
|
||||
Dictionary texture_warning;
|
||||
texture_warning["message"] = RTR("A texture with the shape of the light must be supplied.");
|
||||
texture_warning["property"] = "texture";
|
||||
warnings.push_back(texture_warning);
|
||||
warnings.push_back(RTR("A texture with the shape of the light must be supplied to the \"Texture\" property."));
|
||||
}
|
||||
|
||||
return warnings;
|
||||
|
|
|
@ -174,7 +174,7 @@ public:
|
|||
void set_texture_scale(real_t p_scale);
|
||||
real_t get_texture_scale() const;
|
||||
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
PointLight2D();
|
||||
};
|
||||
|
|
|
@ -247,8 +247,8 @@ int LightOccluder2D::get_occluder_light_mask() const {
|
|||
return mask;
|
||||
}
|
||||
|
||||
Array LightOccluder2D::get_configuration_warnings() const {
|
||||
Array warnings = Node::get_configuration_warnings();
|
||||
PackedStringArray LightOccluder2D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
|
||||
if (!occluder_polygon.is_valid()) {
|
||||
warnings.push_back(RTR("An occluder polygon must be set (or drawn) for this occluder to take effect."));
|
||||
|
|
|
@ -105,7 +105,7 @@ public:
|
|||
void set_as_sdf_collision(bool p_enable);
|
||||
bool is_set_as_sdf_collision() const;
|
||||
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
LightOccluder2D();
|
||||
~LightOccluder2D();
|
||||
|
|
|
@ -624,8 +624,8 @@ void NavigationAgent2D::_avoidance_done(Vector3 p_new_velocity) {
|
|||
emit_signal(SNAME("velocity_computed"), safe_velocity);
|
||||
}
|
||||
|
||||
Array NavigationAgent2D::get_configuration_warnings() const {
|
||||
Array warnings = Node::get_configuration_warnings();
|
||||
PackedStringArray NavigationAgent2D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
|
||||
if (!Object::cast_to<Node2D>(get_parent())) {
|
||||
warnings.push_back(RTR("The NavigationAgent2D can be used only under a Node2D inheriting parent node."));
|
||||
|
|
|
@ -200,7 +200,7 @@ public:
|
|||
|
||||
void _avoidance_done(Vector3 p_new_velocity);
|
||||
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
void set_avoidance_layers(uint32_t p_layers);
|
||||
uint32_t get_avoidance_layers() const;
|
||||
|
|
|
@ -337,8 +337,8 @@ void NavigationLink2D::set_travel_cost(real_t p_travel_cost) {
|
|||
NavigationServer2D::get_singleton()->link_set_travel_cost(link, travel_cost);
|
||||
}
|
||||
|
||||
Array NavigationLink2D::get_configuration_warnings() const {
|
||||
Array warnings = Node::get_configuration_warnings();
|
||||
PackedStringArray NavigationLink2D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
|
||||
if (start_position.is_equal_approx(end_position)) {
|
||||
warnings.push_back(RTR("NavigationLink2D start position should be different than the end position to be useful."));
|
||||
|
|
|
@ -93,7 +93,7 @@ public:
|
|||
void set_travel_cost(real_t p_travel_cost);
|
||||
real_t get_travel_cost() const { return travel_cost; }
|
||||
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
NavigationLink2D();
|
||||
~NavigationLink2D();
|
||||
|
|
|
@ -283,8 +283,8 @@ void NavigationRegion2D::_navigation_debug_changed() {
|
|||
}
|
||||
#endif // DEBUG_ENABLED
|
||||
|
||||
Array NavigationRegion2D::get_configuration_warnings() const {
|
||||
Array warnings = Node2D::get_configuration_warnings();
|
||||
PackedStringArray NavigationRegion2D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node2D::get_configuration_warnings();
|
||||
|
||||
if (is_visible_in_tree() && is_inside_tree()) {
|
||||
if (!navigation_polygon.is_valid()) {
|
||||
|
|
|
@ -114,7 +114,7 @@ public:
|
|||
void set_avoidance_layer_value(int p_layer_number, bool p_value);
|
||||
bool get_avoidance_layer_value(int p_layer_number) const;
|
||||
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
void bake_navigation_polygon(bool p_on_thread);
|
||||
void _bake_finished(Ref<NavigationPolygon> p_navigation_polygon);
|
||||
|
|
|
@ -137,8 +137,8 @@ void ParallaxLayer::set_base_offset_and_scale(const Point2 &p_offset, real_t p_s
|
|||
_update_mirroring();
|
||||
}
|
||||
|
||||
Array ParallaxLayer::get_configuration_warnings() const {
|
||||
Array warnings = Node::get_configuration_warnings();
|
||||
PackedStringArray ParallaxLayer::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
|
||||
if (!Object::cast_to<ParallaxBackground>(get_parent())) {
|
||||
warnings.push_back(RTR("ParallaxLayer node only works when set as child of a ParallaxBackground node."));
|
||||
|
|
|
@ -59,7 +59,7 @@ public:
|
|||
|
||||
void set_base_offset_and_scale(const Point2 &p_offset, real_t p_scale);
|
||||
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
ParallaxLayer();
|
||||
};
|
||||
|
||||
|
|
|
@ -287,8 +287,8 @@ void PathFollow2D::_validate_property(PropertyInfo &p_property) const {
|
|||
}
|
||||
}
|
||||
|
||||
Array PathFollow2D::get_configuration_warnings() const {
|
||||
Array warnings = Node::get_configuration_warnings();
|
||||
PackedStringArray PathFollow2D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
|
||||
if (is_visible_in_tree() && is_inside_tree()) {
|
||||
if (!Object::cast_to<Path2D>(get_parent())) {
|
||||
|
|
|
@ -106,7 +106,7 @@ public:
|
|||
void set_cubic_interpolation_enabled(bool p_enabled);
|
||||
bool is_cubic_interpolation_enabled() const;
|
||||
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
PathFollow2D() {}
|
||||
};
|
||||
|
|
|
@ -106,8 +106,8 @@ void PhysicalBone2D::_find_joint_child() {
|
|||
}
|
||||
}
|
||||
|
||||
Array PhysicalBone2D::get_configuration_warnings() const {
|
||||
Array warnings = Node::get_configuration_warnings();
|
||||
PackedStringArray PhysicalBone2D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
|
||||
if (!parent_skeleton) {
|
||||
warnings.push_back(RTR("A PhysicalBone2D only works with a Skeleton2D or another PhysicalBone2D as a parent node!"));
|
||||
|
|
|
@ -79,7 +79,7 @@ public:
|
|||
void set_follow_bone_when_simulating(bool p_follow);
|
||||
bool get_follow_bone_when_simulating() const;
|
||||
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
PhysicalBone2D();
|
||||
~PhysicalBone2D();
|
||||
|
|
|
@ -928,10 +928,10 @@ void RigidBody2D::_notification(int p_what) {
|
|||
#endif
|
||||
}
|
||||
|
||||
Array RigidBody2D::get_configuration_warnings() const {
|
||||
PackedStringArray RigidBody2D::get_configuration_warnings() const {
|
||||
Transform2D t = get_transform();
|
||||
|
||||
Array warnings = CollisionObject2D::get_configuration_warnings();
|
||||
PackedStringArray warnings = CollisionObject2D::get_configuration_warnings();
|
||||
|
||||
if (ABS(t.columns[0].length() - 1.0) > 0.05 || ABS(t.columns[1].length() - 1.0) > 0.05) {
|
||||
warnings.push_back(RTR("Size changes to RigidBody2D will be overridden by the physics engine when running.\nChange the size in children collision shapes instead."));
|
||||
|
|
|
@ -313,7 +313,7 @@ public:
|
|||
|
||||
TypedArray<Node2D> get_colliding_bodies() const; //function for script
|
||||
|
||||
virtual Array get_configuration_warnings() const override;
|
||||
virtual PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
RigidBody2D();
|
||||
~RigidBody2D();
|
||||
|
|
|
@ -200,8 +200,8 @@ void RemoteTransform2D::force_update_cache() {
|
|||
_update_cache();
|
||||
}
|
||||
|
||||
Array RemoteTransform2D::get_configuration_warnings() const {
|
||||
Array warnings = Node::get_configuration_warnings();
|
||||
PackedStringArray RemoteTransform2D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
|
||||
if (!has_node(remote_node) || !Object::cast_to<Node2D>(get_node(remote_node))) {
|
||||
warnings.push_back(RTR("Path property must point to a valid Node2D node to work."));
|
||||
|
|
|
@ -70,7 +70,7 @@ public:
|
|||
|
||||
void force_update_cache();
|
||||
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
RemoteTransform2D();
|
||||
};
|
||||
|
|
|
@ -402,8 +402,8 @@ Array ShapeCast2D::_get_collision_result() const {
|
|||
return ret;
|
||||
}
|
||||
|
||||
Array ShapeCast2D::get_configuration_warnings() const {
|
||||
Array warnings = Node2D::get_configuration_warnings();
|
||||
PackedStringArray ShapeCast2D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node2D::get_configuration_warnings();
|
||||
|
||||
if (shape.is_null()) {
|
||||
warnings.push_back(RTR("This node cannot interact with other objects unless a Shape2D is assigned."));
|
||||
|
|
|
@ -118,7 +118,7 @@ public:
|
|||
void remove_exception(const CollisionObject2D *p_node);
|
||||
void clear_exceptions();
|
||||
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
ShapeCast2D();
|
||||
};
|
||||
|
|
|
@ -415,8 +415,8 @@ int Bone2D::get_index_in_skeleton() const {
|
|||
return skeleton_index;
|
||||
}
|
||||
|
||||
Array Bone2D::get_configuration_warnings() const {
|
||||
Array warnings = Node::get_configuration_warnings();
|
||||
PackedStringArray Bone2D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
if (!skeleton) {
|
||||
if (parent_bone) {
|
||||
warnings.push_back(RTR("This Bone2D chain should end at a Skeleton2D node."));
|
||||
|
|
|
@ -78,7 +78,7 @@ public:
|
|||
void apply_rest();
|
||||
Transform2D get_skeleton_rest() const;
|
||||
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
void set_autocalculate_length_and_angle(bool p_autocalculate);
|
||||
bool get_autocalculate_length_and_angle() const;
|
||||
|
|
|
@ -846,8 +846,8 @@ TypedArray<Vector2i> TileMap::get_surrounding_cells(const Vector2i &p_coords) {
|
|||
return tile_set->get_surrounding_cells(p_coords);
|
||||
}
|
||||
|
||||
Array TileMap::get_configuration_warnings() const {
|
||||
Array warnings = Node::get_configuration_warnings();
|
||||
PackedStringArray TileMap::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
|
||||
// Retrieve the set of Z index values with a Y-sorted layer.
|
||||
RBSet<int> y_sorted_z_index;
|
||||
|
|
|
@ -216,7 +216,7 @@ public:
|
|||
GDVIRTUAL3(_tile_data_runtime_update, int, Vector2i, TileData *);
|
||||
|
||||
// Configuration warnings.
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
TileMap();
|
||||
~TileMap();
|
||||
|
|
|
@ -87,8 +87,8 @@ void BoneAttachment3D::_get_property_list(List<PropertyInfo> *p_list) const {
|
|||
}
|
||||
}
|
||||
|
||||
Array BoneAttachment3D::get_configuration_warnings() const {
|
||||
Array warnings = Node3D::get_configuration_warnings();
|
||||
PackedStringArray BoneAttachment3D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node3D::get_configuration_warnings();
|
||||
|
||||
if (use_external_skeleton) {
|
||||
if (external_skeleton_node_cache.is_null()) {
|
||||
|
|
|
@ -71,8 +71,7 @@ public:
|
|||
virtual void notify_skeleton_bones_renamed(Node *p_base_scene, Skeleton3D *p_skeleton, Dictionary p_rename_map);
|
||||
#endif // TOOLS_ENABLED
|
||||
|
||||
public:
|
||||
virtual Array get_configuration_warnings() const override;
|
||||
virtual PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
void set_bone_name(const String &p_name);
|
||||
String get_bone_name() const;
|
||||
|
|
|
@ -728,8 +728,8 @@ bool CollisionObject3D::get_capture_input_on_drag() const {
|
|||
return capture_input_on_drag;
|
||||
}
|
||||
|
||||
Array CollisionObject3D::get_configuration_warnings() const {
|
||||
Array warnings = Node::get_configuration_warnings();
|
||||
PackedStringArray CollisionObject3D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
|
||||
if (shapes.is_empty()) {
|
||||
warnings.push_back(RTR("This node has no shape, so it can't collide or interact with other objects.\nConsider adding a CollisionShape3D or CollisionPolygon3D as a child to define its shape."));
|
||||
|
|
|
@ -173,7 +173,7 @@ public:
|
|||
|
||||
_FORCE_INLINE_ RID get_rid() const { return rid; }
|
||||
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
CollisionObject3D();
|
||||
~CollisionObject3D();
|
||||
|
|
|
@ -168,8 +168,8 @@ void CollisionPolygon3D::set_margin(real_t p_margin) {
|
|||
}
|
||||
}
|
||||
|
||||
Array CollisionPolygon3D::get_configuration_warnings() const {
|
||||
Array warnings = Node::get_configuration_warnings();
|
||||
PackedStringArray CollisionPolygon3D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
|
||||
if (!Object::cast_to<CollisionObject3D>(get_parent())) {
|
||||
warnings.push_back(RTR("CollisionPolygon3D only serves to provide a collision shape to a CollisionObject3D derived node.\nPlease only use it as a child of Area3D, StaticBody3D, RigidBody3D, CharacterBody3D, etc. to give them a shape."));
|
||||
|
|
|
@ -74,7 +74,7 @@ public:
|
|||
real_t get_margin() const;
|
||||
void set_margin(real_t p_margin);
|
||||
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
CollisionPolygon3D();
|
||||
};
|
||||
|
|
|
@ -118,8 +118,8 @@ void CollisionShape3D::resource_changed(Ref<Resource> res) {
|
|||
}
|
||||
#endif
|
||||
|
||||
Array CollisionShape3D::get_configuration_warnings() const {
|
||||
Array warnings = Node::get_configuration_warnings();
|
||||
PackedStringArray CollisionShape3D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
|
||||
CollisionObject3D *col_object = Object::cast_to<CollisionObject3D>(get_parent());
|
||||
if (col_object == nullptr) {
|
||||
|
|
|
@ -64,7 +64,7 @@ public:
|
|||
void set_disabled(bool p_disabled);
|
||||
bool is_disabled() const;
|
||||
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
CollisionShape3D();
|
||||
~CollisionShape3D();
|
||||
|
|
|
@ -203,8 +203,8 @@ bool CPUParticles3D::get_fractional_delta() const {
|
|||
return fractional_delta;
|
||||
}
|
||||
|
||||
Array CPUParticles3D::get_configuration_warnings() const {
|
||||
Array warnings = GeometryInstance3D::get_configuration_warnings();
|
||||
PackedStringArray CPUParticles3D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = GeometryInstance3D::get_configuration_warnings();
|
||||
|
||||
bool mesh_found = false;
|
||||
bool anim_material_found = false;
|
||||
|
|
|
@ -305,7 +305,7 @@ public:
|
|||
void set_gravity(const Vector3 &p_gravity);
|
||||
Vector3 get_gravity() const;
|
||||
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
void restart();
|
||||
|
||||
|
|
|
@ -162,8 +162,8 @@ void Decal::_validate_property(PropertyInfo &p_property) const {
|
|||
}
|
||||
}
|
||||
|
||||
Array Decal::get_configuration_warnings() const {
|
||||
Array warnings = Node::get_configuration_warnings();
|
||||
PackedStringArray Decal::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
|
||||
if (OS::get_singleton()->get_current_rendering_method() == "gl_compatibility") {
|
||||
warnings.push_back(RTR("Decals are only available when using the Forward+ or Mobile rendering backends."));
|
||||
|
|
|
@ -69,7 +69,7 @@ protected:
|
|||
#endif // DISABLE_DEPRECATED
|
||||
|
||||
public:
|
||||
virtual Array get_configuration_warnings() const override;
|
||||
virtual PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
void set_size(const Vector3 &p_size);
|
||||
Vector3 get_size() const;
|
||||
|
|
|
@ -117,8 +117,8 @@ AABB FogVolume::get_aabb() const {
|
|||
return AABB();
|
||||
}
|
||||
|
||||
Array FogVolume::get_configuration_warnings() const {
|
||||
Array warnings = Node::get_configuration_warnings();
|
||||
PackedStringArray FogVolume::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
|
||||
Ref<Environment> environment = get_viewport()->find_world_3d()->get_environment();
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ public:
|
|||
Ref<Material> get_material() const;
|
||||
|
||||
virtual AABB get_aabb() const override;
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
FogVolume();
|
||||
~FogVolume();
|
||||
|
|
|
@ -296,8 +296,8 @@ bool GPUParticles3D::get_interpolate() const {
|
|||
return interpolate;
|
||||
}
|
||||
|
||||
Array GPUParticles3D::get_configuration_warnings() const {
|
||||
Array warnings = GeometryInstance3D::get_configuration_warnings();
|
||||
PackedStringArray GPUParticles3D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = GeometryInstance3D::get_configuration_warnings();
|
||||
|
||||
bool meshes_found = false;
|
||||
bool anim_material_found = false;
|
||||
|
|
|
@ -164,7 +164,7 @@ public:
|
|||
void set_draw_pass_mesh(int p_pass, const Ref<Mesh> &p_mesh);
|
||||
Ref<Mesh> get_draw_pass_mesh(int p_pass) const;
|
||||
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
void set_sub_emitter(const NodePath &p_path);
|
||||
NodePath get_sub_emitter() const;
|
||||
|
|
|
@ -527,8 +527,8 @@ Ref<Image> GPUParticlesCollisionSDF3D::bake() {
|
|||
return ret;
|
||||
}
|
||||
|
||||
Array GPUParticlesCollisionSDF3D::get_configuration_warnings() const {
|
||||
Array warnings = Node::get_configuration_warnings();
|
||||
PackedStringArray GPUParticlesCollisionSDF3D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
|
||||
if (bake_mask == 0) {
|
||||
warnings.push_back(RTR("The Bake Mask has no bits enabled, which means baking will not produce any collision for this GPUParticlesCollisionSDF3D.\nTo resolve this, enable at least one bit in the Bake Mask property."));
|
||||
|
|
|
@ -170,7 +170,7 @@ protected:
|
|||
#endif // DISABLE_DEPRECATED
|
||||
|
||||
public:
|
||||
virtual Array get_configuration_warnings() const override;
|
||||
virtual PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
void set_thickness(float p_thickness);
|
||||
float get_thickness() const;
|
||||
|
|
|
@ -198,8 +198,8 @@ bool Joint3D::get_exclude_nodes_from_collision() const {
|
|||
return exclude_from_collision;
|
||||
}
|
||||
|
||||
Array Joint3D::get_configuration_warnings() const {
|
||||
Array warnings = Node3D::get_configuration_warnings();
|
||||
PackedStringArray Joint3D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node3D::get_configuration_warnings();
|
||||
|
||||
if (!warning.is_empty()) {
|
||||
warnings.push_back(warning);
|
||||
|
|
|
@ -63,7 +63,7 @@ protected:
|
|||
_FORCE_INLINE_ bool is_configured() const { return configured; }
|
||||
|
||||
public:
|
||||
virtual Array get_configuration_warnings() const override;
|
||||
virtual PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
void set_node_a(const NodePath &p_node_a);
|
||||
NodePath get_node_a() const;
|
||||
|
|
|
@ -169,8 +169,8 @@ AABB Light3D::get_aabb() const {
|
|||
return AABB();
|
||||
}
|
||||
|
||||
Array Light3D::get_configuration_warnings() const {
|
||||
Array warnings = VisualInstance3D::get_configuration_warnings();
|
||||
PackedStringArray Light3D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = VisualInstance3D::get_configuration_warnings();
|
||||
|
||||
if (!get_scale().is_equal_approx(Vector3(1, 1, 1))) {
|
||||
warnings.push_back(RTR("A light's scale does not affect the visual size of the light."));
|
||||
|
@ -596,8 +596,8 @@ OmniLight3D::ShadowMode OmniLight3D::get_shadow_mode() const {
|
|||
return shadow_mode;
|
||||
}
|
||||
|
||||
Array OmniLight3D::get_configuration_warnings() const {
|
||||
Array warnings = Light3D::get_configuration_warnings();
|
||||
PackedStringArray OmniLight3D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Light3D::get_configuration_warnings();
|
||||
|
||||
if (!has_shadow() && get_projector().is_valid()) {
|
||||
warnings.push_back(RTR("Projector texture only works with shadows active."));
|
||||
|
@ -628,8 +628,8 @@ OmniLight3D::OmniLight3D() :
|
|||
set_shadow_mode(SHADOW_CUBE);
|
||||
}
|
||||
|
||||
Array SpotLight3D::get_configuration_warnings() const {
|
||||
Array warnings = Light3D::get_configuration_warnings();
|
||||
PackedStringArray SpotLight3D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Light3D::get_configuration_warnings();
|
||||
|
||||
if (has_shadow() && get_param(PARAM_SPOT_ANGLE) >= 90.0) {
|
||||
warnings.push_back(RTR("A SpotLight3D with an angle wider than 90 degrees cannot cast shadows."));
|
||||
|
|
|
@ -147,7 +147,7 @@ public:
|
|||
Color get_correlated_color() const;
|
||||
|
||||
virtual AABB get_aabb() const override;
|
||||
virtual Array get_configuration_warnings() const override;
|
||||
virtual PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
Light3D();
|
||||
~Light3D();
|
||||
|
@ -217,7 +217,7 @@ public:
|
|||
void set_shadow_mode(ShadowMode p_mode);
|
||||
ShadowMode get_shadow_mode() const;
|
||||
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
OmniLight3D();
|
||||
};
|
||||
|
@ -231,7 +231,7 @@ protected:
|
|||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
SpotLight3D();
|
||||
};
|
||||
|
|
|
@ -1528,8 +1528,8 @@ Ref<CameraAttributes> LightmapGI::get_camera_attributes() const {
|
|||
return camera_attributes;
|
||||
}
|
||||
|
||||
Array LightmapGI::get_configuration_warnings() const {
|
||||
Array warnings = Node::get_configuration_warnings();
|
||||
PackedStringArray LightmapGI::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
|
||||
if (OS::get_singleton()->get_current_rendering_method() == "gl_compatibility") {
|
||||
warnings.push_back(RTR("Lightmap can only be baked from a device that supports the RD backends. Lightmap baking may fail."));
|
||||
|
|
|
@ -302,7 +302,7 @@ public:
|
|||
|
||||
BakeError bake(Node *p_from_node, String p_image_data_path = "", Lightmapper::BakeStepFunc p_bake_step = nullptr, void *p_bake_userdata = nullptr);
|
||||
|
||||
virtual Array get_configuration_warnings() const override;
|
||||
virtual PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
LightmapGI();
|
||||
};
|
||||
|
|
|
@ -690,8 +690,8 @@ void NavigationAgent3D::_avoidance_done(Vector3 p_new_velocity) {
|
|||
emit_signal(SNAME("velocity_computed"), safe_velocity);
|
||||
}
|
||||
|
||||
Array NavigationAgent3D::get_configuration_warnings() const {
|
||||
Array warnings = Node::get_configuration_warnings();
|
||||
PackedStringArray NavigationAgent3D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
|
||||
if (!Object::cast_to<Node3D>(get_parent())) {
|
||||
warnings.push_back(RTR("The NavigationAgent3D can be used only under a Node3D inheriting parent node."));
|
||||
|
|
|
@ -221,7 +221,7 @@ public:
|
|||
|
||||
void _avoidance_done(Vector3 p_new_velocity);
|
||||
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
void set_avoidance_layers(uint32_t p_layers);
|
||||
uint32_t get_avoidance_layers() const;
|
||||
|
|
|
@ -458,8 +458,8 @@ void NavigationLink3D::set_travel_cost(real_t p_travel_cost) {
|
|||
NavigationServer3D::get_singleton()->link_set_travel_cost(link, travel_cost);
|
||||
}
|
||||
|
||||
Array NavigationLink3D::get_configuration_warnings() const {
|
||||
Array warnings = Node::get_configuration_warnings();
|
||||
PackedStringArray NavigationLink3D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
|
||||
if (start_position.is_equal_approx(end_position)) {
|
||||
warnings.push_back(RTR("NavigationLink3D start position should be different than the end position to be useful."));
|
||||
|
|
|
@ -99,7 +99,7 @@ public:
|
|||
void set_travel_cost(real_t p_travel_cost);
|
||||
real_t get_travel_cost() const { return travel_cost; }
|
||||
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
};
|
||||
|
||||
#endif // NAVIGATION_LINK_3D_H
|
||||
|
|
|
@ -270,8 +270,8 @@ bool NavigationRegion3D::is_baking() const {
|
|||
return NavigationServer3D::get_singleton()->is_baking_navigation_mesh(navigation_mesh);
|
||||
}
|
||||
|
||||
Array NavigationRegion3D::get_configuration_warnings() const {
|
||||
Array warnings = Node::get_configuration_warnings();
|
||||
PackedStringArray NavigationRegion3D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
|
||||
if (is_visible_in_tree() && is_inside_tree()) {
|
||||
if (!navigation_mesh.is_valid()) {
|
||||
|
|
|
@ -108,7 +108,7 @@ public:
|
|||
void _bake_finished(Ref<NavigationMesh> p_navigation_mesh);
|
||||
bool is_baking() const;
|
||||
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
NavigationRegion3D();
|
||||
~NavigationRegion3D();
|
||||
|
|
|
@ -693,8 +693,8 @@ OccluderInstance3D::BakeError OccluderInstance3D::bake_scene(Node *p_from_node,
|
|||
return BAKE_ERROR_OK;
|
||||
}
|
||||
|
||||
Array OccluderInstance3D::get_configuration_warnings() const {
|
||||
Array warnings = Node::get_configuration_warnings();
|
||||
PackedStringArray OccluderInstance3D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
|
||||
if (!bool(GLOBAL_GET("rendering/occlusion_culling/use_occlusion_culling"))) {
|
||||
warnings.push_back(RTR("Occlusion culling is disabled in the Project Settings, which means occlusion culling won't be performed in the root viewport.\nTo resolve this, open the Project Settings and enable Rendering > Occlusion Culling > Use Occlusion Culling."));
|
||||
|
|
|
@ -181,7 +181,7 @@ protected:
|
|||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
virtual Array get_configuration_warnings() const override;
|
||||
virtual PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
enum BakeError {
|
||||
BAKE_ERROR_OK,
|
||||
|
|
|
@ -317,8 +317,8 @@ void PathFollow3D::_validate_property(PropertyInfo &p_property) const {
|
|||
}
|
||||
}
|
||||
|
||||
Array PathFollow3D::get_configuration_warnings() const {
|
||||
Array warnings = Node::get_configuration_warnings();
|
||||
PackedStringArray PathFollow3D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
|
||||
if (is_visible_in_tree() && is_inside_tree()) {
|
||||
if (!Object::cast_to<Path3D>(get_parent())) {
|
||||
|
|
|
@ -122,7 +122,7 @@ public:
|
|||
void set_cubic_interpolation_enabled(bool p_enabled);
|
||||
bool is_cubic_interpolation_enabled() const;
|
||||
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
void update_transform(bool p_immediate = false);
|
||||
|
||||
|
|
|
@ -995,8 +995,8 @@ TypedArray<Node3D> RigidBody3D::get_colliding_bodies() const {
|
|||
return ret;
|
||||
}
|
||||
|
||||
Array RigidBody3D::get_configuration_warnings() const {
|
||||
Array warnings = CollisionObject3D::get_configuration_warnings();
|
||||
PackedStringArray RigidBody3D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = CollisionObject3D::get_configuration_warnings();
|
||||
|
||||
Vector3 scale = get_transform().get_basis().get_scale();
|
||||
if (ABS(scale.x - 1.0) > 0.05 || ABS(scale.y - 1.0) > 0.05 || ABS(scale.z - 1.0) > 0.05) {
|
||||
|
|
|
@ -329,7 +329,7 @@ public:
|
|||
void set_constant_torque(const Vector3 &p_torque);
|
||||
Vector3 get_constant_torque() const;
|
||||
|
||||
virtual Array get_configuration_warnings() const override;
|
||||
virtual PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
RigidBody3D();
|
||||
~RigidBody3D();
|
||||
|
|
|
@ -190,8 +190,8 @@ AABB ReflectionProbe::get_aabb() const {
|
|||
return aabb;
|
||||
}
|
||||
|
||||
Array ReflectionProbe::get_configuration_warnings() const {
|
||||
Array warnings = Node::get_configuration_warnings();
|
||||
PackedStringArray ReflectionProbe::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
|
||||
if (OS::get_singleton()->get_current_rendering_method() == "gl_compatibility") {
|
||||
warnings.push_back(RTR("ReflectionProbes are not supported when using the GL Compatibility backend yet. Support will be added in a future release."));
|
||||
|
|
|
@ -122,7 +122,7 @@ public:
|
|||
|
||||
virtual AABB get_aabb() const override;
|
||||
|
||||
virtual Array get_configuration_warnings() const override;
|
||||
virtual PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
ReflectionProbe();
|
||||
~ReflectionProbe();
|
||||
|
|
|
@ -200,8 +200,8 @@ void RemoteTransform3D::force_update_cache() {
|
|||
_update_cache();
|
||||
}
|
||||
|
||||
Array RemoteTransform3D::get_configuration_warnings() const {
|
||||
Array warnings = Node::get_configuration_warnings();
|
||||
PackedStringArray RemoteTransform3D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
|
||||
if (!has_node(remote_node) || !Object::cast_to<Node3D>(get_node(remote_node))) {
|
||||
warnings.push_back(RTR("The \"Remote Path\" property must point to a valid Node3D or Node3D-derived node to work."));
|
||||
|
|
|
@ -70,7 +70,7 @@ public:
|
|||
|
||||
void force_update_cache();
|
||||
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
RemoteTransform3D();
|
||||
};
|
||||
|
|
|
@ -170,8 +170,8 @@ void ShapeCast3D::_bind_methods() {
|
|||
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "debug_shape_custom_color"), "set_debug_shape_custom_color", "get_debug_shape_custom_color");
|
||||
}
|
||||
|
||||
Array ShapeCast3D::get_configuration_warnings() const {
|
||||
Array warnings = Node3D::get_configuration_warnings();
|
||||
PackedStringArray ShapeCast3D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node3D::get_configuration_warnings();
|
||||
|
||||
if (shape.is_null()) {
|
||||
warnings.push_back(RTR("This node cannot interact with other objects unless a Shape3D is assigned."));
|
||||
|
|
|
@ -140,7 +140,7 @@ public:
|
|||
void remove_exception(const CollisionObject3D *p_node);
|
||||
void clear_exceptions();
|
||||
|
||||
virtual Array get_configuration_warnings() const override;
|
||||
virtual PackedStringArray get_configuration_warnings() const override;
|
||||
};
|
||||
|
||||
#endif // SHAPE_CAST_3D_H
|
||||
|
|
|
@ -376,8 +376,8 @@ void SoftBody3D::_bind_methods() {
|
|||
BIND_ENUM_CONSTANT(DISABLE_MODE_KEEP_ACTIVE);
|
||||
}
|
||||
|
||||
Array SoftBody3D::get_configuration_warnings() const {
|
||||
Array warnings = Node::get_configuration_warnings();
|
||||
PackedStringArray SoftBody3D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
|
||||
if (mesh.is_null()) {
|
||||
warnings.push_back(RTR("This body will be ignored until you set a mesh."));
|
||||
|
|
|
@ -126,7 +126,7 @@ protected:
|
|||
void _notification(int p_what);
|
||||
static void _bind_methods();
|
||||
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
public:
|
||||
RID get_physics_rid() const { return physics_rid; }
|
||||
|
|
|
@ -1430,8 +1430,8 @@ StringName AnimatedSprite3D::get_animation() const {
|
|||
return animation;
|
||||
}
|
||||
|
||||
Array AnimatedSprite3D::get_configuration_warnings() const {
|
||||
Array warnings = SpriteBase3D::get_configuration_warnings();
|
||||
PackedStringArray AnimatedSprite3D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = SpriteBase3D::get_configuration_warnings();
|
||||
if (frames.is_null()) {
|
||||
warnings.push_back(RTR("A SpriteFrames resource must be created or set in the \"Frames\" property in order for AnimatedSprite3D to display frames."));
|
||||
}
|
||||
|
|
|
@ -285,7 +285,7 @@ public:
|
|||
|
||||
virtual Rect2 get_item_rect() const override;
|
||||
|
||||
virtual Array get_configuration_warnings() const override;
|
||||
virtual PackedStringArray get_configuration_warnings() const override;
|
||||
virtual void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const override;
|
||||
|
||||
AnimatedSprite3D();
|
||||
|
|
|
@ -105,8 +105,8 @@ void VehicleWheel3D::_notification(int p_what) {
|
|||
}
|
||||
}
|
||||
|
||||
Array VehicleWheel3D::get_configuration_warnings() const {
|
||||
Array warnings = Node::get_configuration_warnings();
|
||||
PackedStringArray VehicleWheel3D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = Node::get_configuration_warnings();
|
||||
|
||||
if (!Object::cast_to<VehicleBody3D>(get_parent())) {
|
||||
warnings.push_back(RTR("VehicleWheel3D serves to provide a wheel system to a VehicleBody3D. Please use it as a child of a VehicleBody3D."));
|
||||
|
|
|
@ -147,7 +147,7 @@ public:
|
|||
void set_steering(real_t p_steering);
|
||||
real_t get_steering() const;
|
||||
|
||||
Array get_configuration_warnings() const override;
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
VehicleWheel3D();
|
||||
};
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue