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-08Cleanup: move public doc-strings into headers for 'editors'Campbell Barton
Ref T92709
2021-08-20Cleanup: use "free_data" suffix when the argument isn't freedCampbell Barton
Avoid API misuse that caused leaks in T90791 & 2788b0261cb7d33a2f6f2978ff4f55bb4987edae.
2021-08-20Cleanup: rename BKE_mesh_free_data -> BKE_mesh_free_data_for_undoCampbell Barton
This function only makes sense for undo which doesn't initialize the meshes ID. Otherwise BKE_id_free should be used.
2021-08-20Cleanup: rename BKE_mesh_free -> BKE_mesh_free_dataCampbell Barton
It wasn't obvious this didn't free the memory of the mesh it's self leading to memory leaks.
2021-07-13Cleanup: replace BKE_customdata.h in BKE_editmesh.hCampbell Barton
Only DNA_customdata_types.h is needed for BMEditMesh.
2021-07-13Undo: optimize edit-mode undoCampbell Barton
- Tag the object data instead of the object when decoding (this avoids duplicating mesh object-data on each undo-step). - Calculate face normals as part of multi-threaded tessellation. This gives ~11% speedup with 1.5x million polygons.
2021-07-13Cleanup: minor changes to edit-mesh API callsCampbell Barton
Rename: - EDBM_mesh_free -> EDBM_mesh_free_data BKE_editmesh_free -> BKE_editmesh_free_data Since this doesn't free the edit-mesh pointer. - BKE_editmesh_free_derivedmesh -> BKE_editmesh_free_derived_caches Since this no longer uses derived-mesh, match naming for the related object function BKE_object_free_derived_caches. Also remove `do_tessellate` argument from BKE_editmesh_create, since the caller can explicitly do this if it's needed, with the advantage that it can be combined with normal calculation which is faster on high-poly meshes.
2021-06-15BLI: use explicit task isolation, no longer part of parallel operationsBrecht Van Lommel
After looking into task isolation issues with Sergey, we couldn't find the reason behind the deadlocks that we are getting in T87938 and a Sprite Fright file involving motion blur renders. There is no apparent place where we adding or waiting on tasks in a task group from different isolation regions, which is what is known to cause problems. Yet it still hangs. Either we do not understand some limitation of TBB isolation, or there is a bug in TBB, but we could not figure it out. Instead the idea is to use isolation only where we know we need it: when holding a mutex lock and then doing some multithreaded operation within that locked region. Three places where we do this now: * Generated images * Cached BVH tree building * OpenVDB lazy grid loading Compared to the more automatic approach previously used, there is the downside that it is easy to miss places where we need isolation. Yet doing it more automatically is also causing unexpected issue and bugs that we found no solution for, so this seems better. Patch implemented by Sergey and me. Differential Revision: https://developer.blender.org/D11603
2021-06-08BLI: support disabling task isolation in task poolJacques Lucke
Under some circumstances using task isolation can cause deadlocks. Previously, our task pool implementation would run all tasks in an isolated region. Now using task isolation is optional and can be turned on/off for individual task pools. Task pools that spawn new tasks recursively should never enable task isolation. There is a new check that finds these cases at runtime. Right now this check is disabled, so that this commit is a pure refactor. It will be enabled in an upcoming commit. This fixes T88598. Differential Revision: https://developer.blender.org/D11415
2021-05-27Cleanup: use UndoMesh as links instead of allocating LinkDataCampbell Barton
While the advantage isn't large, it's simpler to skip the intermediate link. Also remove unused next and previous struct members from MeshUndoStep_Elem.
2021-05-27Undo: resolve inefficient edit-mesh memory use with multiple objectsCampbell Barton
When editing more than 1 object at a time, complete copies of each mesh were being stored. Now the most recent undo-data for each mesh is used (when available).
2021-02-26Cleanup: move comment into function doc-stringCampbell Barton
2021-02-25Fix T85975: Edit-mode undo/redo removes overlaysCampbell Barton
Setting the active object when decoding undo steps missed a call to ED_object_base_active_refresh.
2021-02-25Fix T85974: Edit-mode undo/redo causes assertionCampbell Barton
Assert the poll function succeeds after setting the active object.
2021-02-14Cleanup: spellingCampbell Barton
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-02-05Cleanup: correct spelling in commentsCampbell Barton
2021-02-05Cleanup/refactor: Undosys: Get rid of the magic values for undo direction.Bastien Montagne
Move `eUndoStepDir` to `BKE_undo_system.h` and use its values everywhere. Note that this also introduce the `STEP_INVALID` value in that enum. Finally, kept the matching struct members in some lower-level readfile code as an `int` to avoid having to include `BKE_undo_system.h` in a lot of unrelated files.
2021-01-06UndoType: Refactor: replace `use_context` boolean by a bitflag.Bastien Montagne
We will soon need more options here, sinmpler and cleaner to use a bitflag then.
2021-01-06Cleanup/refactor: UndoType: Clarify `use_context` variable.Bastien Montagne
Rename it to mark it is only for `encode` callbacks, fix `encode` callback of text undo to early fail in case it gets a NULL context, add an assert to `BKE_undosys_step_push_with_type` that context is not NULL when undotype requires a valid one. Note that in practice this should not change anything, currently it seems that we always get a valid context in `BKE_undosys_step_push_with_type`?
2020-12-15Cleanup: reduce indirect DNA header inclusionCampbell Barton
Remove DNA headers, using forward declarations where possible. Also removed duplicate header, header including it's self and unnecessary inclusion of libc system headers from BKE header.
2020-10-27Cleanup: use over-line for doxy commentsCampbell Barton
Follow our code style for doxygen sections.
2020-10-08Cleanup/Refactor: Shapekey: Get rid of `BKE_key_copy_nolib()`Bastien Montagne
Once again, no behavioral change expected here.
2020-07-03Clang-Tidy: Enable bugprone-misplaced-widening-castSergey Sharybin
2020-04-30Task: Use TBB as Task SchedulerBrecht Van Lommel
This patch enables TBB as the default task scheduler. TBB stands for Threading Building Blocks and is developed by Intel. The library contains several threading patters. This patch maps blenders BLI_task_* function to their counterpart. After this patch we can add more patterns. A promising one is TBB:graph that can be used for depsgraph, draw manager and compositor. Performance changes depends on the actual hardware. It was tested on different hardwares from laptops to workstations and we didn't detected any downgrade of the performance. * Linux Xeon E5-2699 v4 got FPS boost from 12 to 17 using Spring's 04_010_A.anim.blend. * AMD Ryzen Threadripper 2990WX 32-Core Animation playback goes from 9.5-10.5 FPS to 13.0-14.0 FPS on Agent 327 , 10_03_B.anim.blend. Reviewed By: brecht, sergey Differential Revision: https://developer.blender.org/D7475
2020-04-09TaskScheduler: Minor Preparations for TBBBrecht Van Lommel
Tasks: move priority from task to task pool {rBf7c18df4f599fe39ffc914e645e504fcdbee8636} Tasks: split task.c into task_pool.cc and task_iterator.c {rB4ada1d267749931ca934a74b14a82479bcaa92e0} Differential Revision: https://developer.blender.org/D7385
2020-03-23Revert "COW: Edit Mesh: Do not copy the looptris pointer"Germano Cavalcante
The looptri is repeated in the linked Meshes but the pointer is only referenced in the evaluated ones. This reverts commit 64982e213f014123d1b0406cf9ae893910a6a3d3.
2020-03-23COW: Edit Mesh: Do not copy the looptris pointerGermano Cavalcante
No functional changes. Differential Revision: https://developer.blender.org/D7173
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-02-04Fix T73234: Undo/redo with local collection crashesCampbell Barton
Resolves crashes when edit-mode undo data wasn't included because it wasn't visible, also resolves T73416.
2020-01-07BMesh: remove BMEditMesh.ob pointerCampbell Barton
Remove this pointer since it's linking Mesh data back to the object, where a single edit-mesh may have multiple object users, causing incorrect assumptions in the code. Resolves dangling pointer part of the T72667 crash, although there are other issues which still need to be fixed. In EDBM_op_finish and EDBM_update_generic, full Main lookups have been added which should be replaced with mesh argument or the update tagging moved elsewhere.
2020-01-07BMesh: remove BMEditMesh.ob use for undoCampbell Barton
2019-11-27Fix T71865: Separating mesh parts breaks shape keysCampbell Barton
This was an old bug which could be caused by saving after separating. Changes from 79b703bb635e made this fail reliably. Update shape key indices when they may be used again later.
2019-11-07Fix T69822: Switching sculpt objects breaks undoCampbell Barton
This introduces object mode tagging for data which hasn't yet been written back to the ID data. Now when selecting other sculpt objects, the original objects data is flushed back to the ID before writing a memfile undo step.
2019-07-28Cleanup: remove unused ID-map undo APICampbell Barton
Removing this since it was added for TexFace support which has since been removed.
2019-07-11Undo System: add is_final argument (no functional changes)Campbell Barton
This is needed step out of undo steps which accumulate changes, larger changes could be made to handle this but better not make them at this point.
2019-04-21Cleanup: comments (long lines) in editorsCampbell 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-03-13Fix T62484: Mesh undo ignores selection modeCampbell Barton
2019-03-12Cleanup: styleCampbell Barton
2019-03-07Refactor CDData masks, to have one mask per mesh elem type.Bastien Montagne
We already have different storages for cddata of verts, edges etc., 'simply' do the same for the mask flags we use all around Blender code to request some data, or limit some operation to some layers, etc. Reason we need this is that some cddata types (like Normals) are actually shared between verts/polys/loops, and we don’t want to generate clnors everytime we request vnors! As a side note, this also does final fix to T59338, which was the trigger for this patch (need to request computed loop normals for another mesh than evaluated one). Reviewers: brecht, campbellbarton, sergey Differential Revision: https://developer.blender.org/D4407
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-17Cleanup: rename Mesh.edit_btmesh -> edit_meshCampbell Barton
When bmesh was in a branch we had both edit_mesh and edit_btmesh, now there is no reason to use this odd name.
2019-02-07Fix T61272: Undo fails to track multi-edit mode enter/exitCampbell Barton
Objects leaving edit-mode weren't restored by edit-mode undo steps.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-06Undo System: remove accumulate/store modesCampbell Barton
This complicated handling of undo steps in a generic way especially switching between undo systems that stored data to ones that accumulated changes. Now each undo system must treat it's steps as check-point, internally it can apply/rewind changes. This commit also fixes projection paint where the object mode wasn't following the undo steps.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2019-01-31Fix edit-mesh undo using the current selectionCampbell Barton
Any meshes selected would be added to the mode when reading undo.
2019-01-31Undo System: add Main argument to encode/decodeCampbell Barton
Needed since we don't always have the context, and avoids adding G_MAIN into undo callbacks.