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-09-17Shaders: add emission strength input to Principled BSDF nodeAlex Strand
This impacts I/O add-ons. OBJ, FBX and Collada have been updated, glTF not yet. Differential Revision: https://developer.blender.org/D4971
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: IO, inline namespace declarationsSybren A. Stüvel
Replace nested `namespace blender { namespace io {` with `namespace blender::io {`. No functional changes.
2020-09-10Cleanup: USD, inline namespace declarationsSybren A. Stüvel
Replace nested `namespace blender { namespace io { namespace usd {` with `namespace blender::io::usd {`. No functional changes.
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-09Refactor getting constraintsPhilipp Oeser
This is the refactoring part of D8805 (should be no functional changes). - exposes pose-related part of former 'get_constraints()' from interface_templates.c to new ED_object_pose_constraint_list - rename ED_object_constraint_list_from_context --> ED_object_constraint_active_list Also clarify comments on both of these. ref T80464 ref https://developer.blender.org/D8805
2020-09-09Cleanup: spellingCampbell Barton
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-08Cleanup: Refactor USD Exporter, make parameter constSybren A. Stüvel
Follow-up of 63dc72c3521, make parameter `const`. No functional changes.
2020-09-08Cleanup: USD export, refactor mesh instancingSybren A. Stüvel
Extract the mesh instancing code from the mesh writing function into a generic 'mark as instance' function on the abstract USD writer. This will help in supporting non-mesh instances. No functional changes.
2020-09-05Cleanup: spellingCampbell Barton
2020-09-04Cleanup: Remove redundant redeclaration in colladaSebastian Parborg
No functional changes.
2020-09-04Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fixSebastian Parborg
No functional changes
2020-09-04Cleanup: Clang-Tidy readability-redundant-declaration fixSybren A. Stüvel
No functional changes.
2020-09-04Cleanup: Clang-Tidy readability-static-accessed-through-instance fixesSybren A. Stüvel
No functional changes.
2020-09-04Cleanup: Clang-Tidy readability-const-return-type fixesSybren A. Stüvel
No functional changes.
2020-09-02Cleanup: spellingCampbell Barton
2020-09-01USD: remove library initialisation hackSybren A. Stüvel
Remove the hack for library initialisation; this is no longer necessary as the required information can be passed to the USD library after its static initialisers have run. This new approach is compatible with both the patched and original USD library. This means that platform maintainers don't need to rebuild the USD library until the next upgrade. Manifest Task: https://developer.blender.org/T80320
2020-09-01USD: move library initialisation from `main()` to USD moduleSybren A. Stüvel
Initialize the USD library when used (instead of at startup), so that this can happen inside the IO/USD module. This makes calls to the USD library local to Blender's USD code. Note that failure to find the USD JSON files will now only be reported when the USD exporter is used, and not on every startup of Blender. This is the first step in cleaning up the way Blender patches and initialises the USD library. Manifest Task: https://developer.blender.org/T80320
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-21Cleanup: split `BKE_scene_get_depsgraph()` into two functionsSybren A. Stüvel
Split the depsgraph allocation into a separate function `BKE_scene_ensure_depsgraph()`. Parameters are only passed to those functions that actually need them. This removes the the "if that boolean is `false` this pointer is allowed to be `NULL`" logic and more cleanly decouples code. No functional changes.
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-17USD: Allow exporting of invisible objectsSybren A. Stüvel
The fix for T75936 made it possible to export invisible objects to Alembic. This commit applies the same approach to the USD exporter. The USD and Alembic code is slightly different in terms of where in the exported file the visibility attribute is stored. In USD the visibility is used to prune the scene graph, and thus there are only two options: "hidden" and "inherited". Setting the visiblity of a node in the scene graph to "hidden" immediately hides all its children. To allow hidden parents with visible children, the visibility is stored on the object data (so the geometry/camera/lamp/etc) instead.
2020-08-17IO: Add test for iterating over invisible objectsSybren A. Stüvel
Add a test that checks invisible objects are iterated over by the `IO::AbstractHierarchyIterator` class, when a suitable depsgraph is given. No functional changes.
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-08Cleanup: remove redundant return parenthesisCampbell Barton
2020-08-07Cleanup: fixed Clang-Tidy `bugprone-suspicious-string-compare` warningsSybren A. Stüvel
No functional changes.
2020-08-07Cleanup: IO, Clang-Tidy else-after-return fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/io` module. No functional changes.
2020-08-07Clang-Tidy: Address readability-redundant-string-initSergey Sharybin
2020-08-07Merge branch 'blender-v2.90-release' into masterJacques Lucke
2020-08-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
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.
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-08-01Fix error in recent renameCampbell Barton
This function is defined outside of Blender.
2020-08-01Cleanup: use term init instead of initialize/initialiseCampbell Barton
The abbreviation 'init' is brief, unambiguous and already used in thousands of places, also initialize is often accidentally written with British spelling.
2020-07-28Cleanup: correct usage of extern-C blocks in various placesJacques Lucke
This removes extern-C blocks around other includes and adds such blocks for some headers that need them.
2020-07-28Fix T79263: Alembic, exported rigid body animation not movingSybren A. Stüvel
The root cause was that `BKE_object_moves_in_time()` incorrectly returns `false` when an object is moved by the physics system. This also fixes the same issue in the USD exporter.
2020-07-28Tests: show debugging hint when USDStageCreationTest failsSybren A. Stüvel
Setting the environment variable `PXR_PATH_DEBUG` non-empty will make the USD library print the directories it uses to find its JSON files. This can aid in debugging when this unit test fails. Now the failure message also tells you about this. No functional changes.
2020-07-27Cleanup: Alembic, fix maybe-uninitialized warningSybren A. Stüvel
No functional changes.
2020-07-21Tests: IO, fixed a memory leak in the USDHierarchyIteratorTestSybren A. Stüvel
No functional changes to Blender.
2020-07-21Cleanup: IO, renamed `delete_object_writer()` → `release_writer()`Sybren A. Stüvel
The function is called for all writers, not just 'object' writers. Furthermore, it's called by the function `release_writers()`, so now the name is consistent with that as well. No functional changes.