Age | Commit message (Collapse) | Author |
|
See https://wiki.blender.org/wiki/Style_Guide/C_Cpp#Integer_Types
|
|
Change `cd_loop_uv_offset` from signed to unsigned, forcing
a crash if passed invalid input.
Differential Revision: https://developer.blender.org/D15722
|
|
In island selection mode, add new options for uv select similar:
* Area UV
* Area 3D
* Face (number of faces in island)
See also https://developer.blender.org/T47437
Differential Revision: https://developer.blender.org/D15553
|
|
|
|
During UV unwrapping, Cube Projection, Sphere Projection, Cylinder
Projection and Project From View (in the 3D Viewport), when "Correct
Aspect" toggle is active, it now uses a query cache to perform a
per-face aspect ratio ("per_face_aspect") correction for the active
image of each face.
Reviewed By: campbellbarton
Ref D14852
|
|
Unlike 3Dview snapping, UV snapping is always done to the UV closest to
the mouse cursor, no matter the distance.
From the user's point of view, this appears to be an inconsistency (See
{T93538}).
Therefore, set a minimum distance for snapping and, as in 3D View and
highlight the snap with a drawing of a circle.
Release Note: https://wiki.blender.org/wiki/Reference/Release_Notes/3.3/Modeling
Reviewed By: #uv_editing, campbellbarton
Maniphest Tasks: T93538
Differential Revision: https://developer.blender.org/D13873
|
|
- Missing star prefix.
- Unnecessary indentation.
- Blank line after dot-points
(otherwise doxygen merges with the previous dot-point).
- Use back-slash for doxygen commands.
- Correct spelling.
|
|
|
|
This patch adds edge selection support for UV editing (refer T76545).
Developed as a part of GSoC 2021 project - UV Editor Improvements.
Previously, selections in the UV editor always flushed down to vertices
and this caused multiple issues such as T76343, T78757 and T26676.
This patch fixes that by adding edge selection support for all UV
operators and adding support for flushing selections between vertices
and edges. Updating UV select modes is now done using a separate
operator, which also handles select mode flushing and undo for UV
select modes. Drawing edges (in UV edge mode) is also updated to match
the edit-mesh display in the 3D viewport.
Notes on technical changes made with this patch:
* MLOOPUV_EDGESEL flag is restored (was removed in rB9fa29fe7652a).
* Support for flushing selection between vertices and edges.
* Restored the BMLoopUV.select_edge boolean in the Python API.
* New operator to update UV select modes and flushing.
* UV select mode is now part of editmesh undo.
TODOs added with this patch:
* Edge support for shortest path operator (currently uses vertex path logic).
* Change default theme color instead of reducing contrast with edge-select.
* Proper UV element selections for Reveal Hidden operator.
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D12028
|
|
Having this setting stored in the image space caused low level selection
logic to have to pass around the image space (which could be NULL
in some cases). Use the tool-settings instead since there doesn't seem
to be much/any advantage in having this setting per-space.
|
|
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
|
|
MSVC used to warn about const mismatch for arguments passed by value.
Remove these as newer versions of MSVC no longer show this warning.
|
|
Ref T92709
|
|
Passing multiple UDIM arguments into the packing function
is awkward especially since the caller may not be using UDIM.
Use an argument to store UDIM packing parameters which can be NULL,
which operates without any UDIM support.
Add a function that extracts these parameters out of the image space
allowing for multiple functions to take UDIM parameters in the future.
|
|
Implements T78397
Extends the functionality of pack islands operator to allow packing UVs
to either the closest or active UDIM tile.
This provides 2 new options for packing UVs :
* Closest UDIM: Selected UVs will be packed to the UDIM tile they were
placed on. If not present on a valid UDIM tile, the UVs will be packed
to the closest UDIM in UV space
* Active UDIM: Selected UVs will be packed to the active UDIM image tile
In case, no image is present in the UV editor, then UVs will be packed
to the tile on the UDIM grid where the 2D cursor is located.
Reviewed By: campbellbarton
Maniphest Tasks: T78397
Ref D12680
|
|
draw_cache_extract_mesh for task scheduling. Will be refactored to draw_cache_extract_mesh_scheduling later on after migrating to CPP.
draw_cache_extract_mesh_render_data extraction of mesh render data from edit mesh/mesh into a more generic structure.
draw_cache_extract_mesh_extractors containing all the extractors. This will be split up further into a single file per extractor.
|
|
|
|
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.
|
|
The seam check was missed in 9296ba867462f7ff3c55bc0c9129af4121243bed
which calculates islands from the BMesh.
|
|
Edges with 3 or more connected UV's caused UV pack to fail.
Instead of using functions from uvedit_parametrizer.c which are intended
specifically for ABF/LSCM unwrapping, use a simpler method for packing
which stores arrays of BMesh faces.
|
|
With D8234 a new drawing method for UV/Image editor was introduced. For debugging
reasons we left the old drawing method in the code base. This patch will remove
the old drawing method.
Reviewed By: Clément Foucault
Differential Revision: https://developer.blender.org/D9011
|
|
This replaces header include guards with `#pragma once`.
A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`),
because they are used in other places.
This patch has been generated by P1561 followed by `make format`.
Differential Revision: https://developer.blender.org/D8466
|
|
Also improve region fill with edge-select enabled which often failed
to include both vertices from each edge in the resulting region.
|
|
Internally UV selection considered close UV's to be connected.
While this could be convenient in some cases,
it complicates logic for more advanced selection operations that
need to check when UV's should be considered part of the same vertex
since simple threshold checks would give different results depending
on the order of UV's tested.
Users must now run "Merge by Distance" instead of relying
on this selection threshold.
|
|
Support setting vert/edge/face selection, using the sticky option
without performing a second loop over all faces to flush selection.
Existing selection code didn't take advantage of BMesh connectivity
since the logic is from before BMesh was included.
|
|
|
|
Instead of using the mouse cursor position,
this selects between existing selected elements.
Access this since picking a selection path doesn't
work from the menu.
|
|
This adds support for path selection for vertex edge & face selection
modes, matching mesh editing behavior, useful with the UV rip tool.
Region select & edge tagging are currently not supported,
although they could be added eventually.
|
|
|
|
New rip tool matching edit-mesh rip functionality.
Useful as disconnecting UV's, especially for loops is inconvenient
without this.
This uses 'V' to rip, changing stitch to 'Alt-V'.
|
|
This feature was added when Blender used tex-face (per-face images),
but doesn't make as much sense since this was removed.
Removing this from UV edit-mode as this wasn't working in any
of the 2.8x releases, causing UV's to be visible but unselectable.
Resolves issue raised in T76958.
|
|
Also pass some args as 'const'.
|
|
The old convention was easy to confuse with ScrArea.
Part of https://developer.blender.org/T74432.
This is mostly a batch rename with some manual fixing. Only single word
variable names are changed, no prefixed/suffixed names.
Brecht van Lommel and Campbell Barton both gave me a green light for
this convention change.
Also ran clan clang format on affected files.
|
|
|
|
Only the active objects UV selection was checked.
This also avoids checking UV selection for every poll call,
now this is only done on refresh.
|
|
|
|
|
|
|
|
In 2.7x UV sculpt was a kind of sub-mode
(a toggle with it's own key-map & drawing code).
Move this to an operator that uses the tool-system,
this simplifies internal logic, especially brush selection
which now matches sculpt and other paint modes.
- Remove toggle used to enable uv sculpt.
- Expose the brush, which was already used but there was no way to
select different brushes.
- Make UV sculpt use paint paint tool slots
(using brushes how all other paint mode currently do).
- Move UV Sculpt keymap to the tools keymap.
- Remove Q to toggle UV sculpt mode,
S/P/G keys to switch tools.
|
|
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
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
This is better than passing a scene pointer when we don't have one.
|
|
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.
|
|
Done using:
source/tools/utils_maintenance/c_sort_blocks.py
|
|
Packing was not being called after multi-object editing changes. Includes code
refactoring to make function parameters more clear.
|
|
This is in order to allow more spaces to have their batches created at the
same time and sharing the batches.
This is part of the effort fo making the drawing code more optimized. This
commit however should not introduce any difference.
This commit bypass the aspect ratio correction for angle stretch display
but this should be fixed in the next commit.
|
|
With multi object editing it creates the charts twice, which broke some
logic in the unwrapper.
|
|
|
|
Bring back per-viewport localview. This is based on Blender 2.79.
We have a limit of 16 different local view viewports.
We are using both the numpad /, as well as the regular /.
Missing features:
* Hack to make sure lights are always visible.
* Make rendered mode with external engines to support this as well
(probably just need to support this in the RNA iterators).
* Support over 16 viewports by taking existing viewports out of local view.
The code can use a cleanup pass in the future to unify the test to see
if an object is visible (or we can use TESTBASE in more places).
|