Age | Commit message (Collapse) | Author |
|
|
|
Prevents undo push when no cut has been made.
Reviewed By: campbellbarton
Ref D14329
|
|
Use a shorter/simpler license convention, stops the header taking so
much space.
Follow the SPDX license specification: https://spdx.org/licenses
- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile
While most of the source tree has been included
- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
use different header conventions.
doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.
See P2788 for the script that automated these edits.
Reviewed By: brecht, mont29, sergey
Ref D14069
|
|
An important check to reject edge linehits when a vertex of that edge
was already hit was accidentally removed in
rB6e77afe6ec7b6a73f218f1fef264758abcbc778a
|
|
Calculating min and max orthographic extent forgot to convert to
worldspace coordinates.
|
|
Ref T92709
|
|
It's important the coordinates the knife is operating on are never
manipulated since it will cause problems which are difficult to
troubleshoot.
Instead, use a cast in the MEM_freeN(..) call.
This reverts commit 8600d4491fa4b349cb80241382c503abaf9c5ce9.
|
|
|
|
Fixes a warning caused by freeing a const pointer.
This commit removes the const modifier.
Differential Revision: https://developer.blender.org/D13321
|
|
Allow the use of floating-point values for font point sizes, which
allows greater precision and flexibility for text output.
See D8960 for more information, details, and justification.
Differential Revision: https://developer.blender.org/D8960
Reviewed by Campbell Barton
|
|
Otherwise this function may fail to compile when other changes are made.
|
|
Currently, the knife does not use right click cancel.
It causes users to accidentally delete entire cuts easily.
This patch allows right click cancel when no cuts have been made.
This makes it consistent with other tools when switching between them.
More info: https://devtalk.blender.org/t/gsoc-2021-knife-tool-improvements-feedback/19047/175?u=hobbesos
|
|
|
|
|
|
Knife angle measurements were mis-aligned if a cut point was in space.
Specifically, the arc drawing would not match with the cut line.
Fixed by removing a correction for kcd->prev.cage.
This correction was originally added for panning with measurements to work.
In hindsight it is not needed and only introduces issues like this.
|
|
Improve readability using underscores for separators, e.g.
prev_click_time instead of prevclicktime.
|
|
Patch changes the Knife Tool angle snapping input limit to 180.
Differential Revision: https://developer.blender.org/D12728
|
|
Now if a user presses the knife tool undo key when there are no more cut segments to undo, the operator exits. Previously, it did nothing.
|
|
|
|
|
|
The events value was checked without checking the expected modal state.
|
|
A small quality of life improvement that will allow users to change the keys used for axis locking.
|
|
|
|
This adds constrained angle mode improvements,
snapping to global and local orientation,
visible distance and angle measurements,
undo capability,
x-ray mode,
multi-object edit mode.
See https://developer.blender.org/D12600 for more details.
Note: this project moved some of the default keymappings
around a bit, as discussed with users in the thread
https://devtalk.blender.org/t/gsoc-2021-knife-tool-improvements-feedback/19047
We'll change the manual documentation in the next couple of days.
|
|
This reverts commit 96027b2d15b73d2b5086899425021ea4c903fa00.
The patch asserts on different occasions and needs more work.
|
|
Knife tool.
Make the drawing anti aliased and consistent by using
3D_POLYLINE/3D_POINT shaders, and making sure alpha
blending is on.
Monkey work based on [[ https://developer.blender.org/D11333 | D11333 ]]
done by [[ https://developer.blender.org/p/krash/ | Anthony Edlin (krash)]]
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D12287
|
|
|
|
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
|
|
|
|
|
|
X & Z were ordered min/max, where as Y was max/min.
|
|
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.
|
|
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.
|
|
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.
|
|
Use invert_m4_m4_safe_ortho for the knife tool to support
operating on objects with a single zero scaled axis.
|
|
|
|
|
|
|
|
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
|
|
The points were too small on hi-dpi displays.
|
|
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.
|
|
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.
|
|
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.
|
|
- 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
|
|
|
|
|
|
|
|
This function sets the `RegionView3D` matrices to the GPU.
But the OpenGL library is not actually being used by the operator.
|
|
Although the Knife Project operator converts 3D coordinates to screen
space, it doesn't really need opengl.
Differential Revision: https://developer.blender.org/D10178
|
|
Zeroed mouse coordinates were being used making projection fail.
|