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-09-16Cleanup: Move mesh_convert.c to C++Hans Goudey
This should allow easier changes when it's helpful to use C++ types. The diff is for a test on the buildbot. Differential Revision: https://developer.blender.org/D12528
2021-09-15Cleanup: Use function to mark mesh normals dirtyHans Goudey
2021-09-11Geometry Nodes: Support modifier on curve objectsHans Goudey
With this commit, curve objects support the geometry nodes modifier. Curves objects now evaluate to `CurveEval` unless there was a previous implicit conversion (tessellating modifiers, mesh modifiers, or the settings in the curve "Geometry" panel). In the new code, curves are only considered to be the wire edges-- any generated surface is a mesh instead, stored in the evaluated geometry set. The consolidation of concepts mentioned above allows remove a lot of code that had to do with maintaining the `DispList` type temporarily for modifiers and rendering. Instead, render engines see a separate object for the mesh from the mesh geometry component, and when the curve object evaluates to a curve, the `CurveEval` is always used for drawing wire edges. However, currently the `DispList` type is still maintained and used as an intermediate step in implicit mesh conversion. In the future, more uses of it could be changed to use `CurveEval` and `Mesh` instead. This is mostly not changed behavior, it is just a formalization of existing logic after recent fixes for 2.8 versions last year and two years ago. Also, in the future more functionality can be converted to nodes, removing cases of implicit conversions. For more discussion on that topic, see T89676. The `use_fill_deform` option is removed. It has not worked properly since 2.62, and the choice for filling a curve before or after deformation will work much better and be clearer with a node system. Applying the geometry nodes modifier to generate a curve is not implemented with this commit, so applying the modifier won't work at all. This is a separate technical challenge, and should be solved in a separate step. Differential Revision: https://developer.blender.org/D11597
2021-08-24Fix T90900: Crash when rendering geometry nodes created curveHans Goudey
The comment for data_eval mentions that it should contain a mesh for curve objects, however with geometry nodes, objects can evaluate to curves as well (though they are only containers for the `CurveEval`. That is a larger issue, but with the upcoming geometry instancing patch the situation changes, so this commit does not correct that. I also hope to remove this code in favor of the new curve to mesh code soon. Instead, just check the evaluated data type in this case, which prevents the crash, though it is hacky.
2021-08-24Cleanup: Make function static, remove unused argumentsHans Goudey
2021-08-12Cleanup: use C++ style comments for disabled codeCampbell Barton
2021-08-06Fix memory leak from rB263fa406cd2bHans Goudey
2021-08-06Fix T90087: Assigning object data doesn't copy vertex groupsHans Goudey
Assigning a mesh seems to do its own parameter copying, which means we need to manual copy its vertex groups here, which was just overlooked in rB3b6ee8cee708. Differential Revision: https://developer.blender.org/D12110
2021-07-20Cleanup: Make function static, use const object argumentHans Goudey
Also use `const Curve *` instead of `const Object *`, since the function works at a lower level than objects anyway. And also remove another unused function. Since this section of code for converting curves to meshes will likely be replaced, it's nicer to see which parts actually remain used at this point.
2021-07-20Cleanup: Remove unused functionHans Goudey
2021-07-05Cleanup: spelling in commentsCampbell Barton
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-29Cleanup: Avoid ASAN report when converting displist to meshHans Goudey
Don't call `memcpy` with a null destination (and 0 size).
2021-06-28Cleanup: Remove unused "for_orco" argument to curve evaluationHans Goudey
`BKE_displist_make_curveTypes` had a `for_orco` argument that was always false in calls to the function. Removing it allows the curve displist and modifier evaluation code to become simpler. There are some related cleanups in rBdf4299465279 and rB93aecd2b8107.
2021-06-28Cleanup: Use const argumentsHans Goudey
2021-06-22Cleanup: Spelling MistakesLeon Zandman
This patch fixes many minor spelling mistakes, all in comments or console output. Mostly contractions like can't, won't, don't, its/it's, etc. Differential Revision: https://developer.blender.org/D11663 Reviewed by Harley Acheson
2021-06-18Cleanup: replace 'unsigned in' with 'uint'Campbell Barton
2021-06-14Cleanup: Order return argument lastHans Goudey
2021-05-17Merge branch 'blender-v2.93-release'Brecht Van Lommel
2021-05-17Fix T86278: vertex color baking not working with modifiersBrecht Van Lommel
As in the old Blender Internal baking code, this still relies on there being a good mapping to the original vertices.
2021-05-05Fix T86871: Mesh.mesh_from_object creates empty mesh from curveCampbell Barton
Regression in 2b723abea02c868d94623f4dd9e9b6775cb3aaab
2021-04-30Object: rename BKE_object_runtime_free, leave data clearedCampbell Barton
Rename BKE_object_runtime_free -> BKE_object_runtime_free_data, since the runtime pointer is part of the object, only the data is freed. Leave the data cleared to avoid accidental use, this is in keeping with other `*_free_data()` functions.
2021-04-30Object: improve on fix for Object.to_mesh() crash T86871Campbell Barton
While fa7ddd0f43ea15dd19d81e7808de2bfe8cfc89ee fixed the reported issue, the possibility of reusing runtime data during curve-to-mesh conversion remained. Instead of treating the bounding-box as a special case, clear all run-time data for temporary objects. Ref D11026 Reviewed By: sergey
2021-04-20Merge branch 'blender-v2.93-release'Campbell Barton
2021-04-20Fix T86871: Crash with to_mesh() on tapered bezier curveCampbell Barton
2021-04-20Cleanup: remove redundant code/comments from BKE_mesh_nomain_to_meshCampbell Barton
2021-04-20Fix T87055: Crash applying modifier on mesh with multires dataCampbell Barton
2021-01-09Cleanup: use bool arguments & variablesCampbell Barton
2020-12-14Blenkernel: move DerivedMesh.c to c++Jacques Lucke
Required changes to make it compile with clang tidy: * Use c++ includes like (e.g. climits instead limits.h). * Insert type casts when casting from void* to something else. * Replace NULL with nullptr. * Insert casts from int to enum. * Replace designed initializers (not supported in C++ yet). * Use blender::Vector instead of BLI_array_staticdeclare (does not compile with C++). * Replace typedef statements. Ref T83357.
2020-11-06Merge branch 'blender-v2.91-release' into masterPhilipp Oeser
2020-11-06Fix T81997: Subsurf Optimal Display sticks after object conversionPhilipp Oeser
When using Optimal Display, some edges are not flagged `ME_EDGEDRAW` | `ME_EDGERENDER`. When the modifier is applied through the UI in the modifier stack this is not an issue because the `modifyMesh` callback is run with `MOD_APPLY_TO_BASE_MESH` (this will effectively turn of Optimal Display). When converting to mesh though, this will just get an evaluated mesh (where the edge flags are still the same as with the subdivision modifier). Now ensure every edge is flagged to draw after conversion. Maniphest Tasks: T81997 Differential Revision: https://developer.blender.org/D9331
2020-11-05Merge branch 'blender-v2.91-release'Campbell Barton
2020-11-05Fix T81136: Mesh.loop_triangles kept after applying modifiersCampbell Barton
2020-10-27Cleanup: Use const for PointCloud variableHans Goudey
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-10-07Refactor `BKE_id_copy_ex` to return the new ID pointer.Bastien Montagne
Note that possibility to pass the new ID pointer as parameter was kept, as this is needed for some rather specific cases (like in depsgraph/COW, when copying into already allocated memory). Part of T71219.
2020-09-17Pointclouds: support mesh <-> pointcloud in convert operatorPhilipp Oeser
Just converts verts to points and vice versa. Materials and Attribute layers are preserved (so for example if you set custom radii on the pointcloud, convert to mesh, then convert back to pointcloud, this will be preserved). Also not add a Radius layer by default (it is still added and filled when adding a pointcloud object from the menu), a global Radius property that will be used if there is no radius attribute can be added later. A Radius attribute can also be added in the pointcloud data properties (and filled via python). This will also add a new utility function that copies materials between datablocks: BKE_id_materials_copy ref T75717 Differential Revision: https://developer.blender.org/D7391
2020-09-09Cleanup: reduce variable scopesJacques Lucke
2020-08-18Mesh: merge `mesh_create_eval_final_{view,render}` functionsSybren A. Stüvel
Functions `mesh_create_eval_final_view()` and `mesh_create_eval_final_render()` were doing the exact same thing, except for a hack introduced in d3eb9dddd6b4 (2012-10-08, Better fix for T32846: dupligroup messes up particle instancing on rendering) that appears to be no longer necessary. Besides that, these functions had confusing names. Their functionality changed over time, and whether to do for-render or for-viewport evaluation is now actually determined by the depsgraph evaluation mode. This means that the `..._render` function could evaluate a mesh with viewport settings, and vice versa. The functions are now merged into `mesh_create_eval_final()`, and the hack has been removed. The `OB_NO_PSYS_UPDATE` flag has been removed entirely (instead of keeping it around as deprecated flag), because it was always only temporarily set on objects during mesh evaluation and thus not saved to the blend file. No expected functional changes as far as users are concerned.
2020-08-08Cleanup: use array syntax for sizeof with fixed valuesCampbell Barton
Also order sizeof(..) first to promote other values to size_t.
2020-07-30Fix T79207: Crash converting curve to meshCampbell Barton
2020-06-10Cleanup: move BKE_mesh_wrapper functions into own headerCampbell Barton
2020-05-25Mesh: skip conversion from edit-mesh to mesh in edit-modeCampbell Barton
This resolves a performance regression in 2.8x where every edit-mode update performed an edit-mesh to mesh conversion. Now the conversion will be lazily initialized if/when it's required. New BKE_mesh_wrapper_* functions abstract over mesh data access. Currently only edit-mesh and regular meshes are supported. In the future sub-surface meshes may be supported too.
2020-05-08Fix T76498: Refactoring - Rename BKE modifiers funtionsAntonio Vazquez
2020-04-22Objects: add infrastructure for hair, pointcloud, volume modifiersBrecht Van Lommel
There is no user visible difference in standard builds, as there are no volume modifiers yet. When using WITH_NEW_OBJECT_TYPES some deform only modifiers are now available for hair and pointcloud objects. Differential Revision: https://developer.blender.org/D7141
2020-04-08Cleanup: spellingCampbell Barton
2020-04-07Fix crash using object.to_mesh() when in edit modeSergey Sharybin
The root of the issue was caused by mesh which was a result of to_mesh() had the same edit_mesh pointer as the input object, causing double-free error. This fix makes it so result mesh does not have edit mesh pointer. Motivation part behind this is to make the result of to_mesh() to be somewhat independent from the input. Differential Revision: https://developer.blender.org/D7361
2020-03-26Fix T67888: Incorrect Wireframe After Applying SubSurf/MultiResJeroen Bakker
Show control edges stores the control edges in the mesh which is picked up by the draw manager. When applyng a subsurf (or multires) we don't want that data present in the base mesh. Any rebuilding of the mesh would overwrite the data anyway. This patch introduces a new flag for applying modifiers that can be checked to ignore storing display specific data in the base mesh. Reviewed By: Brecht van Lommel Differential Revision: https://developer.blender.org/D7163
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-13Cleanup: `BKE_mesh_nomain_to_mesh`: Add assert that source mesh is indeed ↵Bastien Montagne
not in Main.