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-08-10Edit Mesh: multi-object edit-mode support for knife projectCampbell 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-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
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-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-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-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-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-01Cleanup: Remove unused enum value in editmesh_knife.cGermano Cavalcante
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: scale points & snapping threshold by the DPI factorCampbell Barton
The points were too small on hi-dpi displays.
2021-03-29Fix vert/edge knife snapping when the cursor wasn't over a faceCampbell Barton
In this case, the cage location was left zeroed which was then projected back onto the screen to find the nearest screen space edge/vertex. This made snapping to the vertex/edge fail in some corner-cases where it was intended to work.
2021-03-29Knife: reduce redundant face picking queriesCampbell Barton
Reduce the maximum number of queries to find the face under the mouse cursor from 6x to 2x on cursor motion. Calculating the screen-space detail could perform 2x look-ups which have already been calculated.
2021-03-29Fix T83391: Knife sometimes snaps to object centerCampbell Barton
Knife snapping logic assumed having a face under the cursor meant the projected positions were set. This is not always the case as failure to ray-cast uses the back-buffer as a fallback.
2021-03-27Cleanup: spelling and commentsPratik Borhade
- comment added in struct `KnifeTool_OpData` - struct pointer name `lst` updated to `list` ( Guess its more readable ) - `KNF_MODEL_IGNORE_SNAP_ON` updated to `KNF_MODAL_IGNORE_SNAP_ON` - `KNF_MODEL_IGNORE_SNAP_OFF` updated to `KNF_MODAL_IGNORE_SNAP_OFF` Ref D10824
2021-03-18Cleanup: spellingCampbell Barton
2021-03-04Cleanup: use const arraysCampbell Barton
2021-02-05Cleanup: correct spelling in commentsCampbell Barton
2021-01-25Cleanup: Knife Tool: Remove redundant 'view3d_operator_needs_opengl' callsGermano Cavalcante
This function sets the `RegionView3D` matrices to the GPU. But the OpenGL library is not actually being used by the operator.
2021-01-25Fix T84964: Crash when running Knife Project in the backgroundGermano Cavalcante
Although the Knife Project operator converts 3D coordinates to screen space, it doesn't really need opengl. Differential Revision: https://developer.blender.org/D10178
2020-11-10Fix T65585: Knife fails when cursor away from the objectCampbell Barton
Zeroed mouse coordinates were being used making projection fail.
2020-10-19Spelling: Loose Versus LoseHarley Acheson
Corrects incorrect usages of the word 'loose' when 'lose' was required. Differential Revision: https://developer.blender.org/D9243 Reviewed by Campbell Barton
2020-10-19Spelling: Then Versus ThanHarley Acheson
Corrects incorrect usages of the words 'then' and 'than'. Differential Revision: https://developer.blender.org/D9246 Reviewed by Campbell Barton
2020-09-09Cleanup: reduce variable scopeJacques Lucke
2020-09-04Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fixSebastian Parborg
No functional changes
2020-08-20GPUState: Use explicit depth test enumClément Foucault
2020-08-18Cleanup: GPUState: remove double GPU_blend callsClément Foucault
2020-08-18GPUState: GPU_blend final API renamingClément Foucault
We now use GPU_blend for enabling / disabling blending and explicitly set the blend equation.
2020-08-18Cleanup: GPUState: Replace blend func separate by enumClément Foucault
2020-08-13GPUBatch: Merge phase and ownership flags and cleanup there usageClément Foucault
Also add new flags to communicate specific behavior to future backend.
2020-08-13GPUBatch: Remove most use of GPU_batch_draw_advanced()Clément Foucault
This is in order to better encapsulate / isolate the drawing code.
2020-08-13GPUShader: Change shader state tracking to be part of the GPUContextClément Foucault
This remove the use of batch->program and replace it with batch->shader. This will allow GL abstraction latter.
2020-08-07Cleanup: declare arrays arrays where possibleCampbell Barton
2020-07-28Cleanup: spelling, commentsCampbell Barton
2020-07-20Fix T70455: Knife Tool failing to cut edgesGermano Cavalcante
Analyzing the cuts, the points shown in the viewport (indicating the previous and current cuts) do not correspond to the final cuts. Sometimes a point, even snapped to a vert, is a point that cuts an edge and sometimes a point, even snapped to an edge, is a point that cuts only the face. This is because the detection of snapping vertices from mouse is different from the "snap" that detects vertices that are cut. So small projection inaccuracies can result in detection failures. The solution for this is simply to confirm the cuts whose vertices indicate the `prev` ou and `cur` point. The tolerance distance does not need to be calculated in these cases.
2020-07-18Cleanup: KnifeTool: Replace glPolygonOffset by GPU_polygon_offsetClément Foucault
2020-07-14Fix wrong vector size functions used in knife toolSergey Sharybin
Should not use copy_v3_v3 on a 2 element vectors.
2020-07-13Cleanup: remove unnecessary memberGermano Cavalcante
`Kfv-> sco` was being treated as a local variable, and can be confusing since this value is not updated when navigating the viewport.
2020-07-07Fix: remove accidental codeGermano Cavalcante
`v1` and `v2` are already set.
2020-07-07Optimization: use `BLI_bvhtree_intersect_plane` to detect faces that will be ↵Germano Cavalcante
affected by the knife tool The knife code currently calls the `BLI_bvhtree_overlap` function that tests the overlap between the mesh tree and an AABB that encompasses the points projected in the clip_start, clip_end and or clip_planes of the view. This resulted in many false positives since the AABB is very large. Often all the triangles "overlapped". The solution was to create a new function that actually tests the intersection of AABB with a plane. Even not considering the clip_planes of the view, this solution is more appropriate than using overlap. Differential Revision: https://developer.blender.org/D8229
2020-07-06Optimization: Don't compute the snap to face on the knife tool twiceGermano Cavalcante
Both `knife_find_closest_vert` and `knife_find_closest_edge` call `knife_find_closest_face`. Thus, running the raycast twice and setting values like `kcd->curr.bmface` and `kcd->curr.is_space` repeatedly. So: - separate `knife_find_closest_face` from `knife_find_closest_vert` and `knife_find_closest_edge`. - rename `knife_find_closest_vert` to `knife_find_closest_vert_of_face` - rename `knife_find_closest_edge `to `knife_find_closest_edge_of_face`. - do not set parameters previously set. Differential Revision: https://developer.blender.org/D8198
2020-07-03Cleanup: Editors/Mesh, Clang-Tidy else-after-return fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/editors/mesh` module. No functional changes.
2020-07-01Cleanup: spellingCampbell Barton
2020-06-01Fix T77241: NDOF navigation doesn't work with the knife toolCampbell Barton
Also allow NDOF with loop-cut.
2020-04-14GPUShader: Implement workaround for gizmo drawing on sRGB framebufferClément Foucault
This solution involves adding a uniform to each fragment shader that is used by gizmo drawing and use the framebuffer state to set this uniform accordingly. This solution can also be carried to external shaders (addons). A single line of code would then be enough to fix the issue. The only trickery here is the dummy define: `#define srgb_to_framebuffer_space(a)` This is in order to avoid breaking other DRW shaders that use the same fragment shader code but do not need the tranformation. Related to T74139 Reviewed By: brecht, campbellbarton Differential Revision: https://developer.blender.org/D7261
2020-04-03Cleanup: use abbreviated names for unsigned types in editorsCampbell Barton
2020-03-27Cleanup: rename WM_modalkeymap API names, matching WM_keymapCampbell Barton
Rename: - WM_modalkeymap_add to WM_modalkeymap_ensure - WM_modalkeymap_get to WM_modalkeymap_find