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
2020-11-09Cleanup: clang-formatCampbell Barton
2020-11-06Cleanup: Clang-Tidy modernize-use-nullptrSybren A. Stüvel
Replace `NULL` with `nullptr` in C++ code. No functional changes.
2020-11-06Cleanup: Alembic, simplify expressionSybren A. Stüvel
Change `1 + current_mat++` to `++current_mat`. No functional changes.
2020-11-06Cleanup: Alembic, simplify material assignment codeSybren A. Stüvel
Refactor material assignment code such that: - `build_mat_map()` just returns the built map (instead of relying on modifying a map passed as parameter), - `LISTBASE_FOREACH` is used to loop over a `ListBase` (instead of a hand-crafted for-loop), - just `return` when not enough material slots can be created (instead of setting a boolean to false, then doing some useless work, then checking the boolean), - reorder some code for clarity, and - rename `mat_map` to `matname_to_material` so that the semantics are clearer. No functional changes.
2020-11-06Cleanup: Clang-Tidy, modernize-use-emplaceSergey Sharybin
2020-11-06Cleanup: follow our code style for float literalsCampbell Barton
2020-10-21Cleanup: Clang-tidy readability-redundant-string-initAnkit Meel
No functional change.
2020-10-19Spelling: MiscellaneousHarley Acheson
Corrects 34 miscellaneous misspelled words. Differential Revision: https://developer.blender.org/D9248 Reviewed by Campbell Barton
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-10-07Cleanup: Alembic, fix compiler warning about missing declarationSybren A. Stüvel
Mark the `has_animated_geom_params()` function as `static`, as it's only used in that particular compilation unit. No functional changes.
2020-10-07Fix T81330: Alembic Import ignores constant meshes with animated vertexPhilipp Oeser
colors If the mesh was constant, no check was done if there were animated vertex colors and thus creation of a MeshSequenceCache modifier was skipped. Thx @sybren for feedback! Maniphest Tasks: T81330 Differential Revision: https://developer.blender.org/D9057
2020-09-29Fix T71981: Alembic vertex interpolation can jumble meshSybren A. Stüvel
Add an option to disable Alembic vertex interpolation. Bump subversion from 5 to 6. Alembic stores mesh samples at specific time keys; when a frame in Blender maps to a timecode between two samples, Blender will interpolate the mesh vertex positions. This interpolation only happens when the mesh has a constant topology, but sometimes this was not detected properly when the vertices change order, but the number of mesh elements remains the same. This would result in a mesh with jumbled up vertices (T71981). With this patch, users have the ability to disable vertex interpolation. An alternative would be to have better detection of topology changes, but that that'll cause a considerable slowdown. Maniphest Tasks: T71981 Differential Revision: https://developer.blender.org/D9041
2020-09-28Fix T80967: Alembic, crash when the imported sim from Houdini startsSybren A. Stüvel
Compare mesh loop count with number of loop normals before reading the loop normals. Houdini doesn't always write the correct loop normals to Alembic. When a mesh is animated and then replaced by a fluid simulation, Houdini will still write the original mesh's loop normals, but the mesh verts/loops/polys are from the simulation. In such cases the normals cannot be mapped to the mesh, so it's better to ignore them.
2020-09-10Cleanup: Alembic, inline namespace declarationsSybren A. Stüvel
Replace nested `namespace blender { namespace io { namespace alembic {` with `namespace blender::io::alembic {`. No functional changes.
2020-09-04Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fixSebastian Parborg
No functional changes
2020-08-08Clenup: use STREQ macroCampbell Barton
2020-08-07Cleanup: fixed Clang-Tidy `bugprone-suspicious-string-compare` warningsSybren A. Stüvel
No functional changes.
2020-08-04Refactor: rename SpaceType->new to SpaceType->createJacques Lucke
The data member `new` was conflicting with the `new` keyword when `BKE_screen.h` was included in C++ files. Reviewers: sergey Differential Revision: https://developer.blender.org/D8459
2020-08-03Cleanup: remove trailing space, newlines at eofCampbell Barton
2020-08-03Cycles: add support for rendering deformation motion blur from Alembic caches.Kévin Dietrich
This patch adds the ability to render motion blur from Alembic caches. The motion blur data is derived from a velocity attribute whose name has to be defined by the user through the MeshSequenceCache modifier, with a default value of ".velocities", which is the standard name in Alembic for the velocity property, although other software may ignore it and write velocity with their own naming convention (e.g. "v" in Houdini). Furthermore, a property was added to define how the velocity vectors are interpreted with regard to time : frame or second. "Frame" means that the velocity is already scaled by the time step and we do not need to modify it for it to look proper. "Second" means that the unit the velocity was measured in is in seconds and so has to be scaled by some time step computed here as being the time between two frames (1 / FPS, which would be typical for a simulation). This appears to be common, and is the default behavior. Another property was added to control the scale of the velocity to further modify the look of the motion blur. Reviewed By: brecht, sybren Differential Revision: https://developer.blender.org/D2388
2020-07-18Cleanup: spellingCampbell Barton
2020-07-03Clang-Tidy: Enable readability-redundant-string-cstrJacques Lucke
2020-07-03Clang-tidy: enable readability-container-size-empty warningJacques Lucke
Reviewers: sergey Differential Revision: https://developer.blender.org/D8197
2020-06-30Alembic: new exporter based on the USD exporter structureSybren A. Stüvel
The Alembic exporter has been restructured by leverages the `AbstractHierarchyIterator` introduced by the USD exporter. The produced Alembic files have not changed much (details below), as the Alembic writing code has simply been moved from the old exporter to the new. How the export hierarchy is handled changed a lot, though, and also the way in which transforms are computed. As a result, T71395 is fixed. Differences between the old and new exporter, in terms of the produced Alembic file: - Duplicated objects now have a unique numerical suffix. - Matrices are computed differently, namely by simply computing the evaluated transform of the object relative to the evaluated transform of its export-parent. This fixes {T71395}, but otherwise should produce the same result as before (but with simpler code). Compared to the old Alembic exporter, Subdivision modifiers are now disabled in a cleaner, more efficient way (they are disabled when exporting with the "Apply Subdivisions" option is unchecked). Previously the exporter would move to a new frame, disable the modifier, evaluate the object, and enable the modifier again. This is now done before exporting starts, and modifiers are only restored when exporting ends. Some issues with the old Alembic exporter that have NOT been fixed in this patch: - Exporting NURBS patches and curves (see T49114 for example). - Exporting flattened hierarchy in combination with dupli-objects. This seems to be broken in the old Alembic exporter as well, but nobody reported this yet. Differential Revision: https://developer.blender.org/D7664 Reviewed By: Sergey
2020-06-22Fix T77754: Crash after any alembic import undo in an empty sceneSybren A. Stüvel
Thanks @mont29 for this patch. This creates an explicit undo step after the Alembic importer has finished running. This is necessary when the importer runs as a background job.
2020-06-19Cleanup: Alembic, replace `ABC_INLINE` with `BLI_INLINE`Sybren A. Stüvel
The `ABC_INLINE` macro has been in the Alembic code since it was introduced to Blender in rB61050f75b13e. It basically does the same a `BLI_INLINE`, though, so there is no need to keep it around.
2020-06-19Cleanup: Alembic, removed some unnecessary `extern "C" {}` declarationsSybren A. Stüvel
No functional changes.
2020-06-19Cleanup: Alembic, replace `#ifndef` guards with `#pragma once`Sybren A. Stüvel
No functional changes.
2020-06-19Cleanup: Alembic, move the C++ code to `blender::io::alembic` namespaceSybren A. Stüvel
This commit only moves code into the `blender::io::alembic` namespace, it does not move `static` functions into an anonymous namespace. No functional changes.
2020-06-19Cleanup: Alembic, moved exporter code into separate directorySybren A. Stüvel
This moves most of the exporter-related code from `source/blender/io/alembic/intern` to `source/blender/io/alembic/exporter` This is to prepare the Alembic code for the switchover to using `blender::io::AbstractHierarchyIterator`. When that happens, a few more files will be added, and having things in a separate 'exporter' directory makes things less cluttered. Note that exporting consists of multiple steps (determine export hierarchy, create Alembic archive, and then write data into it), which is why the directory is called "exporter", but many of the files are called "writer". No functional changes.
2020-06-19Alembic: always export transforms as inheritingSybren A. Stüvel
Blender now always exports transforms as as "inheriting", as Blender has no concept of parenting without inheriting the transform. Previously only objects with an actual parent were marked as "inheriting", and parentless objects as "non-inheriting". However, certain packages (for example USD's Alembic plugin) are incompatible with non-inheriting transforms and will completely ignore such transforms, placing all such objects at the world origin. When importing non-inheriting transforms from Alembic, Blender will break the parent-child relation and thus force the child to (correctly) interpret the transform as world matrix.
2020-06-19Alembic: prevent spaces in names of exported particle systemsSybren A. Stüvel
Other types already had spaces, periods, and colons replaced by underscores. The upcoming Alembic exporter (based on the `AbstractHierarcyIterator` class) will be more consistent and apply the same naming rules everywhere. This is in preparation for that change. The `get_…_name()` functions in `abc_util.{cc,h}` will be removed then.
2020-06-19Alembic: export object data with object data nameSybren A. Stüvel
Previously the Alembic exporter exported a mesh object to `{object.name}/{object.name}Shape`. Now it exports to `{object.name}/{mesh.name}` instead. The same change also applies to other object data types. Note that the code now is a bit hackish, as `m_name` is set even in cases where it isn't used. This hackishness was already there, though, but it's now just more visible. This will all be cleaned up when the Alembic exporter is ported to use the `AbstractHierarchyImporter` structure of the Universal Scene Description (USD) exporter. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D7672
2020-06-15Alembic: remove support for HDF5 archive formatSybren A. Stüvel
Alembic is not a single file format, it can be stored in two different ways: Ogawa and HDF5. Ogawa replaced HDF5 and is smaller and much faster (4-25x) to read ([source](http://exocortex.com/blog/alembic_is_about_to_get_really_fast)). As long as Blender has had Alembic support, it has never supported the HDF5 format in any release. There is a build option `WITH_ALEMBIC_HDF5` that can be used to enable HDF5 support in your own build. This commit removes this build option and the code that it manages. In the years that I have been maintainer of Blender's Alembic code, I only remember getting a request to support HDF5 once, and that was to support very old software that has likely since then been updated to support Ogawa. Ubuntu and Fedora also seem to bundle Blender without HDF5 support. This decision was discussed on [DevTalk](https://devtalk.blender.org/t/alembic-hdf5-support-completely-remove) where someone also mentioned that there is a tool available that can convert HDF5 files to the Ogawa format.
2020-06-13Cleanup: naming for lattice deform functionsCampbell Barton
- BKE_lattice_deform_data_create was init_latt_deform. - BKE_lattice_deform_data_destroy was end_latt_deform. - BKE_lattice_deform_data_eval_co was calc_latt_deform.
2020-05-29Merge branch 'blender-v2.83-release'Brecht Van Lommel
2020-05-29Blender: change bugfix release versioning from a/b/c to .1/.2/.3Brecht Van Lommel
The file subversion is no longer used in the Python API or user interface, and is now internal to Blender. User interface, Python API and file I/O metadata now use more consistent formatting for version numbers. Official releases use "2.83.0", "2.83.1", and releases under development use "2.90.0 Alpha", "2.90.0 Beta". Some Python add-ons may need to lower the Blender version in bl_info to (2, 83, 0) or (2, 90, 0) if they used a subversion number higher than 0. https://wiki.blender.org/wiki/Reference/Release_Notes/2.83/Python_API#Compatibility This change is in preparation of LTS releases, and also brings us more in line with semantic versioning. Fixes T76058. Differential Revision: https://developer.blender.org/D7748
2020-05-28Cleanup: spellingCampbell Barton
2020-05-26Merge remote-tracking branch 'origin/blender-v2.83-release'Sybren A. Stüvel
2020-05-26Fix T77021: Alembic export of animated mesh with multiple UV maps failsSybren A. Stüvel
This was caused by a side-effect of our exporting code's memory management (Alembic considers data "written" and "final" when its C++ objects go out of scope) in combination with my change in rB65574463fa2d. I removed an "only export UVs on the first frame" clause because it was unclear why this restriction was there. As it turns out, it breaks the export of the 2nd and subsequent UV maps on an animated mesh. Effectively, on every frame the Alembic library thought we want to create a new UV map, instead of continuing to write a new frame of data to the existing one. This is resolved by keeping a reference to the C++ objects for the UV maps in memory while the exporter is running.
2020-05-18Alembic: Fix bad allocation with invalid knots dataSergey Sharybin
It is not impossible that the number of knots is stored wrong in the file (for example, it will be 1 knot only). This change fixes bad memory allocation and bad memory access in such cases. It also fixes strict compiler warning which was mentioning that the allocation size is wrong), There isn't really the correct way of dealing with such situation, so simply fall back to Blender's knots calculation. Differential Revision: https://developer.blender.org/D7765
2020-05-15Merge remote-tracking branch 'origin/blender-v2.83-release'Sybren A. Stüvel
2020-05-15Fix T76695: Not exporting normals properly in Alembic formatSybren A. Stüvel
When auto-smooth enabled, but no custom normals layer present, the Alembic exporter would incorrectly assume the mesh was shaded smooth. This is now corrected, and normals are always written when auto-smooth is enabled.
2020-05-12Merge remote-tracking branch 'origin/blender-v2.83-release'Sybren A. Stüvel
2020-05-12Fix T76132: Can't import Alembic with changing UVsSybren A. Stüvel
In the Alembic importer, the animation of UVs and normals was overlooked; when the mesh geometry is not animated, the entire mesh was considered constant. T76132 concerns both the exporting and importing of changing UVs. This commit fixes the importing.
2020-05-12Fix T76132: Can't export Alembic with changing UVsSybren A. Stüvel
In the Alembic exporter, UVs were only exported on the first frame. This is an issue, as when exporting an animated mesh the topology can change, and then the UV coordinates of the first frame are no longer valid. T76132 concerns both exporting and importing changing UVs. This fixes the exporting.
2020-05-12Merge branch 'blender-v2.83-release'Campbell Barton
2020-05-12Fix T76514: Invalid geometry in Alembic crashes BlenderSybren A. Stüvel
Even though {T76514} is caused by invalid geometry, and thus technically constitutes a bug in the software that created the Alembic file, I would like Blender not to crash on importing such a file. The error in the Alembic file consists of invalid mesh loops, where consecutive loops refer to the same vertex. The `BKE_mesh_validate()` can actually correct these errors, so this commit focuses on two things: - Letting Blender survive the situation until the mesh is loaded, and - Detecting the error so that `BKE_mesh_validate()` can be called only when necessary. This ensures there is only a minimal impact on performance when loading actually valid data. Differential Revision: https://developer.blender.org/D7703 Reviewed By: JacquesLucke
2020-05-09Cleanup: double-spaces in commentsCampbell Barton
2020-05-08Cleanup: take includes out of 'extern "C"' blocksJacques Lucke
Surrounding includes with an 'extern "C"' block is not necessary anymore. Also that made it harder to add any C++ code to some headers, or include headers that have "optional" C++ code like `MEM_guardedalloc.h`. I tested compilation on linux and windows (and got help from @LazyDodo). If this still breaks compilation due to some linker error, the header containing the symbol in question is probably missing an 'extern "C"' block. Differential Revision: https://developer.blender.org/D7653