Improve support for Properties in NodePath exports#121683
Open
Komariarii wants to merge 1 commit into
Open
Conversation
Komariarii
force-pushed
the
export-property-path
branch
from
July 23, 2026 12:11
129aaed to
87d8529
Compare
Style fixes
Komariarii
force-pushed
the
export-property-path
branch
from
July 23, 2026 12:13
87d8529 to
3da63d0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem(s) does this PR solve?
Partially works towards godotengine/godot-proposals#231
This PR touches up the EditorPropertyNodePath class a bit to better support properties, while the main improvement in this PR is the support of drag and drop, there is some logic bundled for implementing a new
@export_property_pathattribute which is the goal of the proposal. I'm not familiar with GDScript or its processes (aside from basic bindings).2026-07-23_04-14-10.mp4
This PR also includes a new internal helper method for NodePath called "with_subpaths", this shrinks an otherwise cumbersome NodePath construction to a much more readable state.
Before example:
const NodePath path = NodePath(adding_property_path.get_names(), {p_name}, adding_property_path.is_absolute());After example:
const NodePath path = adding_property_path.with_subnames({p_name});While I would like to expose this to GDScript, for similar reasons as above I'm not sure what the correct way of binding it is, as the helper takes a Vector of StringNames, which as far as I know isn't supported by the binding layer.
Additional information
From a quick test, this has no compatibility issues, I was able to update a 4.7 project with a manually typed property and it updated to include the new type icon just fine.
While this PR does not add the ability to access the Property Selector or the filtering included in this PR, it will mean that the PR that follows this up is completely self-contained in GDScript, and there (hopefully) shouldn't be any changes required in this area to support a
@export_property_pathattribute. Regardless, I've tested the currently unused code and the filtering and selector works as expected, they just need to be wired up.Here is a demonstration of property selector enabled with a filter of
boolandfloat:(reminder that this functionality is not accessible yet)
2026-07-23_07-25-44.mp4
I believe this qualifies as a feature PR, and I don't believe I'm at the requirement quite yet (one merged PR away I believe?), but seeing how old the proposal had me interested enough in doing it for fun, I can mark this as a draft until the requirement is met if desired.
Should also be noted that I am still rather unfamiliar with C++ so if any of my decisions look strange it's most certainly that. Any code feedback is always highly appreciated.
No AI was used in the creation or process of this PR