Godot Version
Godot 4.3
Question
If a Resource file (with @tool ) is opened in the Inspector, _get is continuously being called. I am curious why this is happening (as I cannot find any relevant mention in the Docs), is it a feature or a bug? Here is a simple script that demonstrates it:
extends Resource
@export var get_verbose: bool:
set(value):
get_verbose=value
func _get(property):
if get_verbose:
print(“_get:”,property)
return null
Make a resource with that script, toggle get_verbose in inspector and look at output: there is a continuous script of calls for input properties: resource_local_to_scene, resource_path, resource_name.
Is the intended behavior:
opened 08:14PM - 20 Oct 23 UTC
discussion
topic:editor
### Godot version
v4.1.2.stable.official [399c9dc39]
### System information
G… odot v4.1.2.stable - Manjaro Linux #1 SMP PREEMPT_DYNAMIC Sun Jul 16 16:48:53 UTC 2023 - Wayland - Vulkan (Compatibility) - Mesa Intel(R) UHD Graphics 600 (GLK 2) () - Intel(R) Celeron(R) N4020 CPU @ 1.10GHz (2 Threads)
### Issue description
If you define a property, any kind of property (an script property or a property defined through `get_property_list`), and set a getter for that property (either through `get:` or `_get()`), editor will call it, infinitely, when you inspect that object:

Somehow, somewhere, editor inspector (or editor property) is getting the variable in a loop (maybe is using internal process to keep the value updated?). This is not an expected behavior, specially if you're trying to make a tool that updates many heavy stuff in editor, causing editor freezes reaching that point due always being updating the view and not when is needed.
While back in Godot 3, this issue was not present:

### Steps to reproduce
Create a node and attach this script:
```gdscript
@tool
extends Node
var prop_defined_in_script:
get: return get_prop_in_script()
func _init():
print("Object created")
func get_prop_in_script():
print("get: prop_defined_in_script")
return 3
func _get(property):
if property == "prop_only_in_property_list":
print("get: prop_only_in_property_list")
return 2
func _get_property_list():
var p := []
p.append({"name":"prop_only_in_property_list", "type":TYPE_INT})
p.append({"name":"prop_defined_in_script", "type":TYPE_INT})
return p
```
Then, reload the scene and select the node.
### Minimal reproduction project
Let me know if a reproduction project is needed, since only a script is needed to replicate the behavior.
According maintainers, it was implemented to “notifying about property change”