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-07-02Cleanup: Use const variables for object's evaluated meshHans Goudey
Generally the evaluated mesh should not be changed, since that is the job of the modifier stack. Current code is far from const correct in that regard. This commit uses a const variable for the reult of `BKE_object_get_evaluated_mesh` in some cases. The most common remaining case is retrieving a BVH tree from the mesh.
2021-07-02Cleanup: refactor edit-mesh copy functions into functionsCampbell Barton
2021-07-02Cleanup: spelling in commentsCampbell Barton
2021-06-28Fix edit-mesh random select regression in random seed usePiotr Makal
Fix regression in 9c202281287743494fd7d81a13970053bc8a33b5 that wasn't using the random seed correctly.
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-24Depsgraph: support flushing parameters without a full COW updateCampbell Barton
Avoid computationally expensive copying operations when only some settings have been modified. This is done by adding support for updating parameters without tagging for copy-on-write. Currently only mesh data blocks are supported, other data-blocks can be added individually. This prepares for changing values such as edit-mesh auto-smooth angle in edit-mode without duplicating all mesh-data. The benefit will only be seen when the user interface no longer tags all ID's for copy on write updates. ID_RECALC_GEOMETRY_ALL_MODES has been added to support situations where non edit-mode geometry is modified in edit-mode. While this isn't something user are likely to do, Python scripts may change the underlying mesh. Reviewed By: sergey Ref D11377
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-24Cleanup: remove outdated/redundant commentsCampbell Barton
2021-06-23Fix T89342: Select mirror with a zero length central edge assertsCampbell Barton
2021-06-23Fix T89367: Crash running edit-mesh select_linked_pick from PythonCampbell Barton
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-22Fix T89347: Edit-mesh make planar faces doesn't update face normalsCampbell Barton
Invalid face normals were used for tessellation.
2021-06-22Fix T89345: Edit-mesh decimate doesn't update face normalsCampbell Barton
Invalid face normals were used for tessellation.
2021-06-21Fix T32214: Wireframe edge select fails with verts behind the viewCampbell Barton
This resolves a long standing bug in edge selection (picking, circle, box & lasso). Now when one of the edges vertices fails to project into screen space, the edge is clipped by the viewport to calculate an on-screen location that can be used instead. This isn't default as it may be important for the on the screen location not to be clipped by the viewport.
2021-06-21Cleanup: swap top/bottom args to planes_from_projmatCampbell Barton
X & Z were ordered min/max, where as Y was max/min.
2021-06-18Performance: Limit recounting during selection mode flushing.Jeroen Bakker
This patch ensures that selection mode flushing updates total selection counts internally. This reduces recounting when we are sure that the input total selection counts were up to date. For example for circle selection the total selection counts were correct. But during flushing the selection could have been changed and therefore the selection was always recounted. This increased the performance on selected system from 6.90 FPS to 8.25 FPS during circle selection operations. Before: {F10179981} After: {F10179982} Reviewed By: mano-wii Differential Revision: https://developer.blender.org/D11647
2021-06-17Cleanup: split BKE_mesh_copy_settings into two functionsCampbell Barton
- BKE_mesh_copy_parameters_for_eval to be used for evaluated meshes only as it doesn't handle ID user-counts. - BKE_mesh_copy_parameters is a general function for copying parameters between 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-15Fix missing normal update in edit-mesh blend-from shape operatorCampbell Barton
2021-06-14BMesh: support face-normal calculation in normal & looptri functionsCampbell Barton
Support calculating face normals when tessellating. When this is done before updating vertex normals it gives ~20% performance improvement. Now vertex normal calculation only needs to perform a single pass on the mesh vertices when called after tessellation. Extended versions of normal & looptri update functions have been added: - BM_mesh_calc_tessellation_ex - BM_mesh_normals_update_ex Most callers don't need to be aware of this detail by using: - BKE_editmesh_looptri_and_normals_calc - BKE_editmesh_looptri_and_normals_calc_with_partial - EDBM_update also takes advantage of this, where calling EDBM_update with calc_looptri & calc_normals enabled uses the faster normal updating logic.
2021-06-14Edit Mesh: use params arg for update function, add calc_normals argCampbell Barton
Rename function EDBM_update_generic to EDBM_update, use a parameters argument for better readability. Also add calc_normals argument, which will have benefits when calculating normals and tessellation together is optimized.
2021-06-13Cleanup: redundant initializationCampbell Barton
These were limited to obvious cases. Some less obvious cases were kept as refactoring might make them necessary in future.
2021-06-09Cleanup: remove redundant checks which have already been testedCampbell Barton
Note that these changes are limited simple cases as these kinds of changes could allow for errors when refactoring code when the known state is not so obvious.
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-06-01GPU: add 2D projection functionCampbell Barton
When projecting into screen space Z value isn't always needed. Add 2D projection functions, renaming them to avoid accidents happening again. - Add GPU_matrix_project_2fv - Add ED_view3d_project_v2 - Rename ED_view3d_project to ED_view3d_project_v3 - Use the 2D versions of these functions when the Z value isn't used.
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-05-06Merge branch 'blender-v2.93-release'Campbell Barton
2021-05-06Fix memory leak in object.mode_set_with_submodeCampbell Barton
2021-04-29Merge branch 'blender-v2.93-release'Campbell Barton
2021-04-29Fix T86335: Knife tool fails on object with zero scaled axisCampbell Barton
Use invert_m4_m4_safe_ortho for the knife tool to support operating on objects with a single zero scaled axis.
2021-04-29Merge branch 'blender-v2.93-release'Campbell Barton
2021-04-29Merge branch 'blender-v2.93-release'Campbell Barton
2021-04-29Fix T87823: Select similar doesn't work with small facesCampbell Barton
FLT_EPSILON was added to the threshold when comparing values, this caused problems selecting similar small faces since the areas can be very small in this case. Also increase the displayed precision so it's easier to use smaller numbers.
2021-04-29UI: increase precision of bisect thresholdCampbell Barton
The default value of `0.0001` was displaying as `0.000`, increase the display precision to 5 since this value often needs to be small.
2021-04-19Cleanup: use 'wmOperator.ptr' in draw functionsCampbell Barton
Draw functions used RNA_pointer_create to create the pointer, however this already exists in the operator.
2021-04-19Merge branch 'blender-v2.93-release'Campbell Barton
2021-04-19Fix creating operator properties without an owner_idCampbell Barton
Any dynamic enum access would not use the callback. Always set the owner_id to avoid this causing problems. Oversight in 919558854d624f5db40acfa9f5674ac8c94873b6
2021-04-19Merge branch 'blender-v2.93-release'Campbell Barton
2021-04-19Fix spin-gizmo not allowing click events to select verticesCampbell Barton
2021-04-17Transform Snap Refactor: Use enum for cage snap optionsGermano Cavalcante
This allows the addition of the `SNAP_GEOM_CAGE` option. Currently unused.
2021-04-06Fix T48167: Mesh select random factor is not accuratePhilipp Oeser
Selecting random percentage would not reliably guarantee the precise percentage of selected elements now randomize an index array instead and use the precise number of elements from this array. Note that this change has only been made to edit-mesh and should be applied to all random selection operators.
2021-04-01Cleanup: Remove unused enum value in editmesh_knife.cGermano Cavalcante
2021-04-01Fix compilation error: "too many arguments to function"Germano Cavalcante
Seem on linux. Caused by rB6ec463a4b754bf69baf94ba6b3683655f6834ccd
2021-03-31Cleanup: naming for edit-mesh nearest distance valuesCampbell Barton
- Don't use `r_` prefix for an argument that's also read from (this is meant for return only arguments). - Rename variables to make it clear the distance is pixels, using manhattan length measurement.
2021-03-31Fix T87080: Select shortest path fails in face modeCampbell Barton
Regression in 80cbbd2843c2358879b1a710d81a3b41e1468327. Unfortunately keeping selection picking behavior as well as supporting finding the nearest face within a radius requires an inconsistency between x-ray and back-buffer selection that doesn't work well using the current arguments. Resolve by adding an argument that causes the input distance to be ignored for back-buffer selection. This is used by selection picking but not the knife tool. This changes behavior for path-selection in face mode, which now uses a margin for back-buffer selection. From my own testing this doesn't seem to be a problem like it could be for regular selection picking.
2021-03-30Cleanup: use doxy sections and rearrange editmesh_knife.cGermano Cavalcante
2021-03-30Cleanup: clang-tidy warning.Jeroen Bakker
2021-03-30Knife: snap refactor, prepare for snap gizmoGermano Cavalcante
Minor changes preparing for snap gizmo inclusion. - Extract `knife_snap_edge_in_angle` into a utility function. - Check the snap vertex on closest edge instead of the face. - Add MODE_INVOKING state. - Remove unnecessary NULL checks. - Control 'ignore_edge_snapping' while dragging instead of checking dragging in `knife_snap_update_from_mval`. Ref D8220
2021-03-29Knife: support vert/edge snapping when not directly over a faceCampbell Barton
Respect the distance argument to EDBM_face_find_nearest, when zero, sample a single pixel, otherwise sample a region. Knife uses the selection-buffer to pick a face when the ray-cast failed. This was meant to allow snapping to nearby faces however as the margin was ignored, it was only used in edge cases where the ray-cast missed but the pixel didn't. Now the face-picking threshold is working as expected. Note that other callers to EDBM_face_find_nearest have been updated so set their distance argument to zero so this only impacts the knife. Regular selection and path select could be modified separately if users prefer this behavior.