Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-11-10Merge remote-tracking branch 'origin/master' into tmp-vfx-platform-2023Ray Molenkamp
2022-11-09Merge branch 'blender-v3.4-release'Brecht Van Lommel
2022-11-09Fix T100883: crash with particle instancing and clumpingBrecht Van Lommel
Properly initialize clump curve mapping tables for duplis and other cases where this was missed by making a generic init/free function instead of duplicating the same logic in multiple places. Also fold lattice deform init into this.
2022-11-09Merge remote-tracking branch 'origin/master' into tmp-vfx-platform-2023Ray Molenkamp
2022-11-08Merge branch 'blender-v3.4-release'Sergey Sharybin
2022-11-08Fix deprecation warnings about printf() on macOSSergey Sharybin
The new Xcode 14.1 brings the new Apple Clang compiler which considers sprintf unsafe and geenrates deprecation warnings suggesting to sue snprintf instead. This only happens for C++ code by default, and C code can still use sprintf without any warning. This changes does the following: - Whenever is trivial replace sprintf() with BLI_snprintf. - For all other cases use the newly introduced BLI_sprintf which is a wrapper around sprintf() but without warning. There is a discouragement note in the BLI_sprintf comment to suggest use of BLI_snprintf when the size is known. Differential Revision: https://developer.blender.org/D16410
2022-11-05Merge remote-tracking branch 'origin/master' into tmp-vfx-platform-2023Ray Molenkamp
2022-11-05OBJ Export: Remove edge recalculationHans Goudey
The removed function call removes all attributes from mesh edges and rebuilds the mesh edge topology. This isn't necessary because meshes always have edges in the first place. Exporting a 4 million face grid, this saved 1.5 seconds out of 4 seconds total for the whole export. Tests files have to be updated, since the edge calculation could potentially change the order of elements. This is also a fix, since previously the exporter would delete all attributes on the evaluated mesh edges. Differential Revision: https://developer.blender.org/D16391
2022-11-05Cleanup: Remove redundant assignment of loose edge flagHans Goudey
This is assigned by `BKE_mesh_calc_edges_loose` a few lines below.
2022-11-05Cleanup: use bool instead of short for job stop & do_update argumentsCampbell Barton
Since these values are only ever 0/1, use bool type.
2022-11-04Cleanup: OBJ: Simplify access to loose edgesHans Goudey
Implementing this with a separate function just added extra code, there wasn't much benefit to it.
2022-11-04Cleanup: Mesh: Remove redundant edge render flagHans Goudey
Currently there are both "EDGERENDER" and "EDGEDRAW" flags, which are almost always used together. Both are runtime data and not exposed to RNA, used to skip drawing some edges after the subdivision surface modifier. The render flag is a relic of the Blender internal renderer. This commit removes the render flag and replaces its uses with the draw flag.
2022-11-03Merge remote-tracking branch 'origin/master' into tmp-vfx-platform-2023Ray Molenkamp
2022-11-03Cleanup: cmake comment line lengthCampbell Barton
2022-11-02Refactor: Rename Object->imat to Object->world_to_objectSergey Sharybin
The goal is to improve clarity and readability, without introducing big design changes. Follows the recent obmat to object_to_world refactor: the similar naming is used, and it is a run-time only rename, meaning, there is no affect on .blend files. This patch does not touch the redundant inversions. Those can be removed in almost (if not all) cases, but it would be the best to do it as a separate change. Differential Revision: https://developer.blender.org/D16367
2022-11-02Merge remote-tracking branch 'origin/master' into tmp-vfx-platform-2023Ray Molenkamp
2022-11-01USD IO: replace deprecated primvars API.Michael Kowalski
Updated the code to use the UsdGeomPrimvarsAPI class to read and write mesh primvars instead of the now deprecated primvars accessors in UsdGeomImageable. This will be required to build with USD 22.11 in the future, where the deprecated functions have been removed.
2022-11-01USD tests: replace deprecated imaging code.Michael Kowalski
UsdImagingCapsuleAdapter static functions GetMeshPoints() and GetTopology() have been removed in USD 22.11. In anticipation of this upcoming change, I've updated the test code to call the corresponding virtual functions instead.
2022-11-01Refactor: Rename Object->obmat to Object->object_to_worldSergey Sharybin
Motivation is to disambiguate on the naming level what the matrix actually means. It is very easy to understand the meaning backwards, especially since in Python the name goes the opposite way (it is called `world_matrix` in the Python API). It is important to disambiguate the naming without making developers to look into the comment in the header file (which is also not super clear either). Additionally, more clear naming facilitates the unit verification (or, in this case, space validation) when reading an expression. This patch calls the matrix `object_to_world` which makes it clear from the local code what is it exactly going on. This is only done on DNA level, and a lot of local variables still follow the old naming. A DNA rename is setup in a way that there is no change on the file level, so there should be no regressions at all. The possibility is to add `_matrix` or `_mat` suffix to the name to make it explicit that it is a matrix. Although, not sure if it really helps the readability, or is it something redundant. Differential Revision: https://developer.blender.org/D16328
2022-10-25Merge remote-tracking branch 'origin/master' into tmp-vfx-platform-2023Ray Molenkamp
2022-10-21Fix: USD & Alembic importers might not initialize material indicesHans Goudey
f1c0249f34c4171ec incorrectly assumed that the importer functions that assigned material indices set all of the values, but that isn't true for all files.
2022-10-19Cleanup: CMake include pathsCampbell Barton
Remove redundant separators & redundant references to parent paths.
2022-10-17Cleanup: replace BLI_join_dirfile with BLI_path_joinCampbell Barton
These functions are almost identical, the main difference being BLI_join_dirfile didn't trim existing slashes when joining paths however this isn't an important difference that warrants a separate function.
2022-10-17BLI_path: remove trailing NULL argument to BLI_path_joinCampbell Barton
Using varargs had the disadvantages, replace with a macro which has some advantages. - Arguments are type checked. - Less verbose. - Unintended NULL arguments would silently terminate joining paths. - Passing in a NULL argument warns with GCC.
2022-10-11Merge remote-tracking branch 'origin/master' into tmp-vfx-platform-2023Ray Molenkamp
2022-10-10IO: remove BKE_layer_collection_resync_forbid & allowAras Pranckevicius
Part of T101073: after the view layer sync was made lazy (D15885), the BKE_layer_collection_resync_forbid and BKE_layer_collection_resync_allow in Alembic/USD/OBJ importers is no longer needed, as long as they do view layer dependent operations (selecting new objects) in a separate loop after creating all the objects. Verified that this does not regress import times for 26k objects OBJ scene (Blender 3.0 splash) and 250k objects USD scene (Moana).
2022-10-10OBJ: add global scale factor import settingAras Pranckevicius
Requested in D16095 proposal - also USD & Alembic have import scale option; OBJ has an export scale object but the import scale was not there for some reason.
2022-10-10Cleanup: spelling in commentsCampbell Barton
2022-10-09Fix T101685: OBJ importer does not assign proper material if "usemtl" is ↵Aras Pranckevicius
before "o" The importer logic was wrongly resetting "current material name" upon encountering a new object ("o" command). However as per OBJ specification, this is incorrect: > Specifies the material name for the element following it. Once a > material is assigned, it cannot be turned off; it can only be > changed. Fixes T101685. Test coverage for this was added in svn tests repo.
2022-10-09OBJ: extend importer tests to test imported material expectationsAras Pranckevicius
Previously "which material got assigned to an object in the end" was not covered by tests. This is preparation for fixing T101685.
2022-10-07Cleanup: redundant parenthesisCampbell Barton
2022-10-05Merge remote-tracking branch 'origin/master' into tmp-vfx-platform-2023Ray Molenkamp
2022-10-04Cleanup: replace UNUSED macro with commented args in C++ codeHans Goudey
This is the conventional way of dealing with unused arguments in C++, since it works on all compilers. Regex find and replace: `UNUSED\((\w+)\)` -> `/*$1*/`
2022-10-03Fix T101487: New OBJ importer handles UVs incorrectly when some faces of an ↵Aras Pranckevicius
object don't have UVs The UV data filling logic was incorrectly just skipping over loop entries that don't have a UV coordinate, instead of assigning the default zero UV for them. This was a problem only for meshes where some faces did have UVs, but some other faces did not (T101487).
2022-09-26Cleanup: restore parenthesis removed in recent commitCampbell Barton
Partial revert [0], removed by accident because the -fpermissive flag was enabled with collada. [0]: 34477bbfcde34d0b27f04eccdddd0a093d8be1c0
2022-09-26Cleanup: replace C-style casts with functional casts for numeric typesCampbell Barton
Use function style casts in C++ headers & source.
2022-09-26Cleanup: remove redundant parenthesisCampbell Barton
2022-09-26Cleanup: use ELEM/STR_ELEM/STREQ macrosCampbell Barton
2022-09-26CMake: remove workaround for GCC 4.5 as 9.3.1 is the minimum versionCampbell Barton
The -fpermissive flag is best avoided as it suppresses some important warnings/errors.
2022-09-26Cleanup: fix warning in recent parenthesis removalCampbell Barton
Regression in [0], this slipped through due to "-fpermissive" being added to GCC flags, suppressing the error. [0]: c9e35c2ced92082c86f1ecb9ecd16c6230218c7c
2022-09-26Cleanup: use 'u' prefixed integer types for brevity in C codeCampbell Barton
This also simplifies using function style casts when moving to C++.
2022-09-25Cleanup: remove redundant parenthesis (especially with macros)Campbell Barton
2022-09-25Cleanup: replace C-style casts with functional casts for numeric typesCampbell Barton
Some changes missed from f68cfd6bb078482c4a779a6e26a56e2734edb5b8.
2022-09-25Cleanup: replace C-style casts with functional casts for numeric typesCampbell Barton
2022-09-25Cleanup: replace static_casts with functional casts for numeric typesCampbell Barton
2022-09-25Cleanup: use 'u' prefixed integer types for brevity & cast styleCampbell Barton
To use function style cast '(unsigned char)x' can't be replaced by 'unsigned char(x)'.
2022-09-25Cleanup: remove redundant double parenthesisCampbell Barton
2022-09-23Mesh: Move selection flags to generic attributesHans Goudey
Using the attribute name semantics from T97452, this patch moves the selection status of mesh elements from the `SELECT` of vertices, and edges, and the `ME_FACE_SEL` of faces to generic boolean attribute Storing this data as generic attributes can significantly simplify and improve code, as described in T95965. The attributes are called `.select_vert`, `.select_edge`, and `.select_poly`. The `.` prefix means they are "UI attributes",so they still contain original data edited by users, but they aren't meant to be accessed procedurally by the user in arbitrary situations. They are also be hidden in the spreadsheet and the attribute list. Until 4.0, the attributes are still written to and read from the mesh in the old way, so neither forward nor backward compatibility are affected. This means memory requirements will be increased by one byte per element when selection is used. When the flags are removed completely, requirements will decrease. Further notes: * The `MVert` flag is empty at runtime now, so it can be ignored. * `BMesh` is unchanged, otherwise the change would be much larger. * Many tests have slightly different results, since the selection attribute uses more generic propagation. Previously you couldn't really rely on edit mode selections being propagated procedurally. Now it mostly works as expected. Similar to 2480b55f216c Ref T95965 Differential Revision: https://developer.blender.org/D15795
2022-09-23Mesh: Move edge crease out of MEdgeHans Goudey
This is very similar to D14077. There are two differences though. First is that vertex creases are already stored in a separate layer, and second is that we can now completely remove use of `Mesh.cd_flag`, since that information is now inherent to whether the layers exist. There are two functional differences here: * Operators are used to add and remove layers instead of a property. * The "crease" attribute can be created and removed by geometry nodes. The second change should make various geometry nodes slightly faster, since the "crease" attribute was always processed before. Creases are now interpolated generically in the CustomData API too, which should help maintain the values across edits better. Meshes get an `edge_creases` RNA property like the existing vertex property, to provide more efficient access to the data in Cycles. One test failure is expected, where different rounding between float the old char storage means that 5 additional points are scattered in a geometry nodes test. Differential Revision: https://developer.blender.org/D15927
2022-09-23Depsgraph: generalize passing parameters to depsgraph object iteratorJacques Lucke
This makes it easier to pass more parameters to the iterator in the future. Differential Revision: https://developer.blender.org/D16047