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
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-05-07Refactor: libquery: Add Mesh foreach_id support.Bastien Montagne
2020-04-03Cleanup: Animation, move AnimData API to `anim_data.c`/`BKE_anim_data.h`Sybren A. Stüvel
The `BKE_animsys.h` and `anim_sys.c` files already had a an "AnimData API" section. The code in that section has now been split off, and placed into `BKE_anim_data.h` and `anim_data.c`. All files that used to include `BKE_animsys.h` have been adjusted to only include the animation headers they need (sometimes none). No functional changes.
2020-03-19Cleanup/refactor: remove BKE_idcode, in favour of BKE_idtype.Bastien Montagne
Mpving utils from idcode to idtype proved to be somewhat painful for some reasons, but now all looks good. Had to add a fake/empty shell for the special snowflake too, `ID_LINK_PLACEHOLDER/INDEX_ID_NULL`...
2020-03-19Fix typos in names fo new mesh and texture IDTypeInfo.Bastien Montagne
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-17Cleanup: use more descriptive variable name for the data-maskCampbell Barton
Make it explicit this data mask is added to the default mask.
2020-03-09Cleanup: Move `BKE_animdata_free()` call out of each IDType free data.Bastien Montagne
This has been long standing TODO... Note that remaining usages of BKE_xxx_delete should all be carefully checked for and utilmately nuked in favor of `BKE_id_delete()`, think we still have quiet a few bugs hidden in those (code seems to usually assume those functions do a full ID deletion, which is not the case).
2020-03-09Cleanup: Replace ABS/SQUARE/CUBE with function callsSergey Sharybin
While it might be handy to have type-less functionality which is similar to how C++ math is implemented it can not be easily achieved with just preprocessor in a way which does not have side-effects on wrong usage. There macros where often used on a non-trivial expression, and there was at least one usage where it was causing an actual side effect/bug on Windows (see change around square_f(sh[index++]) in studiolight.c). For such cases it is handy to have a function which is guaranteed to have zero side-effects. The motivation behind actually removing the macros is that there is already a way to do similar calculation. Also, not having such macros is a way to guarantee that its usage is not changed in a way which have side-effects and that it's not used as an inspiration for cases where it should not be used. Differential Revision: https://developer.blender.org/D7051
2020-03-06Cleanup: Mesh: Move to IDTypeInfo and remove unused BKE API.Bastien Montagne
2020-03-05Sculpt Face SetsPablo Dobarro
Face Sets are the new system to control the visibility state of the mesh in sculpt and paint modes. They are designed to work in modes where brushes are the primary way of interaction and they provide much more control when working with meshes with complex shapes and overlapping surfaces. This initial commit includes: - Sculpt Face Sets data structures and PBVH rendering. - Face Set overlay and opacity controls. - Sculpt Undo support. - Remesher reprojection support. The visibility state of the mesh is also preserved when remeshing. - Automasking and Mesh filter support. - Mask expand operator mode to expand Face Sets (Shift + W) and flood fill areas by connectivity (press Ctrl while expanding). - Sculpt Mode Face Sets and Visibility API. - Sculpt Face Sets creation and visibility management operators. - Operator to randomize the Face Sets colors. - Draw Face Sets brush tool to create and edit the Face Sets. Drawing on the mesh creates a new Face Set. Pressing Ctrl before drawing modifies the Face Set under the brush at the beginning of the stroke. - Updated keymap and menu to work with Face Sets from Sculpt Mode (H to toggle visibility, Alt + H to show all, Shit + H to hide). - Pie menu on the W key with Face common Sets operations. Know limitations: - Multires support. The Face Sets and Visibility API needs to be implemented for Multires. Reviewed By: jbakker, #user_interface, Severin Differential Revision: https://developer.blender.org/D6070
2020-03-04Refactor ID make local to use a single flag parameter.Bastien Montagne
Instead of using anonymous booleans flags, also allows to keep the same behavior in all cases, without needing special handling from calling code for our beloved oddballs object proxies...
2020-03-04Cleanup: ID make local: remove `id_in_bmain` argument.Bastien Montagne
This info is now stored in ID tags themselves, so no need to pass an extra anonymous boolean parameter around, yay!
2020-03-04Cleanup: Rename 'make local' functions to new scheme.Bastien Montagne
Also removed some only used locally from the header, `BKE_lib_id.h` is already way too big, no need to overload it with unused things.
2020-02-17Fix T73817: Shape key users not properly mapped when duplicating their obdata.Bastien Montagne
Once again those crappy weirdos IDs with their crappy weirdos 'loopback' pointers... This is a quick hack for now, think id_copy needs to be reworked a bit to supported re-entrant sub-ID copying (also an issue with nodes I bet).
2020-02-10Cleanup/refactor: Rename `BKE_library` files to `BKE_lib`.Bastien Montagne
Note that `BKE_library.h`/`library.c` were renamed to `BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here. Part of T72604.
2020-02-07Cleanup: use of 'unsigned'Campbell Barton
- Replace 'unsigned' used on it's own with 'uint'. - Replace 'unsigned const char' with 'const uchar'.
2020-02-05T73589: Code Quality: Renaming on BKE_material.hAntonio Vazquez
Old Name New Name ========= ========= init_def_material BKE_materials_init BKE_material_gpencil_default_free BKE_materials_exit test_object_materials BKE_object_materials_test test_all_objects_materials BKE_objects_materials_test_all give_matarar BKE_object_material_array give_totcolp BKE_object_material_num give_current_material_p BKE_object_material_get_p give_current_material BKE_object_material_get assign_material BKE_object_material_assign assign_matarar BKE_object_material_array_assign give_matarar_id BKE_id_material_array give_totcolp_id BKE_id_material_num assign_material_id BKE_id_material_assign clear_matcopybuf BKE_material_copybuf_clear free_matcopybuf BKE_material_copybuf_free copy_matcopybuf BKE_material_copybuf_copy paste_matcopybuf BKE_material_copybuf_paste BKE_material_init_gpencil_settings BKE_gpencil_material_attr_init BKE_material_add_gpencil BKE_gpencil_material_add BKE_material_gpencil_get BKE_gpencil_material BKE_material_gpencil_default_get BKE_gpencil_material_default BKE_material_gpencil_settings_get BKE_gpencil_material_settings
2019-09-27Voxel remesh: Enable adaptivityPablo Dobarro
This commit enables OpenVDB adaptivity in the voxel remesher. It can be useful to reduce the polygon count if you want to switch to dyntopo after using the voxel remesher workflow. Reviewed By: brecht Differential Revision: https://developer.blender.org/D5918
2019-09-23Modifiers: every modifier now copies mesh settings, fixing texture space issuesBrecht Van Lommel
Modifier stack evaluation would copy mesh settings other than mesh topology automatically, outside of the individual modifier evaluation. This leads to hard to understand code, and makes it unclear which settings are available in following modifiers, and which only after the entire stack is evaluated. Now every modifier is responsible to ensure the mesh it outputs preserves materials, texture space and other settings, or alters them as needed. Fixes T64739: incorrect texture space for various modifiers Differential Revision: https://developer.blender.org/D5808
2019-09-23Cleanup: remove unimplemented texture space rotation variablesBrecht Van Lommel
2019-09-23Cleanup: remove Mesh.bb and Curve.bb, no reason for these to be persistentBrecht Van Lommel
These were only strictly valid for texture space calculation, don't store them since they should not be used after that. Only store a flag to indicate if the auto texture space has been evaluated. In the future it might make sense to store bounding boxes at the mesh level to speed up bounding box computation for multiple objects using the same mesh, but then it will need to be implemented differently.
2019-09-21Revert "Modifiers: every modifier now copies mesh settings, fixing texture ↵Brecht Van Lommel
space issues" This reverts commit e7a514369fe700dcc5a1fe433c8f709ed9595ded, it introduces a bug in selection in edit mode. Fixes T70103: can't select extruded Vertex Ref T64739
2019-09-19Clean-up/safety check in new BKE_mesh_copy_settings().Bastien Montagne
From rBe7a514369fe70, since I did not have time to do proper review in D5808... Note that we could also consider that shallow copy of src should never be dst of that function and add some asserts instead. For now going the safest and simplest way though.
2019-09-19Modifiers: every modifier now copies mesh settings, fixing texture space issuesBrecht Van Lommel
Modifier stack evaluation would copy mesh settings other than mesh topology automatically, outside of the individual modifier evaluation. This leads to hard to understand code, and makes it unclear which settings are available in following modifiers, and which only after the entire stack is evaluated. Now every modifier is responsible to ensure the mesh it outputs preserves materials, texture space and other settings, or alters them as needed. Fixes T64739: incorrect texture space for various modifiers Differential Revision: https://developer.blender.org/D5808
2019-09-17Fix T69809, T69810: sculpt gone or crashing after renderBrecht Van Lommel
Make a distinction between flush sculpt changes for rendering, and forcing sculpt data structures to be rebuilt after mesh changes. Also don't use PBVH for renders.
2019-09-09DNA: use defaults for Object, Mesh, MaterialCampbell Barton
2019-08-27Fix multires modifier using too much memory outside of sculpt modeBrecht Van Lommel
This reduce memory usage by about 25% in object mode for multires meshes.
2019-08-25Cleanup: remove UV name syncing functionCampbell Barton
MTFace's on the mesh are now only used for conversion. There is no need to keep both UV layers in sync at once.
2019-08-25Cleanup: rename mesh looptri/tessface functionsCampbell Barton
Use consistent terminology.
2019-08-25Cleanup: remove tessface loop from set-smooth functionCampbell Barton
2019-08-24Transform: option to transform origins in object modeCampbell Barton
Currently supports mesh, armature, lattice, curve & metaballs. Access from pivot popover.
2019-08-21Cleanup: vertex coordinate access, naming & minor changesCampbell Barton
This also splits vertex access and allocation so it's possible to copy coordinates into an existing array without allocating it.
2019-08-21Cleanup: use const arguments for vertex coordsCampbell Barton
2019-08-14OpenVDB: Voxel RemesherPablo Dobarro
The voxel remesher introduces a new workflow for sculpting without any of the limitations of Dyntopo (no geometry errors or performance penalty when blocking shapes). It is also useful for simulations and 3D printing. This commit includes: - Voxel remesh operator, voxel size mesh property and general remesh flags. - Paint mask reprojection. - Geometry undo/redo for sculpt mode. This should support remesh operations as well as future tools that modify the topology of the sculpt in a single step, like trimming tools or mesh insert brushes. - UI changes in the sculpt topbar and the mesh properties pannel. Reviewed By: brecht Differential Revision: https://developer.blender.org/D5407
2019-07-31Add operator for removing unused material slotsLukas Stockner
Reviewers: campbellbarton, brecht Reviewed By: brecht Subscribers: brecht Differential Revision: https://developer.blender.org/D4991
2019-07-31Added BKE_mesh_clear_geometry() functionSybren A. Stüvel
This function makes it possible to clear/remove/nuke all the geometry in a mesh, allowing functions like `Mesh.from_python()` to construct a new mesh in its place. Without this function, code like in T67627 have to allocate a new Mesh datablock, fill that, and swap out the old Mesh for the new one. This introduces issues when exporting, as the new mesh could be seen by an exporter as unrelated to the old one. Shape keys are not freed by this function. Freeing those would require tagging the depsgraph for relations update, which is an expensive operation. They should be removed explicitly if necessary. Material slots are also not cleared by this function, in the same way that they are not cleared when manually removing all geometry from a mesh. The `BKE_mesh_clear_geometry()` function is available in Python as `mesh.clear_geometry()`. Reviewed by: mont29, brecht Differential Revision: https://developer.blender.org/D5373
2019-07-28Fix T67385: Bind in Laplacian Deform Modifier with new vertex group in Edit ↵Bastien Montagne
Mode crashes Blender. Main issue in that report was that meshes generated from `mesh_create_eval_final_view()` and the like need some special freeing handling (as, among other things, they borrow and do not own their potential editmesh data...). Factorized that into a helper func also used by `BKE_object_free_derived_caches()`.
2019-07-11Fix T66672: auto and manual texture space affected by modifiersBrecht Van Lommel
It should be based on the mesh bounds before modifier stack evaluation, but some modifiers were causing it to be recomputed. The flag to disable texture space recomputation was not preserved through modifier evaluation. Differential Revision: https://developer.blender.org/D5225
2019-07-10Cleanup: avoid line breaks from trailing commentsCampbell Barton
2019-07-02Fix T65798: Incorrect auto-tex space for CurvesSergey Sharybin
There are several aspects to the fix: - Always calculate bounding box for meshes and curves from dependency graph evaluation function. There is a reason why mesh was tagged for geometry update, so can not be spare here in attempts to avoid calculation. - Copy bounding box and texture space to original object for active dependency graph. This matches object-level bounding box and allows to remove bounding box evaluation from RNA.
2019-07-01Revert "Fix T65798: Incorrect auto-tex space for Curves"Sergey Sharybin
The fix broke a lot of Cycles regression tests. Reverting for now. This reverts commit 6b9c41719bdf7514b9f9ca88e8fb09d3270cf1f2.
2019-07-01Fix T65798: Incorrect auto-tex space for CurvesSergey Sharybin
There are several aspects to the fix: - Always calculate bounding box for meshes and curves from dependency graph evaluation function. There is a reason why mesh was tagged for geometry update, so can not be spare here in attempts to avoid calculation. - Remove texture space evaluation from RNA accessor. Such data is to be evaluated by a dependency graph. Don't see a reason to be different here: we never force evaluation of any kind from RNA. - Copy bounding box and texture space to original object for active dependency graph. This matches object-level bounding box and allows to remove bounding box evaluation from RNA.
2019-06-07Free evaluated mesh when owner mesh changesSergey Sharybin
Ensures that evaluated mesh shares the same settings as its owner when updates related on animation system happens.
2019-05-29Fix T58251: Cycles ignores linked meshes when renderingSergey Sharybin
The idea is to share a mesh data-block as a result across all objects which are sharing same original mesh and have no effective modifiers. This mesh is owned by an original copy-on-written version of object data. Tricky part is to make sure it is only initialized once, and currently a silly mutex lock is used. In practice it only locks if the mesh is not already there. As an extra bonus, even viewport memory is also lower after this change. Reviewers: brecht, mont29 Reviewed By: brecht, mont29 Differential Revision: https://developer.blender.org/D4954
2019-04-27Cleanup: comments (long lines) in blenkernelCampbell Barton
2019-04-22Cleanup: style, use braces for blenkernelCampbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-10Fix T62449: Subsurf+hidden facesJeroen Bakker
When using subsurf (and other modifiers) the edit flags are not propagated correctly. Currently we assume to read the edit flags from the original object which is kind off hinding the real issue. Modifiers use `mesh_new_nomain_from_template_ex` to create a copy from an existing mesh. this method is only used by modifiers. So by placing this we will make sure that editmesh is propagated. Reviewed By: fclem, sergey Maniphest Tasks: T62449 Differential Revision: https://developer.blender.org/D4666