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-02-16Merge branch 'blender-v3.1-release'Jacques Lucke
2022-02-16Fix: removing anonymous attributes before adding mesh to bmainJacques Lucke
This was an issue when e.g. `bpy.data.meshes.new_from_object` was used on an object that uses geometry nodes.
2022-02-16Cleanup: Use const qualifier in modifier data copySergey Sharybin
Fix possible overflow of Modifier UUID The code prior this change was re-generating modifier's session UUID prior to copying this id from the source. This approach has a higher risk of modifiers session UUID to overflow and start colliding with existing modifiers. This change makes it so that modifier copy does not re-generated the session UUID unless it is needed. Differential Revision: https://developer.blender.org/D14125
2022-02-16Cleanup: Use const qualifier in modifier data copySergey Sharybin
2022-02-16Merge branch 'blender-v3.1-release'Jeroen Bakker
2022-02-16Fix Image GPU texture.Jeroen Bakker
Due to recent changes there have been reports of incorrect loading of GPU textures. This fix reverts a part of {D13238} that might be the source of the issue.
2022-02-16Cleanup: spelling in commentsCampbell Barton
2022-02-16Cleanup: clang-format, use static sets, sort struct declarationsCampbell Barton
2022-02-15Merge remote-tracking branch 'origin/blender-v3.1-release'Kévin Dietrich
2022-02-15Fix T95806: subdivision missing in Cycles when using autosmoothKévin Dietrich
Although rB56407432a6a did fix missing subdivision in some cases, in other cases it did not return the mesh wrapper (like when using autosmooth, which requires a copy of the mesh), so the non-subdivided mesh was still returned.
2022-02-15BLI: Change dependencies in vector math filesHans Goudey
This patch reverses the dependency between `BLI_math_vec_types.hh` and `BLI_math_vector.hh`. Now the higher level `blender::math` functions depend on the header that defines the types they work with, rather than the other way around. The initial goal was to allow defining an `enable_if` in the types header and using it in the math header. But I also think this operations to types dependency is more natural anyway. This required changing the includes some files used from the type header to the math implementation header. I took that change a bit further removing the C vector math header from the C++ header; I think that helps to make the transition between the two systems clearer. Differential Revision: https://developer.blender.org/D14112
2022-02-15Cleanup: Rename file used for calculating mesh edgesHans Goudey
This commit renames `mesh_validate.cc` to `mesh_calc_edges.cc`. I would like to move `mesh_validate.c` to C++, but it makes sense to keep this specific algorithm in a smaller file.
2022-02-15Curves: add initial sculpt modeJacques Lucke
This adds a new sculpt mode to the experimental new curves object. Currently, this mode can only be entered and exited, nothing else. The main initial purpose of this node will be to use it for hair grooming. The patch also adds the `editors/curves/` directory for the new curves object, which will be necessary for many other things as well. I added a completely new mode (`OB_MODE_SCULPT_CURVES`), because `OB_MODE_SCULPT` seems to be rather specific to meshes, and reusing it doesn't seem worth the trouble. The tools/brushes used in mesh vs. curves sculpt mode are quite distinct as well. I had to add DNA_userdef_enums.h to make the patch compile with C++ (forward declaration of enums isn't allowed). This follows the same pattern that we use for other enums in dna. Differential Revision: https://developer.blender.org/D14107
2022-02-14Cleanup: Pass const Scene to mesh evaluationHans Goudey
2022-02-14Merge branch 'blender-v3.1-release'Sergey Sharybin
2022-02-14Fix T95756: Crash inserting geometry node after linking modifierSergey Sharybin
The root issue was caused by a mistake in modifier copy data which was wrongly re-generating source modifier data identifier. The c8cca8885181 simply exposed a bug in code which always was there since the modifiers session UUID was introduced. Shows an importance of const qualifier :)
2022-02-14Merge branch 'blender-v3.1-release'Thomas Dinges
2022-02-14Fix T94479: GPU Subdivision surface modifier does not apply to Cycles rendersKévin Dietrich
Since now we delegate the evaluation of the last subsurf modifier in the stack to the draw code, Cycles does not get a subdivided mesh anymore. This is because the subdivision wrapper for generating a CPU side subdivision is never created as it is only ever created via `BKE_object_get_evaluated_mesh` which Cycles does not call (rather, it accesses the Mesh either via `object.data()`, or via `object.to_mesh()`). This ensures that a subdivision wrapper is created when accessing the object data or converting an Object to a Mesh via the RNA/Python API. Reviewed by: brecht Differential Revision: https://developer.blender.org/D14048
2022-02-14Fix (studio reported) crash in new resync code.Bastien Montagne
We do not always resync/replace the root ID of a hierarchy now that we do partial resync.
2022-02-14Merge branch 'blender-v3.1-release'Bastien Montagne
2022-02-14Fix T95601: Missing handling of keyingsets ID pointers in ↵Bastien Montagne
lib_query/foreach_id code. This will have to be backported to 2.93 and possibly 2.83 if possible.
2022-02-14Merge branch 'blender-v3.1-release'Jeroen Bakker
2022-02-14Phase out IMA_GPU_REFRESH.Jeroen Bakker
IMA_GPU_REFRESH is replaced by BKE_image_partial_update_mark_full_update and should not be used anymore.
2022-02-14Merge branch 'blender-v3.1-release'Jacques Lucke
2022-02-14Fix T95749: missing update when normal node changesJacques Lucke
This node is a bit of a weird case, because it uses the value stored in an output socket as an input. So when we want to determine if the Dot changed, we also have to check if the Normal output changed. A cleaner solution would be to refactor this by either storing the normal on the node directly (instead of in an output socket), or by exposing it by a separate input. This refactor should be done separately though.
2022-02-11Fix (studio-reported) liboverrides potential infinite loop in hierarchy root ↵Bastien Montagne
doversion. Drivers make it way too easy to create dependenciy loops between IDs, so need to use the same trick as in other dependency-following code in this file to prevent those infinite loops. hard to predict for sure how bad of a hierarchy root this can end up producing, but in general cases think this should be OK.
2022-02-11LibOverride: Add partial resync.Bastien Montagne
Reduce compute effort of liboverrides resync process by only re-syncing the parts of the override hierarchy that actually need it. The main change compared to existing code (which was systematically resyncing a whole override hierarchy), is that resyncing now operates over several sub-hierarchies at once, each defined by their own 'resync root' ID. This ensures that we do not get several new overrides for the same data inside of the same hierarchy. Implements T95682. Differential Revision: https://developer.blender.org/D14079
2022-02-11Remap multiple items in referenced data.Jeroen Bakker
This patch increases the performance when remapping data. {D13615} introduced a mechanism to remap multiple items in a single go. This patch uses the same mechanism when remapping data inside ID datablocks. Benchmark results when loading the village scene of sprite fright on AMD Ryzen 7 3800X 8-Core Processor Before this patch 115 seconds When patch applied less than 43 seconds There is still some room for improvement by porting relink code. Reviewed By: mont29 Maniphest Tasks: T95279 Differential Revision: https://developer.blender.org/D14043
2022-02-11Helper functions for IDRemapper.Jeroen Bakker
Adds helper functions to debug IDRemapper data structure. `BKE_id_remapper_result_string` converst a given IDRemapperApplyResult to a readable form for logging purposes. `BKE_id_remapper_print` prints out the rules inside a IDRemapper struct.
2022-02-11Merge remote-tracking branch 'origin/blender-v3.1-release'Kévin Dietrich
2022-02-11Fix T95698: deadlock with GPU subdivisionKévin Dietrich
Multithreaded tasks have to be isolated when holding a mutex, which was missing for the generation of the subdivision wrapper.
2022-02-11Fix compile warnings.Jeroen Bakker
We should change the API of ntree so we can check with a const. I added this as a todo for now and used a const cast.
2022-02-11Refactoring of `BKE_library_id_can_use_idtype` to use filter_id.Jeroen Bakker
For an upcoming project we would want to match multiple id types in a single go. To not replicate the implementation using other types we introduce `BKE_library_id_can_use_filter_id` that returns all supported types as a filter. Not all ID types have a filter_id (ID_LI, ID_KE, ID_SCR) These exceptions are not available in the filter_id function. Reviewed By: mont29 Maniphest Tasks: T95279 Differential Revision: https://developer.blender.org/D14061
2022-02-11Cleanup: remove white-space before headersCampbell Barton
2022-02-11Cleanup: Remove unused mesh mask definitionsHans Goudey
Maintaining and understanding these can be a burden, so the fewer we have, the better. These particular masks haven't been used for years.
2022-02-11Revert "Split Python OBJ importer and exporter, enabling only the importer."Howard Trickey
This reverts commit ff9dc1986e6c9a54fd0bb228e8813551e6baa042.
2022-02-11Revert "Split Python OBJ importer and exporter, enabling only the importer."Howard Trickey
This reverts commit ff9dc1986e6c9a54fd0bb228e8813551e6baa042.
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2022-02-11Cleanup: clang-formatCampbell Barton
2022-02-11Cleanup: Clang tidyHans Goudey
Mismatched parameter names and else after return.
2022-02-10Fix: Incorrect size used for reading curves dataHans Goudey
Copy and paste mistake in fe1816f67fbc6aaf383ec
2022-02-10Merge branch 'blender-v3.1-release'Hans Goudey
2022-02-10Fix T95613: remove anonymous attributes when converting objectJacques Lucke
This is the same behavior as when applying a geometry nodes modifier that adds anonymous attributes.
2022-02-10Refactor: Move PBVH update tag out of MVertHans Goudey
This is part of the project of converting `MVert` into `float3`. (more details in T93602), The pbvh update flag is removed and replaced with a bitmap stored in the PBVH structure. This patch is similar to D13878. This is mainly setup for an eventual performance improvement by removing the extra data from mesh vertices, but if it's consistent with testing in the other patch doing the same thing for another "temp tag", then it may actually increase the speed of sculpt code slightly, since less memory needs to be loaded when checking/changing the flags. Differential Revision: https://developer.blender.org/D14000
2022-02-10Merge branch 'blender-v3.1-release'Jacques Lucke
2022-02-10Fix T95624: video texture not refreshing when changing offset in nodeJacques Lucke
The main issue is that the image and image user is not updated correctly in `rna_ImageUser_update`. `BKE_image_user_frame_calc` does not set the correct frame, because the image is null. Also `IMA_GPU_REFRESH` is not set for the same reason. When gpu materials are first created, it is expected that the frame is set correctly, and the flag is set if necessary. Therefore, somewhere during depsgraph evaluation, those have to be updated. The depsgraph node to do the update existed already. Now there is a new relation so that it is executed when the node tree changed, not only when the frame changed.
2022-02-10Minor cleanup: Use `ID_IS_LINKED`.Bastien Montagne
2022-02-10Fix T95334: Crash with no vertex normals in multires bakeHans Goudey
This is partially caused by a stupid mistake in cfa53e0fbeed7178c78 where I missed initializing the `vert_normals` pointer in `MResolvePixelData`. It's also caused by questionable assumptions from DerivedMesh code that vertex normals would be valid. The fix used here is to create a temporary mesh with the data necessary to compute vertex normals, and ensure them here. This is used because normal calculation is only implemented for `Mesh` and edit mesh, not `DerivedMesh`. While this might not be great for performance, it's potentially aligned with future refactoring of this code to remove `DerivedMesh` completely. Since this is one of the last places the data structure is used, that would be a great improvement. Differential Revision: https://developer.blender.org/D13960
2022-02-10Fix (unreported) over-resync from RNA detection code in linked cases.Bastien Montagne
While applying liboverrides on linked data, RNA code (in `rna_property_override_check_resync`) would detect a lot of false positive regarding IDs needing resync, because the temporary ID used to apply overrides was always local, breaking the libraries comparison check. NOTE: that whole 'apply liboverrides' code could use some refreshment, it did not change much from initila version several years ago, we now have better tools and control over non-main data. But for now the 'trick' in that commit should do the job, ultimately those temps IDs should never be put in Main at all.
2022-02-10Merge branch 'blender-v3.1-release'Sergey Sharybin