Blender Git Commits

Blender Git "soc-2020-io-performance" branch commits.

Page: 14 / 23

August 8, 2020, 19:42 (GMT)
Use std::string_view for string splitting.

While being slightly more error prone, this change
gives a speedup of 1.9 s vs 1.2 s on a 23.3 MB 8-level
subdivided cube OBJ file. [1] The biggest time sink earlier
was splitting strings into smaller ones. Now it is `std::stof`
about which nothing much can be done.

`StringRef` has been completely removed to avoid
casts between `std::string_view::size_type` & `int64_t`
that `StringRef::size()` gives. Also, `find_{first/last}_{not/}_of`
and `substr` have been used a lot, which are missing in `StrinRef`.

The change also removes `rn` carriage return line breaks
while cleaning up the string.

Use `blender::StringRefNull` where null-terminated strings
are present.

`fprintf` has been replaced with `std::cerr` since
`std::string_view::data()` may give a pointer to a non
null terminated buffer. Also, error logging is not performance
-critical. [2]

[1] See week 7 reports for breakdown on the older timings.
https://wiki.blender.org/wiki/User:Ankitm/GSoC_2020_Daily_Reports#Week_7
[2] https://en.cppreference.com/w/cpp/string/basic_string_view/data
August 7, 2020, 21:28 (GMT)
Remove deleted header from CMakeLists.txt
August 7, 2020, 18:58 (GMT)
Use pragma once
August 7, 2020, 18:29 (GMT)
Merge branch 'master' into soc-2020-io-performance
August 7, 2020, 14:16 (GMT)
Fix crash due to OBJ files with no `o name` line

In some exporters, the group serves as the object name.

Also add some asserts.

Rename `list_of_objects` to `all_geometries`.
August 6, 2020, 15:16 (GMT)
Merge branch 'master' into soc-2020-io-performance
August 6, 2020, 14:37 (GMT)
Cleanup: Renaming, comments.
August 6, 2020, 13:33 (GMT)
Don't add null Image* to the p-BSDF node.
August 6, 2020, 11:11 (GMT)
Clean-up: Warnings, renaming variables.
August 6, 2020, 10:58 (GMT)
Avoid .data() while creating a std::string from StringRef.
August 6, 2020, 10:57 (GMT)
Remove OBJ prefix from containers.

That is indicated by the namespace itself..
Revision d660455 by Ankit Meel (soc-2020-io-performance)
August 6, 2020, 10:38 (GMT)
Cleanup: Remove Raw* terminology, use geom_type.

After discussion with the mentors [1], the terminology to use
Raw has been removed & `Geometry` is the new name for
"raw objects". eGeometryType has also been added to remove
confusion with OB_MESH etc.

`std::unique_ptr<T > *a` has been replaced with `T *a`.

Naming changes:

`curr_ob` -> `current_geometry` in the parser &
`geometry` in the `Mesh` & `Curve` creators.

`mesh_from_raw_` -> `blender_mesh_`. Similar for curve.

[1]: https://docs.google.com/document/d/17Uzl47OljjoKgaMbukiLHUVGQP220lPTmPS-atb65mw/
August 6, 2020, 09:34 (GMT)
Replace std::string_view with StringRef.

Add comments.
August 5, 2020, 20:11 (GMT)
Merge branch 'master' into soc-2020-io-performance
August 5, 2020, 20:09 (GMT)
Replace enum and its functions with Map for maps

The enum approach was adding lots of repetitive functions
and switch-case blocks. Use `blender::Map` instead.

Also fix nodes overlapping.

Connect Texture nodes with correct sockets of p-BSDF.
August 5, 2020, 17:39 (GMT)
Add created material to the object.
August 5, 2020, 14:57 (GMT)
Create image for image texture node.

Also keep pointer to MTLMaterial in the class itself.
August 5, 2020, 14:54 (GMT)
Cleanup: clang-tidy warnings

else after return.

"..." can be made a static function instead of member function.
August 4, 2020, 15:57 (GMT)
Fix bsdf_ being null; asserts for SOCK_RGBA

Use `ntreeType_Shader->idname` instead of manually entering the
ID to avoid mistakes (which I did!
`ShaderNodeTree` vs `ShaderNodetree`).

Add assert in case caller doesn't own the `nodetree_`.

Fix passing `float a, int b` to `Span` instead
of `float *, size_t size`.
August 4, 2020, 14:00 (GMT)
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.
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021