-
-
Notifications
You must be signed in to change notification settings - Fork 23.7k
Add the ability to expose nodes for direct access in instantiated scenes #84018
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
This will work with imported gltf scenes? |
|
Also please update your branch by rebasing instead of merging, important skill to get used to with contributing, see the pr workflow for details |
aacbd8c to
c85dded
Compare
3d44605 to
ac26465
Compare
ac26465 to
2144053
Compare
|
You have reset your branch and this closes the PR, if you update your branch this can be reopened |
|
Sorry, still trying to get a grip on correct way of updating my repo from main while keeping my changes. I've pushed my new changes up. This includes a somewhat functional version of this pr. |
3233eac to
5257a35
Compare
5257a35 to
03e1647
Compare
|
what are the current issues with this PR that is preventing this from being merged? |
|
There is a possible issue with "has_meta + set_meta" code. In some places code assume there can be 'false' value in meta. For example, here: Also, there is a lot of code like this: That code assume there is no option to have a 'false' value in meta. As far as I understand. |
462682e to
4c3b167
Compare
Just curious: #106837 has been merged, what about the use of unique names? |
I was using unique names when I first started this to mimic what that PR accomplishes. Thankfully we shouldn't have to change anything in this PR to gain the benefit from that one. |
AThousandShips
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good, haven't tested the functionality
|
I'm still facing error possible related to 'has_meta' issue. In editor, in scene that contains scene that contains exposed nodes there are error messages like this: When I change all has_meta to get_meta(..., false) errors are gone. |
If you're able, could you provide a zip of a MRP? I'm not sure why swapping it from has_meta to get_meta would change anything, but maybe I'm just missing something |
|
Maybe I'm wrong about has_meta\get_meta thing. I don't sure why that change helps me in my main project. But anyway here is mrp with error. |




Updated 9/8/2025
Description
This pull request implements a feature that significantly enhances Godot's scene editing capabilities. It allows specific nodes within a scene to be exposed, making them visible and allowing their properties to be overridden when the scene is instantiated elsewhere. I believe it is an improved version of editable children.
Note
Important
The use of unique names has been removed from this PR (#84018 (comment)) as there were too many issues with it, once #106837 is merged this PR should function like originally planned
Lets say we have this window scene that we want to re-use everywhere we can exposed the title label and the content nodes:Example 1
With this PR we can modify the properties of the exposed nodes and append child nodes to them, this lets us create super flexible scenes and use them like so:
and this is the same scene with editable children enabled. Far messier and poorer UX
Updated Example 2
[gd_scene load_steps=2 format=3 uid="uid://bg7bu82kitjht"] [ext_resource type="Texture2D" uid="uid://dvj2xcm5vrvy8" path="res://icon.svg" id="1_mdjal"] [node name="scene_0" type="Node2D"] [node name="Parent" type="Node2D" parent="."] [node name="Exposed_0" type="Sprite2D" parent="Parent" index="0"] texture = ExtResource("1_mdjal") + [exposed path="Parent/Exposed_0"][gd_scene load_steps=3 format=3 uid="uid://da3f5wvbqv0bv"] [ext_resource type="PackedScene" uid="uid://bg7bu82kitjht" path="res://scene_0.tscn" id="1_mdjal"] [sub_resource type="CompressedTexture2D" id="CompressedTexture2D_3sd7o"] load_path = "res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex" [node name="scene_1" type="Node2D"] [node name="scene_0_instance" parent="." instance=ExtResource("1_mdjal")] [node name="Exposed_0" parent="scene_0_instance/Parent" index="0"] self_modulate = Color(1, 0.666667, 0, 1) [node name="Child_Of_Exposed" type="Sprite2D" parent="scene_0_instance/Parent/Exposed_0" index="0"] position = Vector2(100, 30) scale = Vector2(0.5, 0.5) texture = SubResource("CompressedTexture2D_3sd7o") +[exposed path="scene_0_instance/Parent/Exposed_0"] // Re-exposure +[exposed path="scene_0_instance/Parent/Exposed_0/Child_Of_Exposed"] // Initial ExposureSample Project
TODO
I think that this pr addresses the following proposals: