Compare commits

..

11 Commits

Author SHA1 Message Date
Wilson E. Alvarez 4ecbfcbffe
Merge dd150f46d7 into b144ebc7bc 2025-01-02 12:13:45 +00:00
Wilson E. Alvarez dd150f46d7
Fix unhandled PROPERTY_HINT_NO_NODEPATH warning
Due to upstream change:

	6f7525c396
2025-01-02 07:13:32 -05:00
Wilson E. Alvarez 9525eff8e0
Override renamed EditorPlugin::get_name() method
Due to upstream change:

	0ab3dc273e
2025-01-02 07:13:32 -05:00
Wilson E. Alvarez 903fc2279c
Refactor EditorHelpBit usage
Due to upstream change:

	4e19ab8afe
2025-01-02 07:13:32 -05:00
Wilson E. Alvarez 8aff1dbedf
Fix unhandled PROPERTY_HINT_ONESHOT warning
Due to upstream change:

	761a20f7a7
2025-01-02 07:13:32 -05:00
Wilson E. Alvarez b7cb41bf03
Fix forbidden comparisons between Ref and nullptr.
Necessary when compiling with strict_checks=yes.

Due to upstream change:

	df29cc696f
2025-01-02 07:13:32 -05:00
Wilson E. Alvarez ce4db8c086
Fix internal Button set_icon calls to set_button_icon
Due to upstream change:

    562c666e3d
2025-01-02 07:13:30 -05:00
Wilson E. Alvarez 10930ec63d
Fix unhandled PROPERTY_HINT_TOOL_BUTTON warning
Due to upstream change:

	85dfd89653
2025-01-02 07:11:22 -05:00
Wilson E. Alvarez 8d1d90ea48
Fix unhandled PROPERTY_HINT_DICTIONARY_TYPE warning
Due to upstream change:

	9853a69144
2025-01-02 07:11:22 -05:00
Wilson E. Alvarez 66c36afae7
Update EditorMainScreen calls after its extraction
Due to upstream change:

	5e1c9d68aa
2025-01-02 07:11:22 -05:00
Dave Palais b144ebc7bc
Do not show warning for NIL type BlackboardPlan variables on BBParam. (#267)
Enable variable mapping for NIL type public BlackboardPlan variables.
2025-01-01 18:14:39 +01:00
3 changed files with 6 additions and 5 deletions

View File

@ -200,7 +200,7 @@ void BlackboardPlan::_get_property_list(List<PropertyInfo> *p_list) const {
#ifdef TOOLS_ENABLED
// * Editor
if (!_is_var_hidden(var_name, var)) {
if (!_is_var_nil(var) || !_is_var_private(var_name, var)) {
if (has_mapping(var_name) || has_property_binding(var_name)) {
p_list->push_back(PropertyInfo(Variant::STRING, var_name, PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_READ_ONLY));
} else {
@ -226,7 +226,7 @@ void BlackboardPlan::_get_property_list(List<PropertyInfo> *p_list) const {
if (is_mapping_enabled()) {
p_list->push_back(PropertyInfo(Variant::NIL, "Mapping", PROPERTY_HINT_NONE, "mapping/", PROPERTY_USAGE_GROUP));
for (const Pair<StringName, BBVariable> &p : var_list) {
if (_is_var_hidden(p.first, p.second)) {
if (_is_var_private(p.first, p.second)) {
continue;
}
if (unlikely(has_property_binding(p.first))) {
@ -242,7 +242,7 @@ void BlackboardPlan::_get_property_list(List<PropertyInfo> *p_list) const {
// * Binding
p_list->push_back(PropertyInfo(Variant::NIL, "Binding", PROPERTY_HINT_NONE, "binding/", PROPERTY_USAGE_GROUP));
for (const Pair<StringName, BBVariable> &p : var_list) {
if (_is_var_hidden(p.first, p.second)) {
if (_is_var_nil(p.second) || _is_var_private(p.first, p.second)) {
continue;
}
if (unlikely(has_mapping(p.first))) {

View File

@ -51,7 +51,8 @@ private:
// If true, NodePath variables will be prefetched, so that the vars will contain node pointers instead (upon BB creation/population).
bool prefetch_nodepath_vars = true;
_FORCE_INLINE_ bool _is_var_hidden(const String &p_name, const BBVariable &p_var) const { return p_var.get_type() == Variant::NIL || (is_derived() && p_name.begins_with("_")); }
_FORCE_INLINE_ bool _is_var_nil(const BBVariable &p_var) const { return p_var.get_type() == Variant::NIL; }
_FORCE_INLINE_ bool _is_var_private(const String &p_name, const BBVariable &p_var) const { return is_derived() && p_name.begins_with("_"); }
protected:
static void _bind_methods();

View File

@ -89,7 +89,7 @@ void EditorPropertyVariableName::_update_status() {
status_btn->set_button_icon(theme_cache.var_empty_icon);
status_btn->set_tooltip_text(TTR("Variable name not specified.\nClick to open the blackboard plan."));
} else if (plan->has_var(var_name)) {
if (expected_type == Variant::NIL || plan->get_var(var_name).get_type() == expected_type) {
if (expected_type == Variant::NIL || plan->get_var(var_name).get_type() == Variant::NIL || plan->get_var(var_name).get_type() == expected_type) {
status_btn->set_button_icon(theme_cache.var_exists_icon);
status_btn->set_tooltip_text(TTR("This variable is present in the blackboard plan.\nClick to open the blackboard plan."));
} else {