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-10-15Merge branch 'master' into temp-pbvh-splitJoseph Eagar
2022-10-15Sculpt: Ensure faces are uniquely assigned to PBVHNodesJoseph Eagar
PBVH_FACES and PBVH_GRIDS do not store faces directly in nodes; instead they store 'primitives', which are tesselation triangles for PBVH_FACES and grids (which are per-loop) for PBVH_GRIDS. Primitives from the same face could sometimes end up in different PBVH nodes. This is now prevented in two ways: * All primitives of the same face are given the same boundary during PBVH build. This prevents them from being swapped away from each other during partitioning. * build_sub adjusts the final partition midpoint to fall between primitives of different faces.
2022-10-15Sculpt: fix crash when instancing sculpt objectsJoseph Eagar
2022-10-13Fix: Attribute layers can be skipped in Mesh to BMesh conversionHans Goudey
In some situations, layers were filled with their default value when converting from Mesh to BMesh (entering edit mode, for example). This was caused by the recently added "copy mesh to bmesh" or "merge mesh to bmesh" custom data functions creating a difference custom data format than was used for the copying functions used later. `CustomData_to_bmesh_block` is not robust enough to handle simple differences in layout between the layout of the source and result CustomData layers, because it relies on the order of the types and the number of layers within each type. As a fix, make the "mesh to bmesh" special case more explicit in the conversion functions. This makes the difference in the API smaller, which is a nice improvement anwyay. Fixes T101796
2022-10-13Cleanup: Use std::mutex for mesh runtime mutexesHans Goudey
Instead of allocating three separate ThreadMutex pointers, just embed std::mutex into the struct directly.
2022-10-13Mesh: Move runtime data out of DNAHans Goudey
This commit replaces the `Mesh_Runtime` struct embedded in `Mesh` with `blender::bke::MeshRuntime`. This has quite a few benefits: - It's possible to use C++ types like `std::mutex`, `Array`, `BitVector`, etc. more easily - Meshes saved in files are slightly smaller - Copying and writing meshes is a bit more obvious without clearing of runtime data, etc. The first is by far the most important. It will allows us to avoid a bunch of manual memory management boilerplate that is error-prone and annoying. It should also simplify future CoW improvements for runtime data. This patch doesn't change anything besides changing `mesh.runtime.data` to `mesh.runtime->data`. The cleanups above will happen separately. Differential Revision: https://developer.blender.org/D16180
2022-10-13Cleanup: Use correct blenkernel namespace for mesh functionsHans Goudey
2022-10-12Fix T101711: Curve to points node sometimes skips initializing radiusHans Goudey
Don't add the radius attribute to point clouds by default, since not having a radius attribute should be a valid state. The radius is only set when a radius attribute also exists on curves.
2022-10-12Cleanup: Use const vertex pointer argumentHans Goudey
2022-10-12Cleanup: use 'u' prefixed unsigned typesCampbell Barton
2022-10-12Cleanup: use commented arguments for unused args in C++Campbell Barton
2022-10-11Sculpt: Fix T101595: sculpt_attribute_update_refs called in wrong placeJoseph Eagar
Needs to go after the assignment to ob->sculpt->pbvh, not before.
2022-10-11GPencil: Fix unreported Close Stroke operator did not select new pointsAntonio Vazquez
When use the close stroke, the new created points were not addedd to the selection.
2022-10-11Correct argument type for BKE_pbvh_node_get_bm_orco_data, formatCampbell Barton
2022-10-11Sculpt: Clean up Dyntopo's original triangle apiJoseph Eagar
Cleaned up Dyntopo original triangle API (which is deprecated): * BMVerts for original triangles are now stored. * BKE_pbvh_bmesh_update_topology now handles original triangle * data properly. * BKE_pbvh_bmesh_node_save_orig can now initialize the original coordinates from the current BMLogEntry. * Ray casting of original data now returns active vertex. Should fix various random crashes. Hopefully this will fix a number of bugs.
2022-10-10Cleanup: NLA transforms, simplify `recalcData_nla()`Thibault de Villèle
Refactor the `recalcData_nla()` function, which takes data from the transform system and updates NLA strips, such that the actual logic to change the strip is moved into its own function. This also moves some generic code (find prev/next strip) from that function to BKE. This is to make the code easier to adjust when different transform operations need to perform different modifications of the strip (i.e. to fix T101130). Manifest Task: T101130 Reviewed By: sybren Differential Revision: https://developer.blender.org/D16181
2022-10-10I18n: disambiguate or extract a few messagesDamien Picard
Disambiguate: - "Active Only" (GPencil copy material and layer, add NLA modifier) - "Clip" (movie clip, image extension mode) - "Emission" (particles) - "New" (scene) - "Tracking" (movie clip) Extract: - "ViewLayer", the default view layer name when creating new scene Ref T43295 Reviewed By: mont29 Maniphest Tasks: T43295 Differential Revision: https://developer.blender.org/D16196
2022-10-08Attribute Node: support accessing attributes of View Layer and Scene.Alexander Gavrilov
The attribute node already allows accessing attributes associated with objects and meshes, which allows changing the behavior of the same material between different objects or instances. The same idea can be extended to an even more global level of layers and scenes. Currently view layers provide an option to replace all materials with a different one. However, since the same material will be applied to all objects in the layer, varying the behavior between layers while preserving distinct materials requires duplicating objects. Providing access to properties of layers and scenes via the attribute node enables making materials with built-in switches or settings that can be controlled globally at the view layer level. This is probably most useful for complex NPR shading and compositing. Like with objects, the node can also access built-in scene properties, like render resolution or FOV of the active camera. Lookup is also attempted in World, similar to how the Object mode checks the Mesh datablock. In Cycles this mode is implemented by replacing the attribute node with the attribute value during sync, allowing constant folding to take the values into account. This means however that materials that use this feature have to be re-synced upon any changes to scene, world or camera. The Eevee version uses a new uniform buffer containing a sorted array mapping name hashes to values, with binary search lookup. The array is limited to 512 entries, which is effectively limitless even considering it is shared by all materials in the scene; it is also just 16KB of memory so no point trying to optimize further. The buffer has to be rebuilt when new attributes are detected in a material, so the draw engine keeps a table of recently seen attribute names to minimize the chance of extra rebuilds mid-draw. Differential Revision: https://developer.blender.org/D15941
2022-10-08Cleanup: Use helper function for previous mesh loopHans Goudey
2022-10-08Mesh: Multithread some boolean domain interpolation logicIliya Katueshenock
This can improve performance by 3-10x in some simple test cases, when reading a boolean attribute on a different domain from the one it's stored on. Differential Revision: https://developer.blender.org/D16054
2022-10-07Merge remote-tracking branch 'origin' into temp-pbvh-splitJoseph Eagar
2022-10-07temp-pbvh-split: fix improver use of mesh->mvertJoseph Eagar
2022-10-07Cleanup: redundant parenthesisCampbell Barton
2022-10-07Cleanup: use function style casts for C++Campbell Barton
2022-10-07Armature Modifier: skip non-deforming vertices in Multi-Modifier mode.Alexander Gavrilov
The modifier already contained a check to skip complex processing of vertices that won't produce any deformation due to the vertex group mask, but this only works for the non-Multi Modifier case. This adds a similar check for the Multi Modifier mode. Differential Revision: https://developer.blender.org/D16152
2022-10-07Cleanup: replace static variables with argumentsCampbell Barton
Functions in vfontdata_freetype.c used static variables instead of argument parsing. This originates from initial freetype support [0]. This didn't cause problems as callers use a global lock, however it makes the code more difficult to follow means we can more easily remove the lock in the future. [0]: d4f9678b3939a3b480005fee3b82ad8843de51e0
2022-10-07Cleanup: quiet compiler shadowed variable warningCampbell Barton
2022-10-07Fix for T101481: Improved VFont LoadingHarley Acheson
Remove redundancy in the testing and loading of VFont fonts. Includes improved setting of character map for using Wingding and Symbol fonts. See D16174 for more details. Differential Revision: https://developer.blender.org/D16174 Reviewed by Campbell Barton
2022-10-07Cleanup: compiler warningCampbell Barton
2022-10-07Cleanup: spelling in commentsCampbell Barton
2022-10-07Cleanup: Avoid inconsistent naming in mesh topology APIHans Goudey
Mesh corners are called "loops" in the code currently. Avoid diverging naming and just use that convention in some newly added code.
2022-10-07Cleanup: Move subdiv_ccg.c to C++Hans Goudey
In preparation for moving mesh runtime data to C++
2022-10-07Merge branch 'master' into temp-pbvh-splitJoseph Eagar
2022-10-07Sculpt: Raise pbvh->leaf_limit to 400 for dyntopoJoseph Eagar
Setting pbvh->leaf_limit (the max triangles per node) too low results in lots of distinct GPU meshes, which can be slow for even moderately sized sculpt meshes (starts to be a problem around 100-150k triangles).
2022-10-06Cleanup: Move subdiv_modifier.c to C++Hans Goudey
In preparation for moving mesh runtime data to a C++ type
2022-10-06Cleanup: Move shrinkwrap.c to C++Hans Goudey
2022-10-06Sculpt: Fix bug in sculpt attribute apiJoseph Eagar
SculptAttribute.domain wasn't being set when creating from an existing CustomData attribute.
2022-10-06Cleanup: Remove unnecessary MOD_nodes.h includesHans Goudey
2022-10-06Fix for T53332: BFont 43 Inaccessible GlyphsHarley Acheson
Preloading of BFont (default for 3D Text Objects) glyphs will not load any with a character code greater than 256, resulting in 43 characters that are inaccessible. This patch corrects that preloading code. See D16122 for more details Differential Revision: https://developer.blender.org/D16122 Reviewed by Campbell Barton
2022-10-06Cleanup: Move multires.c to C++Hans Goudey
2022-10-06Cleanup: spelling in code commentsCampbell Barton
2022-10-05Cleanup: Clang tidyHans Goudey
Also remove unnecessary struct keywords in C++ files.
2022-10-05Mesh: Skip some domain interpolations for single valuesIliya Katueshenock
Completely skip the work of interpolating domains for single values for many to and from combinations. Similar to 535f50e5a6a248b7aa74b59, but slightly more complex because of the possibility of loose elements on some mesh domains. From D16054, with added comments.
2022-10-05Cleanup: Use generic array for mesh domain interpolation resultIliya Katueshenock
Instead of declaring a typed array inside the static type block. This generates slightly less code and should have the same performance. From D16054
2022-10-05BKE_Main: Add clear separation between 'temp' mains and global main.Bastien Montagne
Blender is using more and more temporary Main data-base (historically for reading linked data, but also now when resyncing liboverrides, for temp data in asset code, etc.). This commit aims at making this a bit more formal and defined, by: * Adding a dedicated flag in Main struct to mark a Main as global. * Adding some API to replace, or temporarily swap the current global Main (`G_MAIN`) by another one. NOTE: Having to temporarily replace `G_MAIN` is a workaround for the limitation of current RNA, ideally this should be fixed in RNA itself, but for now at least having an API helps tracking those cases (since this is potentially risky operation). This work is also a preparation for more usages of temp mains in the near future (Asset Brushes and its presets system e.g. will most likely use temp mains too). Reviewed By: brecht Differential Revision: https://developer.blender.org/D15977
2022-10-05Fix app-template settings being used for non-template preferencesCampbell Barton
Saving non app-template preferences would use add-ons and other app-template settings to write the default preferences if there was no existing user preferences file saved.
2022-10-05App Template: quiet warning when existing preferences don't existCampbell Barton
Suppress warning when saving app-template preferences. Check if the preferences exist before attempting to read them, while harmless it looked as if something went wrong.
2022-10-05Docs: improve doc-strings for blend file IOCampbell Barton
- Document the behavior of app-template IO for preferences. - Add doxy-sections for each kind of blend file IO. - Clarify BKE_blender_userdef_app_template_data_swap doc-string.
2022-10-05Cleanup: Remove unused includesHans Goudey
2022-10-04Fix: Bump subversion after forward compatibility breakageHans Goudey
c3b6e372542f9fb0ff23 change node ID names. Bump the subversion and the min file subversion so older versions get warnings opening newer files.