summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_help.cpp12
-rw-r--r--editor/editor_help.h2
-rw-r--r--editor/import/editor_import_collada.cpp11
-rw-r--r--editor/import/resource_importer_texture.cpp2
4 files changed, 11 insertions, 16 deletions
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index 8fb307a77d..7fe483c834 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -253,7 +253,7 @@ void EditorHelpSearch::_confirmed() {
String mdata = ti->get_metadata(0);
emit_signal("go_to_help", mdata);
- editor->call("_editor_select", EditorNode::EDITOR_SCRIPT); // in case EditorHelpSearch beeen invoked on top of other editor window
+ EditorNode::get_singleton()->call("_editor_select", EditorNode::EDITOR_SCRIPT); // in case EditorHelpSearch beeen invoked on top of other editor window
// go to that
hide();
}
@@ -288,7 +288,6 @@ void EditorHelpSearch::_bind_methods() {
EditorHelpSearch::EditorHelpSearch() {
- editor = EditorNode::get_singleton();
VBoxContainer *vbc = memnew(VBoxContainer);
add_child(vbc);
@@ -363,7 +362,7 @@ void EditorHelpIndex::_tree_item_selected() {
return;
emit_signal("open_class", s->get_text(0));
-
+ EditorNode::get_singleton()->call("_editor_select", EditorNode::EDITOR_SCRIPT);
hide();
//_goto_desc(s->get_text(0));
@@ -371,12 +370,11 @@ void EditorHelpIndex::_tree_item_selected() {
void EditorHelpIndex::select_class(const String &p_class) {
- EditorNode *editor = EditorNode::get_singleton();
if (!tree_item_map.has(p_class))
return;
tree_item_map[p_class]->select(0);
class_list->ensure_cursor_is_visible();
- editor->call("_editor_select", EditorNode::EDITOR_SCRIPT); // in case EditorHelpIndex beeen invoked on top of other editor window
+ EditorNode::get_singleton()->call("_editor_select", EditorNode::EDITOR_SCRIPT); // in case EditorHelpIndex beeen invoked on top of other editor window
}
void EditorHelpIndex::popup() {
@@ -1281,7 +1279,7 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
void EditorHelp::_request_help(const String &p_string) {
Error err = _goto_desc(p_string);
if (err == OK) {
- editor->call("_editor_select", EditorNode::EDITOR_SCRIPT);
+ EditorNode::get_singleton()->call("_editor_select", EditorNode::EDITOR_SCRIPT);
}
//100 palabras
}
@@ -1691,8 +1689,6 @@ void EditorHelp::_bind_methods() {
EditorHelp::EditorHelp() {
- editor = EditorNode::get_singleton();
-
VBoxContainer *vbc = this;
EDITOR_DEF("text_editor/help/sort_functions_alphabetically", true);
diff --git a/editor/editor_help.h b/editor/editor_help.h
index d6fc0e3bf2..46d83490f4 100644
--- a/editor/editor_help.h
+++ b/editor/editor_help.h
@@ -49,7 +49,6 @@ class EditorHelpSearch : public ConfirmationDialog {
GDCLASS(EditorHelpSearch, ConfirmationDialog)
- EditorNode *editor;
LineEdit *search_box;
Tree *search_options;
String base_type;
@@ -119,7 +118,6 @@ class EditorHelp : public VBoxContainer {
String edited_class;
- EditorNode *editor;
Map<String, int> method_line;
Map<String, int> signal_line;
Map<String, int> property_line;
diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp
index 2cefcdbc4a..907c7b045c 100644
--- a/editor/import/editor_import_collada.cpp
+++ b/editor/import/editor_import_collada.cpp
@@ -402,8 +402,8 @@ Error ColladaImport::_create_material(const String &p_target) {
Ref<Texture> texture = ResourceLoader::load(texfile, "Texture");
if (texture.is_valid()) {
- material->set_texture(SpatialMaterial::TEXTURE_SPECULAR, texture);
- material->set_specular(Color(1, 1, 1, 1));
+ material->set_texture(SpatialMaterial::TEXTURE_METALLIC, texture);
+ material->set_specular(1.0);
//material->set_texture(SpatialMaterial::PARAM_SPECULAR,texture);
//material->set_parameter(SpatialMaterial::PARAM_SPECULAR,Color(1,1,1,1));
@@ -411,8 +411,9 @@ Error ColladaImport::_create_material(const String &p_target) {
missing_textures.push_back(texfile.get_file());
}
}
+
} else {
- material->set_metalness(effect.specular.color.get_v());
+ material->set_metallic(effect.specular.color.get_v());
}
// EMISSION
@@ -553,10 +554,10 @@ static void _generate_tangents_and_binormals(const PoolVector<int> &p_indices, c
tangent = Vector3();
} else {
tangent = Vector3((t2 * x1 - t1 * x2) * r, (t2 * y1 - t1 * y2) * r,
- (t2 * z1 - t1 * z2) * r)
+ (t2 * z1 - t1 * z2) * r)
.normalized();
binormal = Vector3((s1 * x2 - s2 * x1) * r, (s1 * y2 - s2 * y1) * r,
- (s1 * z2 - s2 * z1) * r)
+ (s1 * z2 - s2 * z1) * r)
.normalized();
}
diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp
index 17feeb1196..7e27f6c618 100644
--- a/editor/import/resource_importer_texture.cpp
+++ b/editor/import/resource_importer_texture.cpp
@@ -277,7 +277,7 @@ void ResourceImporterTexture::_save_stex(const Ref<Image> &p_image, const String
if (p_force_rgbe && image->get_format() >= Image::FORMAT_R8 && image->get_format() <= Image::FORMAT_RGBE9995) {
image->convert(Image::FORMAT_RGBE9995);
} else {
- image->compress(p_vram_compression);
+ image->compress(p_vram_compression, p_texture_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR);
}
format |= image->get_format();