Age | Commit message (Collapse) | Author |
|
Also improve const correctness and type correctness.
Reviewed By: brecht
Ref D15075
|
|
|
|
Reviewed By: brecht
Ref D15021
|
|
This name made sense when UV's and textures were stored in the same
layer (MTFace & TFace).
|
|
|
|
Regression in ffaaa0bcbf477c30cf3665b9330bbbb767397169
which removed the NULL pointer check.
|
|
|
|
Assign get_name functions for select picking and circle select
so modifier keys show the result of holding the modifiers.
|
|
|
|
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
|
|
The input size was doubled & inverted.
|
|
This should have no functional changes.
This reduce the complexity of the shader by only supporting 2 colors.
We never use more than 2 color in practice and this makes usage not require
a UBO.
|
|
Add blank lines after file references to avoid them being interpreted as
doc-strings the following declarations.
|
|
|
|
|
|
This will allow reusing it elsewhere, such as in a geometry node.
Differential Revision: https://developer.blender.org/D14453
|
|
- Follow the same conventions as the 3D viewport for UV selection
(using SelectPick_Params internally).
- Use WM_operator_properties_mouse_select for selection properties.
|
|
Currently there is a "calc_face_normal" argument to mesh to bmesh
conversion, but vertex normals had always implicitly inherited whatever
dirty state the mesh input's vertex normals were in. Probably they were
most often assumed to not be dirty, but this was never really correct in
the general case.
Ever since the refactor to move vertex normals out of mesh vertices,
cfa53e0fbeed7178c7, the copying logic has been explicit: copy the
normals when they are not dirty. But it turns out that more control is
needed, and sometimes normals should be calculated for the resulting
BMesh.
This commit adds an option to the conversion to calculate vertex
normals, true by default. In almost all places except the decimate
and edge split modifiers, I just copied the value of the
"calc_face_normals" argument.
Differential Revision: https://developer.blender.org/D14406
|
|
Mainly -Wset-but-unused-variable.
Makes default compilation on macOS way less noisy.
Differential Revision: https://developer.blender.org/D14357
|
|
So far it was needed to declare a new RNA struct to `RNA_access.h` manually.
Since 9b298cf3dbec we generate a `RNA_prototypes.h` for RNA property
declarations. Now this also includes the RNA struct declarations, so they don't
have to be added manually anymore.
Differential Revision: https://developer.blender.org/D13862
Reviewed by: brecht, campbellbarton
|
|
Lets `makesrna` generate a `RNA_prototypes.h` header with declarations for all
RNA properties. This can be included in regular source files when needing to
reference RNA properties statically.
This solves an issue on MSVC with adding such declarations in functions, like
we used to do. See 800fc1736748. Removes any such declarations and the related
FIXME comments.
Reviewed By: campbellbarton, LazyDodo, brecht
Differential Revision: https://developer.blender.org/D13837
|
|
The constant M_PI_4 is added to GLSL to ensure it works there too.
Differential Revision: https://developer.blender.org/D14288
|
|
|
|
|
|
|
|
Otherwise it's possible to accidentally use these variables
in debug builds, breaking release builds.
|
|
Move `ToolSettings *ts` into an `#ifdef NDEBUG` block, as it's only used
for a `BLI_assert` call.
|
|
|
|
|
|
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
|
|
This is needed since 4d0f846b936c9101ecb76a6db962aac2d74a460a
however change in the operator instead of the event handler is correct,
as accepting a press event should suppress drag events unless
the pass-through flag is set.
This is how select & tweak already works.
|
|
Using flags makes checking multiple modifiers at once more convenient
and avoids macros/functions such as IS_EVENT_MOD & WM_event_modifier_flag
which have been removed. It also simplifies checking if modifier keys
have changed.
|
|
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
|
|
Previously, macros were ifdefed using the cmake option `WITH_INTERNATIONAL`
However, the is unnecessary as withen the functions themselves have checks for building without internationalization.
This also means that many `add_definitions(-DWITH_INTERNATIONAL)` are also unnecessary.
Reviewed By: mont29, LazyDodo
Differential Revision: https://developer.blender.org/D13929
|
|
MSVC used to warn about const mismatch for arguments passed by value.
Remove these as newer versions of MSVC no longer show this warning.
|
|
Goals of this refactor:
* More unified approach to updating everything that needs to be updated
after a change in a node tree.
* The updates should happen in the correct order and quadratic or worse
algorithms should be avoided.
* Improve detection of changes to the output to avoid tagging the depsgraph
when it's not necessary.
* Move towards a more declarative style of defining nodes by having a
more centralized update procedure.
The refactor consists of two main parts:
* Node tree tagging and update refactor.
* Generally, when changes are done to a node tree, it is tagged dirty
until a global update function is called that updates everything in
the correct order.
* The tagging is more fine-grained compared to before, to allow for more
precise depsgraph update tagging.
* Depsgraph changes.
* The shading specific depsgraph node for node trees as been removed.
* Instead, there is a new `NTREE_OUTPUT` depsgrap node, which is only
tagged when the output of the node tree changed (e.g. the Group Output
or Material Output node).
* The copy-on-write relation from node trees to the data block they are
embedded in is now non-flushing. This avoids e.g. triggering a material
update after the shader node tree changed in unrelated ways. Instead
the material has a flushing relation to the new `NTREE_OUTPUT` node now.
* The depsgraph no longer reports data block changes through to cycles
through `Depsgraph.updates` when only the node tree changed in ways
that do not affect the output.
Avoiding unnecessary updates seems to work well for geometry nodes and cycles.
The situation is a bit worse when there are drivers on the node tree, but that
could potentially be improved separately in the future.
Avoiding updates in eevee and the compositor is more tricky, but also less urgent.
* Eevee updates are triggered by calling `DRW_notify_view_update` in
`ED_render_view3d_update` indirectly from `DEG_editors_update`.
* Compositor updates are triggered by `ED_node_composite_job` in `node_area_refresh`.
This is triggered by calling `ED_area_tag_refresh` in `node_area_listener`.
Removing updates always has the risk of breaking some dependency that no
one was aware of. It's not unlikely that this will happen here as well. Adding
back missing updates should be quite a bit easier than getting rid of
unnecessary updates though.
Differential Revision: https://developer.blender.org/D13246
|
|
Also add groups in some files.
|
|
Ref T92709
|
|
When adding certain customdata layers (namely UVs, vertex colors and
sculpt vertex colors), the user does not get notified the specific limit
has been hit (blender just silently does nothing).
Now inform the user [decided to not do this in poll() since it could get
messy once operators are extended to operate on all selected objects, so
left this as a visible error in execute() -- or from python].
Maniphest Tasks: T92318
Differential Revision: https://developer.blender.org/D13147
|
|
This margin was inconsistently calculated: only taking the
visible region and interface scale into account in some cases.
|
|
|
|
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
|
|
Some selection operators return (PASS_THROUGH & FINISHED) so the tweak
event isn't suppressed from the PRESS event having been handled.
This is now restricted to events with a PRESS action.
Without this, using CLICK for selection was passing the event through
which could run other actions unintentionally.
|
|
- Bend (Transform).
- Extrude to Cursor.
- Lasso Select (related operators such as node-cut links, mask.. etc).
- Rip Mesh / UV's.
- Vertex/Edge Slide.
|
|
|
|
|