[Bf-blender-cvs] [64ff38a7a7c] soc-2020-io-performance: Use Map's lookup instead of direct pointer to MTLMaterial

Ankit Meel noreply at git.blender.org
Tue Aug 4 16:00:42 CEST 2020


Commit: 64ff38a7a7cadb917b7c520430da0cfb1e704f53
Author: Ankit Meel
Date:   Tue Aug 4 19:30:38 2020 +0530
Branches: soc-2020-io-performance
https://developer.blender.org/rB64ff38a7a7cadb917b7c520430da0cfb1e704f53

Use Map's lookup instead of direct pointer to MTLMaterial

A direct pointer to a struct no longer points to the internal struct
of the `Map`, it seems. So use lookup which returns the reference too.

===================================================================

M	release/datafiles/locale
M	release/scripts/addons
M	release/scripts/addons_contrib
M	source/blender/io/wavefront_obj/intern/wavefront_obj_im_file_reader.cc
M	source/tools

===================================================================

diff --git a/release/datafiles/locale b/release/datafiles/locale
index 2b3c19f5f61..a7bbfac76c0 160000
--- a/release/datafiles/locale
+++ b/release/datafiles/locale
@@ -1 +1 @@
-Subproject commit 2b3c19f5f61fc72dba56a7edfdc4e55e2327dc1f
+Subproject commit a7bbfac76c00edd0fb79a4766b7ac7c5dcbcac51
diff --git a/release/scripts/addons b/release/scripts/addons
index 49c39f59fbc..bbe0cee094a 160000
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@ -1 +1 @@
-Subproject commit 49c39f59fbc464dd34388990123f271c39eacbf4
+Subproject commit bbe0cee094a48761118f8efe3f9b84ae3f110a2c
diff --git a/release/scripts/addons_contrib b/release/scripts/addons_contrib
index a52733b58d9..f2f4a8b3bfa 160000
--- a/release/scripts/addons_contrib
+++ b/release/scripts/addons_contrib
@@ -1 +1 @@
-Subproject commit a52733b58d95ce60ecde95a9eca242e7319c285a
+Subproject commit f2f4a8b3bfa36ee49f7bdb3a1acb40ef4b39ee3a
diff --git a/source/blender/io/wavefront_obj/intern/wavefront_obj_im_file_reader.cc b/source/blender/io/wavefront_obj/intern/wavefront_obj_im_file_reader.cc
index 3b3e45f5ba9..79a4e5fa913 100644
--- a/source/blender/io/wavefront_obj/intern/wavefront_obj_im_file_reader.cc
+++ b/source/blender/io/wavefront_obj/intern/wavefront_obj_im_file_reader.cc
@@ -462,12 +462,10 @@ void MTLParser::parse_and_store(Map<string, MTLMaterial> &mtl_materials)
     }
 
     if (line_key == "newmtl") {
-      MTLMaterial new_mtl;
-      curr_mtlmat = &new_mtl;
-      mtl_materials.add(rest_line, new_mtl);
+      curr_mtlmat = &mtl_materials.lookup_or_add_default_as(rest_line);
     }
     else if (line_key == "Ns") {
-      copy_string_to_float(line.substr(line_key.size()), 324.0f, curr_mtlmat->Ns);
+      copy_string_to_float(rest_line, 324.0f, curr_mtlmat->Ns);
     }
     else if (line_key == "Ka") {
       Vector<string> str_ka_split{};
diff --git a/source/tools b/source/tools
index 896c5f78952..6a252de776d 160000
--- a/source/tools
+++ b/source/tools
@@ -1 +1 @@
-Subproject commit 896c5f78952adb2d091d28c65086d46992dabdac
+Subproject commit 6a252de776d0b9dca3167c30a7621a4f1e9bc911



More information about the Bf-blender-cvs mailing list