You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on tooling, notably a custom skeleton IK system that I might release as an addon or replacement for the current deprecated one (depending on maintainer opinion).
Describe the problem or limitation you are having in your project
My implementation uses multiple dynamically exported properties (using _get_property_list() ).
Notably to expose bone names in the tool and allow optional magnet position. As I intend to make this available to other users, documenting these properties so they have a tooltip description would be valuable for the user experience.
There is no way to do this currently in Godot afaik.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
The feature would allow users to add tooltips to dynamic exports.
There are multiple places outside of my particular case where documenting dynamic properties could help :
some nodes expose conditional properties based on a boolean or enum, for example PhysicalBone3D has multiple different properties exposed based on the joint type chosen.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Looking at the code for property descriptions/tooltips, there doesn't seem to be an easy way to document dynamic properties :
they are exposed through a runtime function that creates a PropertyInfo
PropertyInfo does not contain a "description" property (and it probably should not, and then only with tools enabled)
documentation is parsed and added to doctool at script parse time for GDscript
the script is not executable at this step of the process
this would mean adding additional documentation code paths, at least for c++
The way I see it, there are multiple ways to implement this :
adding a description field to PropertyInfo that would be editor-build only.
it would make the process of dynamic exports simpler for users but might require a lot of refactoring
adding a syntax to the parser, something like : ## (CustomPropertyPath): description for GDscript
But I don't know what equivalent there could be for C# and c++ though.
If this enhancement will not be used often, can it be worked around with a few lines of script?
doctools and class documentation are part of core ; there might be ways to add entries into the cache, but it would be hackish and very verbose.
Is there a reason why this should be core and not an add-on in the asset library?
as said above, not possible as part of core functionality.
The text was updated successfully, but these errors were encountered:
Lcbx
changed the title
allow descriptions for dynamic properties
allow descriptions for dynamically exported properties
Nov 27, 2023
Calinou
changed the title
allow descriptions for dynamically exported properties
Add support for tooltip descriptions in dynamically exported properties
Nov 28, 2023
Same here. We're developing multiple addons that we intend to eventually release. Some of them rely heavily on custom properties, and something like this would greatly improve UX.
I think enhancing PropertyInfo to include the description makes a lot of sense (at least from a usability perspective). We find ourselves often needing to wrap resources and "spread" their properties in the inspector using dynamically exported properties. As it is, those new properties lose the original descriptions. Being able to access and re-export the originals would be great in these cases.
This would also allow us to do cool things like templating descriptions of properties in base scripts which can then be enriched by the context of whatever scripts extend them.
Describe the project you are working on
I'm working on tooling, notably a custom skeleton IK system that I might release as an addon or replacement for the current deprecated one (depending on maintainer opinion).
Describe the problem or limitation you are having in your project
My implementation uses multiple dynamically exported properties (using
_get_property_list()
).Notably to expose bone names in the tool and allow optional magnet position. As I intend to make this available to other users, documenting these properties so they have a tooltip description would be valuable for the user experience.
There is no way to do this currently in Godot afaik.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
The feature would allow users to add tooltips to dynamic exports.
There are multiple places outside of my particular case where documenting dynamic properties could help :
some nodes expose conditional properties based on a boolean or enum, for example PhysicalBone3D has multiple different properties exposed based on the joint type chosen.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Looking at the code for property descriptions/tooltips, there doesn't seem to be an easy way to document dynamic properties :
The way I see it, there are multiple ways to implement this :
it would make the process of dynamic exports simpler for users but might require a lot of refactoring
## (CustomPropertyPath): description
for GDscriptBut I don't know what equivalent there could be for C# and c++ though.
If this enhancement will not be used often, can it be worked around with a few lines of script?
doctools and class documentation are part of core ; there might be ways to add entries into the cache, but it would be hackish and very verbose.
Is there a reason why this should be core and not an add-on in the asset library?
as said above, not possible as part of core functionality.
The text was updated successfully, but these errors were encountered: