summaryrefslogtreecommitdiff
path: root/modules/fbx/data
diff options
context:
space:
mode:
authorMarcel Admiraal <madmiraal@users.noreply.github.com>2020-12-15 12:04:21 +0000
committerMarcel Admiraal <madmiraal@users.noreply.github.com>2020-12-28 10:39:56 +0000
commit5b937d493f0046543a77a0be7920ad39f1e5fc3c (patch)
tree975e0a7384bc6fc7cf5b73b9ddc1e8eef13579d8 /modules/fbx/data
parent886571e0fc54914f161ab3f1ccf9bfe40411bc20 (diff)
Rename empty() to is_empty()
Diffstat (limited to 'modules/fbx/data')
-rw-r--r--modules/fbx/data/fbx_material.cpp6
-rw-r--r--modules/fbx/data/fbx_mesh_data.cpp16
2 files changed, 11 insertions, 11 deletions
diff --git a/modules/fbx/data/fbx_material.cpp b/modules/fbx/data/fbx_material.cpp
index b00ac2083e..3da9e4e1ff 100644
--- a/modules/fbx/data/fbx_material.cpp
+++ b/modules/fbx/data/fbx_material.cpp
@@ -42,7 +42,7 @@ void FBXMaterial::set_imported_material(FBXDocParser::Material *p_material) {
}
void FBXMaterial::add_search_string(String p_filename, String p_current_directory, String search_directory, Vector<String> &texture_search_paths) {
- if (search_directory.empty()) {
+ if (search_directory.is_empty()) {
texture_search_paths.push_back(p_current_directory.get_base_dir().plus_file(p_filename));
} else {
texture_search_paths.push_back(p_current_directory.get_base_dir().plus_file(search_directory + "/" + p_filename));
@@ -188,7 +188,7 @@ Ref<StandardMaterial3D> FBXMaterial::import_material(ImportState &state) {
spatial_material->set_transparency(BaseMaterial3D::TRANSPARENCY_ALPHA);
}
- ERR_CONTINUE_MSG(file_extension.empty(), "your texture has no file extension so we had to ignore it, let us know if you think this is wrong file an issue on github! " + debug_string);
+ ERR_CONTINUE_MSG(file_extension.is_empty(), "your texture has no file extension so we had to ignore it, let us know if you think this is wrong file an issue on github! " + debug_string);
ERR_CONTINUE_MSG(fbx_texture_map.count(fbx_mapping_name) <= 0, "This material has a texture with mapping name: " + String(fbx_mapping_name.c_str()) + " which is not yet supported by this importer. Consider opening an issue so we can support it.");
ERR_CONTINUE_MSG(
file_extension_uppercase != "PNG" &&
@@ -211,7 +211,7 @@ Ref<StandardMaterial3D> FBXMaterial::import_material(ImportState &state) {
texture = state.cached_image_searches[texture_name];
} else {
String path = find_texture_path_by_filename(texture_name, p_fbx_current_directory);
- if (!path.empty()) {
+ if (!path.is_empty()) {
Ref<Texture2D> image_texture = ResourceLoader::load(path);
ERR_CONTINUE(image_texture.is_null());
diff --git a/modules/fbx/data/fbx_mesh_data.cpp b/modules/fbx/data/fbx_mesh_data.cpp
index 0728866adb..d1c4b70b5c 100644
--- a/modules/fbx/data/fbx_mesh_data.cpp
+++ b/modules/fbx/data/fbx_mesh_data.cpp
@@ -38,7 +38,7 @@
template <class T>
T collect_first(const Vector<VertexData<T>> *p_data, T p_fall_back) {
- if (p_data->empty()) {
+ if (p_data->is_empty()) {
return p_fall_back;
}
@@ -47,7 +47,7 @@ T collect_first(const Vector<VertexData<T>> *p_data, T p_fall_back) {
template <class T>
HashMap<int, T> collect_all(const Vector<VertexData<T>> *p_data, HashMap<int, T> p_fall_back) {
- if (p_data->empty()) {
+ if (p_data->is_empty()) {
return p_fall_back;
}
@@ -61,7 +61,7 @@ HashMap<int, T> collect_all(const Vector<VertexData<T>> *p_data, HashMap<int, T>
template <class T>
T collect_average(const Vector<VertexData<T>> *p_data, T p_fall_back) {
- if (p_data->empty()) {
+ if (p_data->is_empty()) {
return p_fall_back;
}
@@ -76,7 +76,7 @@ T collect_average(const Vector<VertexData<T>> *p_data, T p_fall_back) {
}
HashMap<int, Vector3> collect_normal(const Vector<VertexData<Vector3>> *p_data, HashMap<int, Vector3> p_fall_back) {
- if (p_data->empty()) {
+ if (p_data->is_empty()) {
return p_fall_back;
}
@@ -89,7 +89,7 @@ HashMap<int, Vector3> collect_normal(const Vector<VertexData<Vector3>> *p_data,
}
HashMap<int, Vector2> collect_uv(const Vector<VertexData<Vector2>> *p_data, HashMap<int, Vector2> p_fall_back) {
- if (p_data->empty()) {
+ if (p_data->is_empty()) {
return p_fall_back;
}
@@ -231,7 +231,7 @@ EditorSceneImporterMeshNode3D *FBXMeshData::create_fbx_mesh(const ImportState &s
// Phase 2. For each material create a surface tool (So a different mesh).
{
- if (polygon_surfaces.empty()) {
+ if (polygon_surfaces.is_empty()) {
// No material, just use the default one with index -1.
// Set -1 to all polygons.
const int polygon_count = count_polygons(polygon_indices);
@@ -990,7 +990,7 @@ void FBXMeshData::triangulate_polygon(Ref<SurfaceTool> st, Vector<int> p_polygon
}
void FBXMeshData::gen_weight_info(Ref<SurfaceTool> st, Vertex vertex_id) const {
- if (vertex_weights.empty()) {
+ if (vertex_weights.is_empty()) {
return;
}
@@ -1417,7 +1417,7 @@ void FBXMeshData::extract_morphs(const FBXDocParser::MeshGeometry *mesh_geometry
const std::vector<const FBXDocParser::ShapeGeometry *> &shape_geometries = blend_shape_channel->GetShapeGeometries();
for (const FBXDocParser::ShapeGeometry *shape_geometry : shape_geometries) {
String morph_name = ImportUtils::FBXAnimMeshName(shape_geometry->Name()).c_str();
- if (morph_name.empty()) {
+ if (morph_name.is_empty()) {
morph_name = "morph";
}