-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
add_to_end
in add_property_editor()
appears to do nothing
#91938
Comments
That's the relevant source code: godot/editor/editor_inspector.cpp Lines 3328 to 3347 in 557f63d
So basically an EditorProperty added with E.g. after changing your EditorInspectorPlugin to always add the default EditorProperty for @tool
extends EditorInspectorPlugin
var IntEditor = preload("res://addons/exampleplugin/int_editor.gd")
func _can_handle(object) -> bool:
return true
func _parse_property(object, type, name, hint_type, hint_string, usage_flags, wide) -> bool:
if type == TYPE_INT:
var add_to_end = ...
add_property_editor(name, IntEditor.new(), add_to_end)
return false Result (v4.2.2.stable.official [15073af]):
In the source it's used (only?) by the EditorInspectorPluginTextureRegion for adding the "Edit Region" button: godot/editor/plugins/texture_region_editor_plugin.cpp Lines 1269 to 1279 in 557f63d
So seems like it's just a matter of documenting it? 🤔 |
Tested versions
4.2.2.stable
System information
Godot v4.2.2.stable - Windows 10.0.22631 - Vulkan (Forward+) - dedicated AMD Radeon RX 7800 XT (Advanced Micro Devices, Inc.; 31.0.24019.1006) - AMD Ryzen 9 7900X 12-Core Processor (24 Threads)
Issue description
I assume the add_to_end property is meant to move properties to the end of the inspector? The docs don't say anything about it. But in my testing the argument does nothing, the editor properties just follow the property order.
Here I've made a custom inspector plugin that accepts all ints and puts in my simple editor that is just a label.
Here is a script where the int is on top.
But it doesn't get moved to the end like I expect.
Note: This might just be me misunderstanding what the argument does, but if that's the case, the docs need more info
Steps to reproduce
Try out the MRP project
Minimal reproduction project (MRP)
add_to_end_issue.zip
The text was updated successfully, but these errors were encountered: