summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_export.cpp9
-rw-r--r--editor/editor_export.h3
-rw-r--r--editor/icons/SubViewport.svg1
-rw-r--r--editor/import/resource_importer_texture.cpp2
-rw-r--r--editor/plugins/mesh_instance_3d_editor_plugin.cpp7
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.cpp3
6 files changed, 17 insertions, 8 deletions
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index 5883b5eb1e..1321ee9144 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -582,6 +582,14 @@ String EditorExportPlugin::get_ios_cpp_code() const {
return ios_cpp_code;
}
+void EditorExportPlugin::add_ios_project_static_lib(const String &p_path) {
+ ios_project_static_libs.push_back(p_path);
+}
+
+Vector<String> EditorExportPlugin::get_ios_project_static_libs() const {
+ return ios_project_static_libs;
+}
+
void EditorExportPlugin::_export_file_script(const String &p_path, const String &p_type, const Vector<String> &p_features) {
if (get_script_instance()) {
@@ -617,6 +625,7 @@ void EditorExportPlugin::skip() {
void EditorExportPlugin::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_shared_object", "path", "tags"), &EditorExportPlugin::add_shared_object);
+ ClassDB::bind_method(D_METHOD("add_ios_project_static_lib", "path"), &EditorExportPlugin::add_ios_project_static_lib);
ClassDB::bind_method(D_METHOD("add_file", "path", "file", "remap"), &EditorExportPlugin::add_file);
ClassDB::bind_method(D_METHOD("add_ios_framework", "path"), &EditorExportPlugin::add_ios_framework);
ClassDB::bind_method(D_METHOD("add_ios_plist_content", "plist_content"), &EditorExportPlugin::add_ios_plist_content);
diff --git a/editor/editor_export.h b/editor/editor_export.h
index 81790eb0a4..845638a691 100644
--- a/editor/editor_export.h
+++ b/editor/editor_export.h
@@ -291,6 +291,7 @@ class EditorExportPlugin : public Reference {
bool skipped;
Vector<String> ios_frameworks;
+ Vector<String> ios_project_static_libs;
String ios_plist_content;
String ios_linker_flags;
Vector<String> ios_bundle_files;
@@ -322,6 +323,7 @@ protected:
void add_shared_object(const String &p_path, const Vector<String> &tags);
void add_ios_framework(const String &p_path);
+ void add_ios_project_static_lib(const String &p_path);
void add_ios_plist_content(const String &p_plist_content);
void add_ios_linker_flags(const String &p_flags);
void add_ios_bundle_file(const String &p_path);
@@ -336,6 +338,7 @@ protected:
public:
Vector<String> get_ios_frameworks() const;
+ Vector<String> get_ios_project_static_libs() const;
String get_ios_plist_content() const;
String get_ios_linker_flags() const;
Vector<String> get_ios_bundle_files() const;
diff --git a/editor/icons/SubViewport.svg b/editor/icons/SubViewport.svg
new file mode 100644
index 0000000000..103b1006ad
--- /dev/null
+++ b/editor/icons/SubViewport.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3 2c-.5304.0000801-1.0390625.2108475-1.4140625.5859375-.37509.37501-.5858575.8836225-.5859375 1.4140625v8c.0000803.5304.2108475 1.039063.5859375 1.414062.37501.375091.8836225.585858 1.4140625.585938h10c1.1046 0 2-.89543 2-2v-8c0-1.1046-.89543-2-2-2zm0 1h10c.55228.0000096.99999.44772 1 1v8c-.00001.55228-.44772.99999-1 1h-10c-.55228-.00001-.99999-.44772-1-1v-8c.0000096-.55228.44772-.99999 1-1zm3 1c-.5304.0001-1.0390625.2108375-1.4140625.5859375-.37509.375-.5858575.8836225-.5859375 1.4140625v4c.00008.5304.2108475 1.039062.5859375 1.414062.37501.3751.8836225.585838 1.4140625.585938h4c1.1046 0 2-.8954 2-2v-4c0-1.1046-.89543-2-2-2zm0 1h4c.55228 0 .99999.4477 1 1v4c-.00001.5523-.44772 1-1 1h-4c-.55228 0-.99999-.4477-1-1v-4c.00001-.5523.44772-1 1-1z" fill="#e0e0e0" fill-opacity=".996078"/></svg> \ No newline at end of file
diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp
index c218697423..c92251ca60 100644
--- a/editor/import/resource_importer_texture.cpp
+++ b/editor/import/resource_importer_texture.cpp
@@ -424,7 +424,7 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String
String normal_map = p_options["roughness/src_normal"];
Ref<Image> normal_image;
- Image::RoughnessChannel roughness_channel;
+ Image::RoughnessChannel roughness_channel = Image::ROUGHNESS_CHANNEL_R;
if (mipmaps && roughness > 1 && FileAccess::exists(normal_map)) {
normal_image.instance();
diff --git a/editor/plugins/mesh_instance_3d_editor_plugin.cpp b/editor/plugins/mesh_instance_3d_editor_plugin.cpp
index f7a90b8ab3..ccefdcd28f 100644
--- a/editor/plugins/mesh_instance_3d_editor_plugin.cpp
+++ b/editor/plugins/mesh_instance_3d_editor_plugin.cpp
@@ -337,18 +337,15 @@ void MeshInstance3DEditor::_create_uv_lines(int p_layer) {
const Vector2 *r = uv.ptr();
Vector<int> indices = a[Mesh::ARRAY_INDEX];
- const int *ri;
+ const int *ri = NULL;
int ic;
- bool use_indices;
if (indices.size()) {
ic = indices.size();
ri = indices.ptr();
- use_indices = true;
} else {
ic = uv.size();
- use_indices = false;
}
for (int j = 0; j < ic; j += 3) {
@@ -356,7 +353,7 @@ void MeshInstance3DEditor::_create_uv_lines(int p_layer) {
for (int k = 0; k < 3; k++) {
MeshInstance3DEditorEdgeSort edge;
- if (use_indices) {
+ if (ri) {
edge.a = r[ri[j + k]];
edge.b = r[ri[j + ((k + 1) % 3)]];
} else {
diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp
index f570baa885..a5bd5aed6b 100644
--- a/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -1031,7 +1031,7 @@ void Polygon2DEditor::_uv_draw() {
uvs = node->get_polygon();
}
- const float *weight_r;
+ const float *weight_r = NULL;
if (uv_edit_mode[3]->is_pressed()) {
int bone_selected = -1;
@@ -1044,7 +1044,6 @@ void Polygon2DEditor::_uv_draw() {
}
if (bone_selected != -1 && node->get_bone_weights(bone_selected).size() == uvs.size()) {
-
weight_r = node->get_bone_weights(bone_selected).ptr();
}
}