godotengine / godotengine/godot

EditorInspectorPlugin can't hide some array fields

Open
#106,576 6 comments 0 reactions 0 assignees View on GitHub
enhancement topic:editor
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

- Producible in: 4.4
- other versions not tested

### System information

Godot v4.4.stable (32702e496) - Windows 10 (build 19045) - Multi-window, 1 monitor - OpenGL ES 3/ANGLE (Compatibility) - Intel(R) HD Graphics 520 (Intel Corporation; 30.0.101.1338) - Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz (4 threads)

### Issue description

I wanted to write an addon to hide the `Size:` and `> Resource` fields in exported arrays. This is specially useful in nested arrays of resources, otherwise it would turn into a mess real fast. But not only there's no way to access `Size:`, you can't even hide the groups in `_parse_group`. Test addon (inspector plugin):
```gdscript
@tool
extends EditorInspectorPlugin

func _can_handle(object: Object) -> bool:
return true

func _parse_property(object, type, name, hint_type, hint_string, usage_flags, wide) -> bool:
prints('_parse_property', object, type, name, hint_type, hint_string, usage_flags, wide)
return false

func _parse_group(object: Object, group: String):
prints('_parse_group', object, group)
if group == 'Resource':
return true
return false

func _parse_category(object: Object, category: String) -> void:
prints('_parse_category', object, category)
```
The result doesn't include `Size` at all, as it's not a property, a group or a category. It also doesn't show `> Resource`. It just shows the children of that which is useless for this case.

![Image](https://github.com/user-attachments/assets/55b87afe-ce4d-4dc9-bc65-c9647b19db60)
![Image](https://github.com/user-attachments/assets/eecda7c8-2b90-4c89-8623-4e85ea1a143f)
The second image is shown upon opening the `Nested Res` property.

### Steps to reproduce

- open the MRP
- open the main scene (root node selected)
- in the inspector, when you open/close the resources, things will be printed. There you can see what I mean

### Minimal reproduction project (MRP)

[godot_issue_2025-05-19_02-23-50.zip](https://github.com/user-attachments/files/20275356/godot_issue_2025-05-19_02-23-50.zip)

Contributor guide

Open the contributing guide

Research direction

Open the linked minimal reproduction project and run the main scene with the root node selected. Start by tracing the EditorInspectorPlugin callbacks shown in the issue, especially _parse_property and _parse_group, and compare the handling of nested resource arrays. Done means the plugin can hide the array Size field and the Resource group, including when nested.

Written by the indexing model from the issue text.

Assessment

Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.