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-04-20Cleanup: Rename CD_MLOOPCOL to CD_PROP_BYTE_COLORHans Goudey
The "PROP" in the name reflects its generic status, and removing "LOOP" makes sense because it is no longer associated with just mesh face corners. In general the goal is to remove extra semantic meaning from the custom data types.
2022-04-20Mesh: Avoid unnecessary normal calculation and dirty tagsHans Goudey
This is mostly a cleanup to avoid hardcoding the eager calculation of normals it isn't necessary, by reducing calls to `BKE_mesh_calc_normals` and by removing calls to `BKE_mesh_normals_tag_dirty` when the mesh is newly created and already has dirty normals anyway. This reduces boilerplate code and makes the "dirty by default" state more clear. Any regressions from this commit should be easy to fix, though the lazy calculation is solid enough that none are expected.
2022-04-14Cleanup: Alembic, use a structure to pass parametersKévin Dietrich
This adds a structure, `ABCReadParams`, to store some parameters passed to `ABC_read_mesh` so we avoid passing too many parameters, and makes it easier to add more parameters in the future without worrying about argument order. Differential Revision: https://developer.blender.org/D14484
2022-04-13Cleanup: use C++ comments for disabled codeCampbell Barton
Also ensure space around text in C-comment blocks.
2022-04-08Cleanup: CacheFile, use double precision for timeKévin Dietrich
Both the Alembic and USD libraries use double precision floating point numbers internally to store time. However the Alembic I/O code defaulted to floats even though Blender's Scene FPS, which is generally used for look ups, is stored using a double type. Such downcasts could lead to imprecise lookups, and would cause compilation warnings (at least on MSVC). This modifies the Alembic exporter and importer to make use of doubles for the current scene time, and only downcasting to float at the very last steps (e.g. for vertex interpolation). For the importer, doubles are also used for computing interpolation weights, as it is based on a time offset. Although the USD code already used doubles internally, floats were used at the C API level. Those were replaced as well. Differential Revision: https://developer.blender.org/D13855
2022-04-05Refactor: Unify vertex and sculpt colors into newJoseph Eagar
color attribute system. This commit removes sculpt colors from experimental status and unifies it with vertex colors. It introduces the concept of "color attributes", which are any attributes that represents colors. Color attributes can be represented with byte or floating-point numbers and can be stored in either vertices or face corners. Color attributes share a common namespace (so you can no longer have a floating-point sculpt color attribute and a byte vertex color attribute with the same name). Note: this commit does not include vertex paint mode, which is a separate patch, see: https://developer.blender.org/D14179 Differential Revision: https://developer.blender.org/D12587 Ref D12587
2022-04-04Cleanup: ensure space after file named in headersCampbell Barton
Add blank lines after file references to avoid them being interpreted as doc-strings the following declarations.
2022-04-01Cleanup: Use const for bounding boxes where possibleHans Goudey
2022-04-01Fix compiler error when building without USD and alembicJulian Eisel
2022-04-01Cycles: enable Alembic procedural for final rendersKévin Dietrich
The Alembic procedural was only enabled during viewport renders originally because it did not have any caching strategy. Now that is does, we can allow its usage in final renders. This also removes the `dag_eval_mode` argument passing to `ModifierTypeInfo.dependsOnTime` which was originally added to detect if we are doing a viewport render for enabling the procedural. Differential Revision: https://developer.blender.org/D14520
2022-04-01Cleanup: Move geometry set fields to a separate headerHans Goudey
This commit moves declarations that depend on `FN_field.hh` out of `BKE_geometry_set.hh` into `BKE_geometry_fields.hh`. This helps to reduce the number of areas that need to depend on the functions module, which recently came in in review of D11591. In the future we may have a library of standard field inputs in order to make composing algorithms easier, so it makes sense to have a header that could contain them and some basic related utilities relating the concepts of geometry and fields. Reducing use of unnecessary headers may also reduce compilation time. Differential Revision: https://developer.blender.org/D14517
2022-03-29Geometry Nodes: Don't create node tree when adding nodes modifierLeon Schittek
Don't always create a new geometry nodes node tree when adding a geometry nodes modifier. This avoids files getting cluttered with empty and unused geometry node trees that are created every time a nodes modifier is added to an object - even if only to apply an already existing. This is also more consistent with other modifiers that also don't automatically create new data blocks. The new modifier still automatically gets populated with a new node tree when adding it via the "New" button in the header of the geometry nodes editor. Reviewed By: Hans Goudey, Dalai Felinto, Pablo Vazquez Differential Revision: D14458
2022-03-29Cleanup: use value initialization instead of copying default valueJacques Lucke
Value-initialization has the potential to be more efficient. Also, the code becomes simpler.
2022-03-28Cleanup: use "num" as a suffix in: source/blender/modifiersCampbell Barton
Also rename DNA struct members.
2022-03-25Cleanup: use count or num instead of nbrCampbell Barton
Follow conventions from T85728.
2022-03-24Fix: Build error with flag usage and strict warningsHans Goudey
2022-03-24Complex Solidify: handle vertex creasesHenrik Dick
This implements the same interpolation method as for bevel weights now for vertex and edge creases as well to improve the flexibility. Differential Revision: http://developer.blender.org/D14170
2022-03-24Cleanup: Clang tidyHans Goudey
- Deprecated headers - Else after return - Inconsistent parameter names (I used the most recently modified) - Raw string literals
2022-03-23Cleanup: use nullptrKévin Dietrich
2022-03-23Cleanup: move Mesh Sequence Cache modifier to C++Kévin Dietrich
This moves `MOD_meshsequencecache.c` to C++ and fixes compile warnings introduced from the change. This uses C++ style casts, as well as `nullptr` instead of `NULL`. This will allow to output `GeometrySets` from the modifier, which is C++. Differential Revision: https://developer.blender.org/D13662
2022-03-22Fix T96308: Mesh to BMesh conversion doesn't calculate vertex normalsHans Goudey
Currently there is a "calc_face_normal" argument to mesh to bmesh conversion, but vertex normals had always implicitly inherited whatever dirty state the mesh input's vertex normals were in. Probably they were most often assumed to not be dirty, but this was never really correct in the general case. Ever since the refactor to move vertex normals out of mesh vertices, cfa53e0fbeed7178c7, the copying logic has been explicit: copy the normals when they are not dirty. But it turns out that more control is needed, and sometimes normals should be calculated for the resulting BMesh. This commit adds an option to the conversion to calculate vertex normals, true by default. In almost all places except the decimate and edge split modifiers, I just copied the value of the "calc_face_normals" argument. Differential Revision: https://developer.blender.org/D14406
2022-03-22Fix (unreported) Crash in Array modifier.Bastien Montagne
Typo (copy/paste mistake) in rB923b28aab85768e2b.
2022-03-21Fix T96494: Array modifier with caps crash on curve objectsHans Goudey
Since 3b6ee8cee7080af20, a list of vertex groups cannot be retrieved from curve objects for merging because curve objects do not support vertex groups. Previously the empty list on the object was returned. Only mesh objects are supported for the caps.
2022-03-19BLI: move generic data structures to blenlibJacques Lucke
This is a follow up to rB2252bc6a5527cd7360d1ccfe7a2d1bc640a8dfa6.
2022-03-18BLI: move CPPType to blenlibJacques Lucke
For more detail about `CPPType`, see `BLI_cpp_type.hh` and D14367. Differential Revision: https://developer.blender.org/D14367
2022-03-16Geometry Nodes: Remove legacy node codeHans Goudey
This commit removes the implementations of legacy nodes, their type definitions, and related code that becomes unused. Now that we have two releases that included the legacy nodes, there is not much reason to include them still. Removing the code means refactoring will be easier, and old code doesn't have to be tested and maintained. After this commit, the legacy nodes will be undefined in the UI, so 3.0 or 3.1 should be used to convert files to the fields system. The net change is 12184 lines removed! The tooltip for legacy nodes mentioned that we would remove them before 4.0, which was purposefully a bit vague to allow us this flexibility. In a poll in a devtalk post showed that the majority of people were okay with removing the nodes. https://devtalk.blender.org/t/geometry-nodes-backward-compatibility-poll/20199 Differential Revision: https://developer.blender.org/D14353
2022-03-15Cleanup: correct unbalanced doxy sectionsCampbell Barton
2022-03-14Auto-generate RNA-structs declarations in `RNA_prototypes.h`Julian Eisel
So far it was needed to declare a new RNA struct to `RNA_access.h` manually. Since 9b298cf3dbec we generate a `RNA_prototypes.h` for RNA property declarations. Now this also includes the RNA struct declarations, so they don't have to be added manually anymore. Differential Revision: https://developer.blender.org/D13862 Reviewed by: brecht, campbellbarton
2022-03-11Fix out of order event handling when calling operators from gizmosCampbell Barton
Activating a gizmo used the windows eventstate which may have values newer than the event used to activate the gizmo. This meant transforms check for the key that activated transform could be incorrect. Support passing an event when calling operators to avoid this problem.
2022-03-10Cleanup: spelling in comments & some minor clarificationsCampbell Barton
2022-03-08Cleanup: spelling in comments, use C++ comments for disabled codeCampbell Barton
2022-03-02UI: Comments Misspellings of Vertex/VerticesNikhil Shringarpurey
Correct misspellings in code comments of "vertex" and "vertices". See D13932 for more details. Differential Revision: https://developer.blender.org/D13932 Reviewed by Harley Acheson
2022-03-02Merge branch 'blender-v3.1-release'Hans Goudey
2022-03-02Fix T95479: geometry nodes crash with cage displayJacques Lucke
Differential Revision: https://developer.blender.org/D14225
2022-03-02Fix T95963: change thresholds in complex solidifyHenrik Dick
This fix contains two parts. There was one critical mistake where order of two indices was wrong when removing constraint planes from the array. The other changes are improvements to the used thresholds to keep everything numerically stable. Differential Revision: http://developer.blender.org/D14183
2022-02-26Merge branch 'blender-v3.1-release'Hans Goudey
2022-02-26Fix: Failing OBJ export tests due to mesh normals commitHans Goudey
In some cases, the normal edit modifier calculated the normals on one mesh with the "ensure" functions, then copied the mesh and retrieved the layers "for write" on the copy. Since 59343ee1627f4c369e23, normal layers are never copied, and normals are allocated with malloc instead of calloc, so the mutable memory was uninitialized. Fix by calculating normals on the correct mesh, and also add a warning to the "for write" functions in the header.
2022-02-25Merge remote-tracking branch 'origin/blender-v3.1-release'Kévin Dietrich
2022-02-25Disable GPU subdivision if autosmooth or split normals are usedKévin Dietrich
These features are complicated to support on GPU and hardly compatible with subdivision in the first place. In the future, with T68891 and T68893, subdivision and custom smooth shading will be separate workflows. For now, and to better prepare for this future (although long term plan), we should discourage workflows mixing subdivision and custom smooth normals, and as such, this disables GPU subdivision when autosmoothing or custom split normals are used. This also adds a message in the modifier's UI to indicate that GPU subdivision will be disabled if autosmooth or custom split normals are used on the mesh. Differential Revision: https://developer.blender.org/D14194
2022-02-22Cleanup: Remove unused mesh dirty flagsHans Goudey
These were only set in two places. One was related to "tessellated loop normal", and the other derived corner normals. The values were never checked though, after 59343ee1627f4c369. The handling of dirty face corner normals is clearly problematic, but in the future it should be handled like the normal layers on the other domains instead. Ref D14154, T95839
2022-02-21Merge branch 'blender-v3.1-release'Hans Goudey
2022-02-21Fix T93873: Wrong limits for color socket exposed to modifierHans Goudey
Limit the min and max of the IDProperty for the node group input from 0 to infinity, and the soft min and max between 0 and 1. Thanks to @PratikPB2123 for investigation.
2022-02-21Complex Solidify: improve constraints solverHenrik Dick
The constraints solver is now able to handle more cases correctly. Also the behavior of the boundary fixes is slightly changed if the constraints thickness mode is used. Differential Revision: https://developer.blender.org/D14143
2022-02-21Vertex Weight Mix: support Minimum and Maximum mix modes.Alexander Gavrilov
The modifier supports arithmetic operations, like Add or Multiply, but for some reason omits Minimum and Maximum. They are similarly simple and useful math functions and should be supported. Differential Revision: https://developer.blender.org/D14164
2022-02-19Merge branch 'blender-v3.1-release'Hans Goudey
2022-02-18Cleanup: Use functions for accessing mesh normal dirty stateHans Goudey
It's better not to expose the details of where the dirty flags are stored to every place that wants to know if the normals are dirty. Some of these places are relics from before vertex normals were computed lazily anyway, so this is more of an incrememtal cleanup. This will make part of the fix for T95839 simpler.
2022-02-18Cleanup: Rename original curve object type enumHans Goudey
This commit renames enums related the "Curve" object type and ID type to add `_LEGACY` to the end. The idea is to make our aspirations clearer in the code and to avoid ambiguities between `CURVE` and `CURVES`. Ref T95355 To summarize for the record, the plans are: - In the short/medium term, replace the `Curve` object data type with `Curves` - In the longer term (no immediate plans), use a proper data block for 3D text and surfaces. Differential Revision: https://developer.blender.org/D14114
2022-02-18Merge branch 'blender-v3.1-release'Hans Goudey
2022-02-18Fix T93526: Missing tooltip for attribute search buttonPratik Borhade
For the attribute search button, the tooltip was missing if the input socket type has attribute toggle activated. Differential Revision: https://developer.blender.org/D14142
2022-02-16Merge branch 'blender-v3.1-release'Sebastian Parborg