Allow GDExtensions to add editor plugins

This commit is contained in:
David Snopek 2023-05-11 16:46:53 -05:00
parent 809a982162
commit 3007163210
9 changed files with 143 additions and 0 deletions

View file

@ -124,6 +124,7 @@ public:
private:
Vector<EditorPlugin *> editor_plugins;
HashMap<StringName, EditorPlugin *> extension_editor_plugins;
struct PropertyData {
String name;
@ -170,6 +171,11 @@ public:
int get_editor_plugin_count() const;
EditorPlugin *get_editor_plugin(int p_idx);
void add_extension_editor_plugin(const StringName &p_class_name, EditorPlugin *p_plugin);
void remove_extension_editor_plugin(const StringName &p_class_name);
bool has_extension_editor_plugin(const StringName &p_class_name);
EditorPlugin *get_extension_editor_plugin(const StringName &p_class_name);
void add_undo_redo_inspector_hook_callback(Callable p_callable); // Callbacks should have this signature: void (Object* undo_redo, Object *modified_object, String property, Variant new_value)
void remove_undo_redo_inspector_hook_callback(Callable p_callable);
const Vector<Callable> get_undo_redo_inspector_hook_callback();