godotengine / godotengine/godot
No revert arrow next to export property when parent scene node has parent script type
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
Reproductible on :
- v4.3.dev5.mono.official [89f70e98d]
- v4.2.stable.mono.official [46dc27791]
- v4.1.1.stable.mono.official [bd6af8e0e]
- v4.0.stable.mono.official [92bee43ad]
- v3.5.3.stable.mono.official [6c814135b]
### System information
Godot v4.3.dev5.mono - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3070 (NVIDIA; 31.0.15.5186) - 12th Gen Intel(R) Core(TM) i9-12900 (24 Threads)
### Issue description
### Summary
On a very specific case, the revert arrow is not displayed next to the exported script's properties in the inspector.
InheritedScript.gd :
```gdscript
extends BaseScript
@export var myVar = 42
```

### Details
This specific case is :
- Let's have 2 simple scenes composed of 1 Node and the one inheriting from the other (respectively BaseScene.tscn and InheritedScene.tscn).
- Let's have 2 scripts, the one inheriting from the other too (respectively BaseScript.gd and InheritedScript.gd)
BaseScript.gd is :
```gdscript
class_name BaseScript
extends Node
```
InheritedScript.gd is :
```gdscript
extends BaseScript
@export var myVar = 42
```
- BaseScene.tscn node has the BaseScript.gd scripts
- InheritedScene.tscn node has the InheritedScript.gd scripts
- If you set myVar to 12 from the inspector of the InheritedScript node, I expect the revert arrow to show, but it's not.
### Additionnal Info :
- I originally discovered the problem in C#. I can provide the scripts if needed
- If the InheritedScene.tscn does not inherits BaseScene.tscn, the arrow is here
- If the BaseScene.tscn has the InheritedScript.gd (instead of BaseScript.gd) or no script at all, the arrow is here
### Steps to reproduce
- Extract the given sample project inherited-export-prop-norevert-issue
- Open the sample project with godot
- Open InheritedScene.tscn
- Select the only node AInherited from the scene dock
- You can see the MyVar value is 12 in the inspector and the revert arrow is not here while the default value is 42
### Minimal reproduction project (MRP)
[inherited-export-prop-norevert-issue.zip](https://github.com/godotengine/godot/files/15075941/inherited-export-prop-norevert-issue.zip)
Contributor guide
Assessment
This issue has not been assessed yet.