Improvements to multi-node editing

- Show revert button for properties that are not default for all selected nodes
- Show property documentation tooltips
- Show common class name and icon and number of selected nodes in EditorPath, e.g. "Node2D (4 Selected)"
- Hide metadata for MultiNodeEdit and AnimationMultiTrackKeyEdit
- Hide script for MultiNodeEdit
This commit is contained in:
FireForge 2022-06-14 13:34:17 -05:00
parent 00fa4e23e4
commit a914dc0c46
6 changed files with 182 additions and 52 deletions

View file

@ -52,13 +52,9 @@ public:
bool setting = false;
bool animation_read_only = false;
bool _hide_script_from_inspector() {
return true;
}
bool _dont_undo_redo() {
return true;
}
bool _hide_script_from_inspector() { return true; }
bool _hide_metadata_from_inspector() { return true; }
bool _dont_undo_redo() { return true; }
bool _is_read_only() {
return animation_read_only;
@ -68,6 +64,7 @@ public:
ClassDB::bind_method(D_METHOD("_update_obj"), &AnimationTrackKeyEdit::_update_obj);
ClassDB::bind_method(D_METHOD("_key_ofs_changed"), &AnimationTrackKeyEdit::_key_ofs_changed);
ClassDB::bind_method(D_METHOD("_hide_script_from_inspector"), &AnimationTrackKeyEdit::_hide_script_from_inspector);
ClassDB::bind_method(D_METHOD("_hide_metadata_from_inspector"), &AnimationTrackKeyEdit::_hide_metadata_from_inspector);
ClassDB::bind_method(D_METHOD("get_root_path"), &AnimationTrackKeyEdit::get_root_path);
ClassDB::bind_method(D_METHOD("_dont_undo_redo"), &AnimationTrackKeyEdit::_dont_undo_redo);
ClassDB::bind_method(D_METHOD("_is_read_only"), &AnimationTrackKeyEdit::_is_read_only);
@ -719,13 +716,9 @@ public:
bool setting = false;
bool animation_read_only = false;
bool _hide_script_from_inspector() {
return true;
}
bool _dont_undo_redo() {
return true;
}
bool _hide_script_from_inspector() { return true; }
bool _hide_metadata_from_inspector() { return true; }
bool _dont_undo_redo() { return true; }
bool _is_read_only() {
return animation_read_only;
@ -735,6 +728,7 @@ public:
ClassDB::bind_method(D_METHOD("_update_obj"), &AnimationMultiTrackKeyEdit::_update_obj);
ClassDB::bind_method(D_METHOD("_key_ofs_changed"), &AnimationMultiTrackKeyEdit::_key_ofs_changed);
ClassDB::bind_method(D_METHOD("_hide_script_from_inspector"), &AnimationMultiTrackKeyEdit::_hide_script_from_inspector);
ClassDB::bind_method(D_METHOD("_hide_metadata_from_inspector"), &AnimationMultiTrackKeyEdit::_hide_metadata_from_inspector);
ClassDB::bind_method(D_METHOD("get_root_path"), &AnimationMultiTrackKeyEdit::get_root_path);
ClassDB::bind_method(D_METHOD("_dont_undo_redo"), &AnimationMultiTrackKeyEdit::_dont_undo_redo);
ClassDB::bind_method(D_METHOD("_is_read_only"), &AnimationMultiTrackKeyEdit::_is_read_only);