mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Allow editing editor settings from project manager
This commit is contained in:
parent
e47fb8b898
commit
a1340f05a9
8 changed files with 89 additions and 20 deletions
|
|
@ -3782,6 +3782,10 @@ void EditorInspector::_parse_added_editors(VBoxContainer *current_vbox, EditorIn
|
|||
}
|
||||
|
||||
bool EditorInspector::_is_property_disabled_by_feature_profile(const StringName &p_property) {
|
||||
if (!EditorFeatureProfileManager::get_singleton()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Ref<EditorFeatureProfile> profile = EditorFeatureProfileManager::get_singleton()->get_current_profile();
|
||||
if (profile.is_null()) {
|
||||
return false;
|
||||
|
|
@ -3872,7 +3876,7 @@ void EditorInspector::update_tree() {
|
|||
// or if the whole object should be considered read-only.
|
||||
bool draw_warning = false;
|
||||
bool all_read_only = false;
|
||||
if (is_inside_tree()) {
|
||||
if (is_inside_tree() && EditorNode::get_singleton()) {
|
||||
if (object->has_method("_is_read_only")) {
|
||||
all_read_only = object->call("_is_read_only");
|
||||
}
|
||||
|
|
@ -5153,7 +5157,7 @@ void EditorInspector::_edit_set(const String &p_name, const Variant &p_value, bo
|
|||
}
|
||||
|
||||
EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
|
||||
if (bool(object->call("_dont_undo_redo"))) {
|
||||
if (!undo_redo || bool(object->call("_dont_undo_redo"))) {
|
||||
object->set(p_name, p_value);
|
||||
if (p_refresh_all) {
|
||||
_edit_request_change(object, "");
|
||||
|
|
@ -5664,8 +5668,9 @@ void EditorInspector::_notification(int p_what) {
|
|||
} break;
|
||||
|
||||
case NOTIFICATION_READY: {
|
||||
ERR_FAIL_NULL(EditorFeatureProfileManager::get_singleton());
|
||||
EditorFeatureProfileManager::get_singleton()->connect("current_feature_profile_changed", callable_mp(this, &EditorInspector::_feature_profile_changed));
|
||||
if (EditorFeatureProfileManager::get_singleton()) {
|
||||
EditorFeatureProfileManager::get_singleton()->connect("current_feature_profile_changed", callable_mp(this, &EditorInspector::_feature_profile_changed));
|
||||
}
|
||||
set_process(is_visible_in_tree());
|
||||
if (!is_sub_inspector()) {
|
||||
get_tree()->connect("node_removed", callable_mp(this, &EditorInspector::_node_removed));
|
||||
|
|
|
|||
|
|
@ -2801,7 +2801,9 @@ void EditorPropertyColor::_picker_created() {
|
|||
}
|
||||
|
||||
void EditorPropertyColor::_popup_opening() {
|
||||
EditorNode::get_singleton()->setup_color_picker(picker->get_picker());
|
||||
if (EditorNode::get_singleton()) {
|
||||
EditorNode::get_singleton()->setup_color_picker(picker->get_picker());
|
||||
}
|
||||
last_color = picker->get_pick_color();
|
||||
was_checked = !is_checkable() || is_checked();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue