Add ability to create tooltip descriptions for dynamically exported properties#115182
Add ability to create tooltip descriptions for dynamically exported properties#115182ryevdokimov wants to merge 1 commit intogodotengine:masterfrom
Conversation
509336b to
559600e
Compare
|
There should be a supplemental sibling PR that introduces this to |
|
Looks like this can replace the functionality added in #85868 However using it in the engine requires binding a method, which is not ideal. |
There was a problem hiding this comment.
I just tested (and look at the code) the changes, and it's working as expected. However, I would make some changes;
Documentation
Maybe it's worth mentioning in the documentation that the description supports BBCode ?

func _get_property_description(property: StringName) -> String:
return "Sample description of [b]property[/b] '%s'" % propertyExtend usage for category, group and subgroup
Also I was not able to add a description to property with usage PROPERTY_USAGE_CATEGORY, PROPERTY_USAGE_GROUP and PROPERTY_USAGE_SUBGROUP
properties.append({
"name": "Numbers",
"type": TYPE_NIL,
"hint_string": "number_",
"usage": PROPERTY_USAGE_GROUP
})
But I was able to add one for PROPERTY_HINT_GROUP_ENABLE
Context
Full Test Node script
@tool
extends Node
class_name TestNode
@export var number_count = 3:
set(nc):
number_count = nc
numbers.resize(number_count)
notify_property_list_changed()
var numbers = PackedInt32Array([0, 0, 0])
func _get_property_list():
var properties: Array[Dictionary] = []
properties.append({
"name": "Numbers",
"type": TYPE_NIL,
"hint_string": "number_",
"usage": PROPERTY_USAGE_GROUP
})
for i in range(number_count):
properties.append({
"name": "number_%d" % i,
"type": TYPE_INT,
"hint": PROPERTY_HINT_ENUM,
"hint_string": "ZERO,ONE,TWO,THREE,FOUR,FIVE",
})
return properties
func _get(property):
if property.begins_with("number_"):
var index = property.get_slice("_", 1).to_int()
return numbers[index]
return null
func _set(property, value):
if property.begins_with("number_"):
var index = property.get_slice("_", 1).to_int()
numbers[index] = value
return true
return false
func _get_property_description(property: StringName) -> String:
return "Description for '%s'" % property559600e to
793dd90
Compare
Zehir
left a comment
There was a problem hiding this comment.
Tested the PR and it's working correctly, I was not able to break it in some wierd ways
The code looks good to me.
About groups this does works for ;
PROPERTY_USAGE_GROUPPROPERTY_USAGE_SUBGROUP
But not for PROPERTY_USAGE_CATEGORY but I don't know if it's worth adding too ?
The _get_property_warning method don't display the warning for the group but it's currently been reworked in the PR #90049 and so I guess we can ignore it for this PR.
Next step team review I guess

Implements: godotengine/godot-proposals#8531
Example:
2026-01-20.12-51-46.mp4