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-12-25Cleanup: Move customdata.c to C++Hans Goudey
Differential Revision: https://developer.blender.org/D13666
2021-12-25Cleanup: Use consistent order for custom data mesh masksHans Goudey
Loops come last in the struct's definition, use the same order when initializing the common masks in customdata.c (they were switched with the poly masks).
2021-12-24Cleanup: Remove misleading commentsHans Goudey
Most of these custom data layers weren't BMesh only, and the one that actually looks to be BMesh only has `BM` in its name.
2021-12-07Cleanup: move public doc-strings into headers for 'blenkernel'Campbell Barton
- Added space below non doc-string comments to make it clear these aren't comments for the symbols directly below them. - Use doxy sections for some headers. - Minor improvements to doc-strings. Ref T92709
2021-11-04Fix T92649: incorrect copying of anonymous attributes in many placesJacques Lucke
Many modifiers and other places use `CustomData_copy_data` to copy data between different meshes. This function assumes that assumes that the source and destination `CustomData` objects are "compatible" in some way. Usually modifiers use `CustomData_copy` to create a compatible new `CustomData` on the new mesh. The issue was that the optimization I added for anonymous attributes broke this compatibility. It avoided copying some attributes when they are no longer used. This lead to attributes being copied incorrectly. D13083 contains ideas for how this could be fixed more generally. For now I just removed the optimization. Differential Revision: https://developer.blender.org/D13083
2021-10-13Fix T92153: use-after-free with anonymous attributesJacques Lucke
Differential Revision: https://developer.blender.org/D12851
2021-09-24Hair Info Length AttributeJeroen Bakker
Goal is to add the length attribute to the Hair Info node, for better control over color gradients or similar along the hair. Reviewed By: #eevee_viewport, brecht Differential Revision: https://developer.blender.org/D10481
2021-09-09Geometry Nodes: fields and anonymous attributesJacques Lucke
This implements the initial core framework for fields and anonymous attributes (also see T91274). The new functionality is hidden behind the "Geometry Nodes Fields" feature flag. When enabled in the user preferences, the following new nodes become available: `Position`, `Index`, `Normal`, `Set Position` and `Attribute Capture`. Socket inspection has not been updated to work with fields yet. Besides these changes at the user level, this patch contains the ground work for: * building and evaluating fields at run-time (`FN_fields.hh`) and * creating and accessing anonymous attributes on geometry (`BKE_anonymous_attribute.h`). For evaluating fields we use a new so called multi-function procedure (`FN_multi_function_procedure.hh`). It allows composing multi-functions in arbitrary ways and supports efficient evaluation as is required by fields. See `FN_multi_function_procedure.hh` for more details on how this evaluation mechanism can be used. A new `AttributeIDRef` has been added which allows handling named and anonymous attributes in the same way in many places. Hans and I worked on this patch together. Differential Revision: https://developer.blender.org/D12414
2021-08-12Cleanup: use C++ style comments for disabled codeCampbell Barton
2021-08-06Cleanup: use MEM_SAFE_FREE macroCampbell Barton
2021-07-15Cleanup: replace BLI_assert(!"text") with BLI_assert_msg(0, "text")Campbell Barton
This shows the text as part of the assertion message.
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-28Fix T89455: Cycles crash when rendering a Mesh with autosmoothKévin Dietrich
The crash was caused by a mistake in 5f9677fe0c533b008b815d7fee0b56509a414ab7 where the pointers to the custom data layers would be overwritten with the one for the first layer, as CustomData_duplicate_referenced_layer is only about the first layer. customData_duplicate_referenced_layer_index should be used instead to duplicate the right layer.
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-25Fix T88756: crash when baking with autosmoothKévin Dietrich
When baking some data, we create a new Mesh with edits and modifiers applied. However, in some cases (e.g. when there is no modifier), the returned Mesh is actually referencing the original one and its data layers. When autosmooth is enabled we also split the Mesh. However, since the new Mesh is referencing the original one, although `BKE_mesh_split_faces` is creating new vertices and edges, the reallocation of the custom data layers is preempted because of the reference, so adding the new vertices and edges overwrites valid data To fix this we duplicate referenced layers before splitting the faces. Reviewed By: brecht Differential Revision: https://developer.blender.org/D11703
2021-06-20Cleanup: make BKE_mesh_loops_to_tessdata a static functionCampbell Barton
2021-06-18Cleanup: use standard identifier for uint64_t string formattingCampbell Barton
2021-06-09Cleanup: redundant/unused assignmentsCampbell Barton
2021-02-22Cleanup: Clang tidy inconsistent parameter nameHans Goudey
Use the most recent names for the conflicting parameters.
2021-02-22Change Exact Boolean modifier to skip round trip through BMesh.Howard Trickey
The Exact modifier code had been written to avoid using BMesh but in the initial release the modifier still converted all Meshes to BMeshes, and then after running the boolean code on the BMeshes, converted the result back to a Mesh. This change skips that. Most of the work here is in getting the Custom Data layers right. The approach taken is to merge default layers from all operand meshes into the final result, and then use the original verts, edges, polys, and loops to copy or interpolate the appropriate custom data layers from all operands into the result.
2021-02-16Fix T85697: implement interpolation for float custom data typeJacques Lucke
This just hasn't been implemented before.
2021-02-11Merge branch 'blender-v2.92-release'Campbell Barton
2021-02-11Fix T84114: Existence of vertex groups slows down mesh editingCampbell Barton
Having a vertex group in a mesh slowed down unrelated operations such as selection. De-duplicating custom-data arrays for layers that contain pointers can become slow without any benefit as the content never matches. Use full copies when storing custom-data for edit-mesh undo.
2021-01-26Merge branch 'blender-v2.92-release'Richard Antalik
2021-01-26Fix T84935: improve previous fix for boolean custom data layersJacques Lucke
This improves the fix introduced in rBdc8b31af578bfcf9f77dbce6d7b7da1006a3c8c1. While it did not result in other bugs afaik, I thought it would be good to make the fix more specific, in case some other code did expect `layer->data` to be null. This updated fix checks for the very specific case the fix was intended for.
2021-01-26Cleanup: Reduce variable scopeHans Goudey
2021-01-26Fix T84935: boolean custom data layers not saved correctlyJacques Lucke
The issue was that boolean custom data layers were not written to files, because the dna struct name `bool` does not exist. Adding a struct that just contains a `bool/uint8_t` does not seem to be possible, it looks like the minimum dna struct size is 4 bytes. The proposed solution has two parts: 1. Write the custom data layer using `BLO_write_raw` instead of `BLO_write_struct_array_by_name`. 2. When loading a file, reinitialize any custom data layer that was not saved correctly (this is just a fix for existing files). Differential Revision: https://developer.blender.org/D10194
2021-01-04Cleanup: typo in c484b54453e6072399dd79daccf237bb4bd73b41Campbell Barton
2020-12-16Geometry Nodes: Boolean attribute typeHans Goudey
This adds a boolean attribute and custom data type, to be used in the point separate node. It also adds it as supported data types in the random attribute and attribute fill nodes. There are more clever ways of storing a boolean attribute that make more sense in certain situations-- sets, bitfields, and others, this commit keeps it simple, saving those changes for when there is a proper use case for them. In any case, we will still probably always want the idea of a boolean attribute. Differential Revision: https://developer.blender.org/D9818
2020-11-06Cleanup: use ELEM macroCampbell Barton
2020-11-03Cleanup: doxy param syntaxCampbell Barton
2020-10-29CustomData color copying: use interpolated alphaPhilipp Oeser
The alpha of the first layer was always used here since introduction in rBee4453f08369 and was not updated when customdata support for alpha was added. Now also use the interpolated alpha. thx @brecht noticing! ref T81914 Reviewers: brecht, mont29 Maniphest Tasks: T81914 Differential Revision: https://developer.blender.org/D9358
2020-10-19Spelling: Then Versus ThanHarley Acheson
Corrects incorrect usages of the words 'then' and 'than'. Differential Revision: https://developer.blender.org/D9246 Reviewed by Campbell Barton
2020-10-09Cleanup: spellingCampbell Barton
2020-10-08Refactor CustomData interpolation code.Bastien Montagne
- Move some security checks outside of `interp` callbacks. Namely, that we do get interpolation weights, and have something to interpolate. Some callbacks where not checking on those anyway, safer to move that up into calling code. - Cleanup usage of sub-weights, lots of interpolation callbacks wher actually using those completely wrong. - Change default behavior when no weights are given to higher-level API functions: prevriously, each callback was responsible to handle that case (and one did not even do it!), they were switching to purely additive behavior then. Instead, we now default to expected simple average of source values. Note that the only real important change here is defaulting to actual average of source value when no inertpolation weights are given (afaik, this only happens in Weld modifier code). Differential Revision: https://developer.blender.org/D9114
2020-09-30Cleanup: convert gforge task ID's to phabricator formatValentin
Cleanup old tracker task format to the new. e.g: [#34039] to T34039 Ref D8718
2020-09-18Sculpt: Render Mask and Face Sets with modifiers activePablo Dobarro
This removes the limitation of the sculpt overlays not being visible with modifiers active. Reviewed By: fclem Maniphest Tasks: T68900 Differential Revision: https://developer.blender.org/D8673
2020-09-18Cleanup: remove unused navmesh codePhilipp Oeser
These were leftovers from the BGE removal. Differential Revision: https://developer.blender.org/D8862
2020-09-15CustomData: add assert to prevent negative array accessCampbell Barton
2020-09-09Geometry: add .attributes in the Python API for Mesh, Hair and Point CloudBrecht Van Lommel
This puts all generic float/int/vector/color/string geometry attributes in a new .attributes property. For meshes it provides a more general API for existing attributes, for point clouds attributes will be used as an essential part of particle nodes. This patch was implemented by @lichtwerk, with further changes by me. It's still a work in progress, but posting here to show what is going on and for early feedback. Ref T76659 Differential Revision: https://developer.blender.org/D8200
2020-09-09Cleanup: reduce variable scopeJacques Lucke
2020-09-09Fix T80626: Crash adding custom-data layers after reloading the fileCampbell Barton
Regression in a48d78ce07f4f which caused the meshes CustomData to be written before it's layer values were updated for writing.
2020-09-04Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fixSebastian Parborg
No functional changes
2020-09-02Cleanup: use bool instead of int in various placesJacques Lucke
2020-08-28Refactor: move CustomData .blend I/O to blenkernelJacques Lucke
This is part of T76372.
2020-08-08Cleanup: use array syntax for sizeof with fixed valuesCampbell Barton
Also order sizeof(..) first to promote other values to size_t.
2020-08-07Cleanup: Blenkernel, 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/blenkernel` module. No functional changes.
2020-08-06Merge branch 'blender-v2.90-release'Bastien Montagne
2020-08-06Move CDData debug print helper from DM to CustomData 'namespace'/files.Bastien Montagne
2020-07-23Cleanup: avoid zero byte memcpyJacques Lucke
Asan reports warnings because of this.