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
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-18Fix T88605: Alembic import crashes when missing `arbGeomParams`Sybren A. Stüvel
Add check for the `arbGeomParams` property being valid, before attempting to access a sub-property from it.
2021-06-16Alembic: support reading per-vertex UV setsKévin Dietrich
This adds support for importing UV sets which are defined per vertex, instead of per face corners. Such UV sets can be generated when the mesh is split according to UV islands, or when there is only one UV island, in which cases only a single UV value can be stored per vertex since vertices will never be on a seam. Reviewed By: sybren Differential Revision: https://developer.blender.org/D11584
2021-05-19Cleanup: use nullptrJacques Lucke
2021-05-18Alembic: read/write generated coordinates of meshesSybren A. Stüvel
Read and write generated coordinates (also known as "original coordinates", "reference coordinates", or "orcos") from and to Alembic. A custom geometry property named "Pref" is used for (hopefully) interoperability with Maya and Houdini. For now it's only guaranteed for Blender-to-Blender. Export: writing generated coordinates is optional (on by default). Import: generated coordinates are always read whenever the reading of vertex data is enabled. Manifest Task: T88081
2021-05-17Merge branch 'blender-v2.93-release'Brecht Van Lommel
2021-05-17Fix T86278: vertex color baking not working with modifiersBrecht Van Lommel
As in the old Blender Internal baking code, this still relies on there being a good mapping to the original vertices.
2021-05-06Alembic export: export UV maps on every frameSybren A. Stüvel
Export UV maps to Alembic on every frame. This makes the export of UV maps consistent with mesh normals. In the case of static UV maps it may cause a slight slowdown (since they're exported on every frame now), but due to the deduplication performed by the Alembic library, the resulting files will be the same size anyway. Thanks to @CodyWinch for providing the solution to the problem, and writing the original patch D8397. Differential Revision: https://developer.blender.org/D8397
2021-04-08Cleanup: enable modernize-use-equals-default checkJacques Lucke
This removes a lot of unnecessary code that is generated by the compiler automatically. In very few cases, a defaulted destructor in a .cc file is still necessary, because of forward declarations in the header. I removed some defaulted virtual destructors, because they are not necessary, when the parent class has a virtual destructor already. Defaulted constructors are only necessary when there is another constructor, but the class should still be default constructible. Differential Revision: https://developer.blender.org/D10911
2021-02-15Fix: wrong clang tidy cleanupJacques Lucke
This reverts a part of rBd3960164163c910d5031a8f076c41b39e0a5503d. It is not a `std::shared_ptr` but a `boost::shared_ptr`. This could probably be fixed differently, but `NOLINT` is fine now.
2021-02-15Cleanup: clang tidyJacques Lucke
2021-02-05Cleanup: Modernize type definition in AlembicSergey Sharybin
Use newer `using` semantic for type definition. Solves modernize-use-using Clang-Tidy warning.
2021-02-05Cleanup: correct spelling in commentsCampbell Barton
2021-01-20Cleanup: remove extra in trailing asteriskCampbell Barton
Comment blocks not conforming to convention.
2020-12-16Cleanup: remove redundant struct declarationsCampbell Barton
2020-12-15Cleanup: reduce indirect DNA header inclusionCampbell Barton
Remove DNA headers, using forward declarations where possible. Also removed duplicate header, header including it's self and unnecessary inclusion of libc system headers from BKE header.
2020-12-07Cleanup: partial Clang-Tidy modernize-loop-convertSybren A. Stüvel
Modernize loops by using the `for(type variable : container)` syntax. Some loops were trivial to fix, whereas others required more attention to avoid semantic changes. I couldn't address all old-style loops, so this commit doesn't enable the `modernize-loop-convert` rule. Although Clang-Tidy's auto-fixer prefers to use `auto` for the loop variable declaration, I made as many declarations as possible explicit. To me this increases local readability, as you don't need to fully understand the container in order to understand the loop variable type. No functional changes.
2020-12-04Cleanup: Clang-Tidy, modernize-use-overrideSybren A. Stüvel
No functional changes.
2020-12-04Cleanup: Clang-Tidy, modernize-deprecated-headersSybren A. Stüvel
No functional changes.
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: use ELEM macroCampbell Barton
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-14Alembic export: write custom propertiesSybren A. Stüvel
Write custom properties (aka ID properties) to Alembic, to the `.userProperties` compound property. Manifest Task: https://developer.blender.org/T50725 Scalar properties (so single-value/non-array properties) are written as single-element array properties to Alembic. This is also what's done by Houdini and Maya exporters, so it seems to be the standard way of doing things. It also simplifies the implementation. Two-dimensional arrays are flattened by concatenating all the numbers into a single array. This is because ID properties have a limited type system. This means that a 3x3 "matrix" could just as well be a list of three 3D vectors. Alembic has two container properties to store custom data: - `.userProperties`, which is meant for properties that aren't necessarily understood by other software packages, and - `.arbGeomParams`, which can contain the same kind of data as `.userProperties`, but can also specify that these vary per face of a mesh. This property is mostly intended for renderers. Most industry packages write their custom data to `.arbGeomParams`. However, given their goals I feel that `.userProperties` is the more appropriate one for Blender's ID Properties. The code is a bit more involved than I would have liked. An `ABCAbstractWriter` has a `uniqueptr` to its `CustomPropertiesExporter`, but the `CustomPropertiesExporter` also has a pointer back to its owning `ABCAbstractWriter`. It's the latter pointer that I'm not too happy with, but it has a reason. Getting the aforementioned `.userProperties` from the Alembic library will automatically create it if it doesn't exist already. If it's not used to actually add custom properties to, it will crash the Alembic CLI tools (and maybe others too). This is what the pointer back to the `ABCAbstractWriter` is used for: to get the `.userProperties` at the last moment, when it's 100% sure at least one custom property will be written. Differential Revision: https://developer.blender.org/D8869 Reviewed by: sergey, dbystedt
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-08Alembic Export: support instanced object dataSybren A. Stüvel
Add support for object data instancing. This is used when the objects are instances, for example when duplicated by a particle system, or instanced by the duplication system (collection-duplicating empties, vertex/face duplis, etc.) Since Alembic already deduplicates data, this doesn't make the resulting Alembic files any smaller. They will be faster to write, though, when there is a lot of instanced geometry, as the deduplication system won't have to do any comparisons. This instancing support is still limited, in the sense that only object data is instanced and all transforms are still written explicitly. A future improvement could be to support instancing entire collection hierarchies. Blender's Alembic importer has no understanding of these Alembic instances yet, and will thus happily duplicate the data on import. The USD Alembic plugin seems to have problems understanding the instancing. There might also be other software with similar issues. Because of this, instancing can be turned off in the exporter (it's on by default).
2020-09-08Cleanup: Alembic export, split `ABCHierarchyIterator::get_alembic_parent()`Sybren A. Stüvel
Split `ABCHierarchyIterator::get_alembic_parent()` into two functions: - For a given export path, find the Alembic object - Ensure that that object is usable as parent object (Alembic uses a specific 'top' object as parent to indicate "no parent"). The new function is `public` as it will be used in an upcoming feature, and is required to be public then. No functional changes.
2020-09-08Cleanup: Alembic export, split function into twoSybren A. Stüvel
Split the `ABCHierarchyIterator::create_data_writer()` function into two functions. This is to prepare for the creation of writers not just by object type, but also by goal, for example writers that reference other Alembic data instead of writing their own (i.e. instancing). No functional changes.
2020-09-04Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fixSebastian Parborg
No functional changes
2020-09-04Cleanup: Clang-Tidy readability-const-return-type fixesSybren A. Stüvel
No functional changes.
2020-08-27Fix crash of alembic tests after recent depsgraph builder changeSergey Sharybin
Need to make sure node factories are initialized prior to the dependency graph allocation. The regression was initially introduced in 5b021dff4136 Thanks Brecht for testing!
2020-08-18Depsgraph: simplify build APIJacques Lucke
Reviewers: sergey, sybren Differential Revision: https://developer.blender.org/D8611
2020-08-18Cleanup: remove bmain argument from BKE_scene_graph_update_for_newframeJacques Lucke
Reviewers: sergey Differential Revision: https://developer.blender.org/D8613
2020-08-17Fix T75936: Alembic, allow exporting of invisible objectsSybren A. Stüvel
Add a new depsgraph builder class that includes invisible objects and use that in the Alembic exporter. Alembic supports three options for visibility, "visible", "inherited", and "hidden". This means that parents can be hidden and still have visible children (contrary to USD, where invisibility is used to prune an entire scene graph subtree). Because of this, the visibility is stored on the transform node, as that represents the Object in Blender and thus keeps the Alembic file as close to Blender's own structure as possible. Reviewed By: Sergey Differential Revision: https://developer.blender.org/D8595
2020-08-17Cleanup: IO, reduce code duplication in USD and Alembic exportersSybren A. Stüvel
Move the object visibility check from Alembic/USD-specific code into the `io/common` module. No functional changes.
2020-08-10Tests: move remaining gtests into their own module foldersBrecht Van Lommel
And make them part of the blender_test runner. The one exception is blenlib performance tests, which we don't want to run by default. They remain in their own executable. Differential Revision: https://developer.blender.org/D8498
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-04Merge remote-tracking branch 'origin/blender-v2.90-release'Sybren A. Stüvel
2020-08-04Fix T78758 Alembic export: crash when file is in use by another applicationSybren A. Stüvel
In cases when the output file cannot be opened, an exception is thrown that was not caught.