feat: modules moved and engine moved to submodule
This commit is contained in:
parent
dfb5e645cd
commit
c33d2130cc
5136 changed files with 225275 additions and 64485 deletions
|
|
@ -336,12 +336,8 @@ void EditorData::set_editor_plugin_states(const Dictionary &p_states) {
|
|||
return;
|
||||
}
|
||||
|
||||
List<Variant> keys;
|
||||
p_states.get_key_list(&keys);
|
||||
|
||||
List<Variant>::Element *E = keys.front();
|
||||
for (; E; E = E->next()) {
|
||||
String name = E->get();
|
||||
for (const KeyValue<Variant, Variant> &kv : p_states) {
|
||||
String name = kv.key;
|
||||
int idx = -1;
|
||||
for (int i = 0; i < editor_plugins.size(); i++) {
|
||||
if (editor_plugins[i]->get_plugin_name() == name) {
|
||||
|
|
@ -353,7 +349,7 @@ void EditorData::set_editor_plugin_states(const Dictionary &p_states) {
|
|||
if (idx == -1) {
|
||||
continue;
|
||||
}
|
||||
editor_plugins[idx]->set_state(p_states[name]);
|
||||
editor_plugins[idx]->set_state(kv.value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -602,8 +598,7 @@ void EditorData::instantiate_object_properties(Object *p_object) {
|
|||
List<PropertyInfo> pinfo;
|
||||
p_object->get_property_list(&pinfo);
|
||||
|
||||
for (List<PropertyInfo>::Element *E = pinfo.front(); E; E = E->next()) {
|
||||
PropertyInfo pi = E->get();
|
||||
for (const PropertyInfo &pi : pinfo) {
|
||||
if (pi.type == Variant::OBJECT && pi.usage & PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT) {
|
||||
Object *prop = ClassDB::instantiate(pi.class_name);
|
||||
p_object->set(pi.name, prop);
|
||||
|
|
@ -1071,12 +1066,10 @@ void EditorData::script_class_load_icon_paths() {
|
|||
#ifndef DISABLE_DEPRECATED
|
||||
if (ProjectSettings::get_singleton()->has_setting("_global_script_class_icons")) {
|
||||
Dictionary d = GLOBAL_GET("_global_script_class_icons");
|
||||
List<Variant> keys;
|
||||
d.get_key_list(&keys);
|
||||
|
||||
for (const Variant &E : keys) {
|
||||
String name = E.operator String();
|
||||
_script_class_icon_paths[name] = d[name];
|
||||
for (const KeyValue<Variant, Variant> &kv : d) {
|
||||
String name = kv.key.operator String();
|
||||
_script_class_icon_paths[name] = kv.value;
|
||||
|
||||
String path = ScriptServer::get_global_class_path(name);
|
||||
script_class_set_name(path, name);
|
||||
|
|
@ -1258,7 +1251,10 @@ void EditorSelection::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("add_node", "node"), &EditorSelection::add_node);
|
||||
ClassDB::bind_method(D_METHOD("remove_node", "node"), &EditorSelection::remove_node);
|
||||
ClassDB::bind_method(D_METHOD("get_selected_nodes"), &EditorSelection::get_selected_nodes);
|
||||
ClassDB::bind_method(D_METHOD("get_transformable_selected_nodes"), &EditorSelection::_get_transformable_selected_nodes);
|
||||
ClassDB::bind_method(D_METHOD("get_top_selected_nodes"), &EditorSelection::get_top_selected_nodes);
|
||||
#ifndef DISABLE_DEPRECATED
|
||||
ClassDB::bind_method(D_METHOD("get_transformable_selected_nodes"), &EditorSelection::get_top_selected_nodes);
|
||||
#endif // DISABLE_DEPRECATED
|
||||
ADD_SIGNAL(MethodInfo("selection_changed"));
|
||||
}
|
||||
|
||||
|
|
@ -1271,7 +1267,7 @@ void EditorSelection::_update_node_list() {
|
|||
return;
|
||||
}
|
||||
|
||||
selected_node_list.clear();
|
||||
top_selected_node_list.clear();
|
||||
|
||||
// If the selection does not have the parent of the selected node, then add the node to the node list.
|
||||
// However, if the parent is already selected, then adding this node is redundant as
|
||||
|
|
@ -1291,7 +1287,7 @@ void EditorSelection::_update_node_list() {
|
|||
if (skip) {
|
||||
continue;
|
||||
}
|
||||
selected_node_list.push_back(E.key);
|
||||
top_selected_node_list.push_back(E.key);
|
||||
}
|
||||
|
||||
node_list_changed = true;
|
||||
|
|
@ -1315,10 +1311,10 @@ void EditorSelection::_emit_change() {
|
|||
emitted = false;
|
||||
}
|
||||
|
||||
TypedArray<Node> EditorSelection::_get_transformable_selected_nodes() {
|
||||
TypedArray<Node> EditorSelection::get_top_selected_nodes() {
|
||||
TypedArray<Node> ret;
|
||||
|
||||
for (const Node *E : selected_node_list) {
|
||||
for (const Node *E : top_selected_node_list) {
|
||||
ret.push_back(E);
|
||||
}
|
||||
|
||||
|
|
@ -1335,13 +1331,13 @@ TypedArray<Node> EditorSelection::get_selected_nodes() {
|
|||
return ret;
|
||||
}
|
||||
|
||||
List<Node *> &EditorSelection::get_selected_node_list() {
|
||||
const List<Node *> &EditorSelection::get_top_selected_node_list() {
|
||||
if (changed) {
|
||||
update();
|
||||
} else {
|
||||
_update_node_list();
|
||||
}
|
||||
return selected_node_list;
|
||||
return top_selected_node_list;
|
||||
}
|
||||
|
||||
List<Node *> EditorSelection::get_full_selected_node_list() {
|
||||
|
|
@ -1362,9 +1358,6 @@ void EditorSelection::clear() {
|
|||
node_list_changed = true;
|
||||
}
|
||||
|
||||
EditorSelection::EditorSelection() {
|
||||
}
|
||||
|
||||
EditorSelection::~EditorSelection() {
|
||||
clear();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue