Description
Tested versions
- Reproducible in: v4.2.1.stable.official [b09f793], v4.3.dev2.official [3524346]
- Not reproducible in: v4.1.3.stable.official
System information
Godot v4.2.1.stable - Windows 10.0.22631
Issue description
When creating a plugin for Godot I'm adding a custom button to the editor interface to do something when pressed.
I add this button to a custom category for a specific custom Class. This way I can put the button in the editor interface where I want it to be.
I started the plugin in Godot v4.1, and now when I try to use it in Godot v4.2, the button is not showing. I found out that the button was not showing because I was using @export_category
.
In the MRP you can find the button in the editor interface as expected in v4.1:
But in v4.2.1, the button is not showing:
This is still happening in Godot v4.3-dev2.
The Custom Node script is just this:
class_name CustomNode extends Node
@export var a_variable: String
@export_category("Category")
@export var another_variable: String
And the EditorPlugin code is just this:
@tool
extends EditorPlugin
var plugin
func _enter_tree():
plugin = preload("res://addons/myinspectorplugin/my_inspector_plugin.gd").new()
add_inspector_plugin(plugin)
func _exit_tree():
remove_inspector_plugin(plugin)
The problem seems to be that the _parse_category()
of EditorInspectorPlugin
is not parsing custom categories from scripts.
Steps to reproduce
- Open the MRP. (It's built in v4.2.1 so if you open it with v.4.1.3 it will show that it needs to be modified, it doesn't matter. You can just click OK).
- Open the
custom_node.tscn
. - Click the CustomNode in the scene tree.
- Look at the inspector
In Godot v4.1.3, a button with the name MyCustomCategoryButton
will appear as expected.
In Godot v4.2.1, that button will not be showing.