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
2022-11-01Refactor: Rename Object->obmat to Object->object_to_worldSergey Sharybin
Motivation is to disambiguate on the naming level what the matrix actually means. It is very easy to understand the meaning backwards, especially since in Python the name goes the opposite way (it is called `world_matrix` in the Python API). It is important to disambiguate the naming without making developers to look into the comment in the header file (which is also not super clear either). Additionally, more clear naming facilitates the unit verification (or, in this case, space validation) when reading an expression. This patch calls the matrix `object_to_world` which makes it clear from the local code what is it exactly going on. This is only done on DNA level, and a lot of local variables still follow the old naming. A DNA rename is setup in a way that there is no change on the file level, so there should be no regressions at all. The possibility is to add `_matrix` or `_mat` suffix to the name to make it explicit that it is a matrix. Although, not sure if it really helps the readability, or is it something redundant. Differential Revision: https://developer.blender.org/D16328
2022-10-07Cleanup: redundant parenthesisCampbell Barton
2022-09-14Adding `const Scene*` parameter in many areas.Monique Dewanchand
Related to {D15885} that requires scene parameter to be added in many places. To speed up the review process the adding of the scene parameter was added in a separate patch. Reviewed By: mont29 Maniphest Tasks: T73411 Differential Revision: https://developer.blender.org/D15930
2022-09-12UV: support uv seams when computing uv islandsChris Blackbourn
An edge can be marked BM_ELEM_SEAM, which means the UV co-ordinates on either side of the edge are actually independent, even if they happen to currently have the same value. This commit optionally add support for UV Seams when computing islands. Affects UV sculpt tools, individual origins, UV stitch and changing UV selection modes etc. Required for upcoming packing refactor which requires seam support when computing islands. Differential Revision: https://developer.blender.org/D15875
2022-08-26Cleanup: use booleansCampbell Barton
2022-08-19Cleanup: replace uint cd_loop_uv_offset with intChris Blackbourn
See https://wiki.blender.org/wiki/Style_Guide/C_Cpp#Integer_Types
2022-08-19Cleanup: uvedit_*_select, replace `BMEditMesh*` with `BMesh*`Chris Blackbourn
Change `cd_loop_uv_offset` from signed to unsigned, forcing a crash if passed invalid input. Differential Revision: https://developer.blender.org/D15722
2022-08-11Cleanup: refactoring uvislands to prepare for python apiChris Blackbourn
Add element_map->island_total_uvs. Add element_map->island_total_unique_uvs. Simplify callers based on new members. Add comments. Resolves: D15598
2022-08-09Cleanup: use own username in code-comment tagsCampbell Barton
2022-07-30UV: Add options for uv select similar in island modeChris Blackbourn
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
2022-07-13Fix T99659: Improve UV Island calculation with hidden faces.Chris Blackbourn
Simplify interface, regularize implementation and some light cleanup. See also: T79304 and D15419.
2022-07-12UV: Box and lasso selection for partially intersecting edgesSiddhartha Jejurkar
In UV edge mode, box and lasso selections allow edge selections only when the entire edge is contained within the selection area. This doesn't consider any edges that partially overlap with the selection area. This is now fixed by adding a second pass, similar to how these operators work for edit-mesh selections. Now if both operators are unable to find any edges contained within the selection area, then they will perform a second pass which checks for edges that partially intersect with the selection area. Now edge selection in the UV editor matches edit-mesh edge-selection when drawing wire-frame. Resolves T99443. Ref D15362
2022-06-28Fix T98924: Skip saving selection properties for UV edge ring operatorSiddhartha Jejurkar
Oversight in rB7724251af81f. Skip saving selection properties for UV edge ring operator as it allows the operator to re-use the value that was previously set using the key-map. Reviewed By: campbellbarton Maniphest Tasks: T98924 Differential Revision: https://developer.blender.org/D15214
2022-06-23Cleanup: Clang tidyHans Goudey
Mainly duplicate includes and else after return.
2022-06-21Cleanup: Fix format on previous commitChris Blackbourn
2022-06-21UV: Add "Select Similar" operator in UV editorChris Blackbourn
Resolves T47437. Differential Revision: https://developer.blender.org/D15164
2022-06-03Cleanup: spelling in commentsCampbell Barton
2022-06-03Cleanup: remove unused, commented MTexFace assignmentsCampbell Barton
2022-06-03Merge branch 'blender-v3.2-release'Campbell Barton
2022-06-03Fix T98558: island selection in UV editor can crashPhilipp Oeser
Regression in [0]. When zoomed in, we can be within the face of an island but too far from an edge, in this case uv_find_nearest_face_multi_ex is used instead of uv_find_nearest_edge_multi with the consequence that hit.l cannot be used in uvedit_uv_select_test (it is NULL). Instead, use uvedit_face_select_test instead in this case. [0]: d356edf420ba13b3a544dcc598a0e31a36e1d86c Reviewed By: campbellbarton Ref D15100
2022-05-18Merge branch 'blender-v3.2-release'Campbell Barton
2022-05-18Fix T98214: UV selection crash with wire edgesChris Blackbourn
Regression in ffaaa0bcbf477c30cf3665b9330bbbb767397169 which removed the NULL pointer check.
2022-05-13Merge branch 'blender-v3.2-release'Campbell Barton
2022-05-13Fix T89909: Circle Select tool status bar doesn't match the operationsCampbell Barton
Assign get_name functions for select picking and circle select so modifier keys show the result of holding the modifiers.
2022-05-04Transform: use a threshold for UV snappingGermano Cavalcante
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
2022-03-31Cleanup: spelling, trailing space for comment-blocksCampbell Barton
2022-03-30Cleanup: use utility function to initialize SelectPick_ParamsCampbell Barton
2022-03-23UV: support "Tweak Tool: Left Mouse Select & Move"Campbell Barton
- Follow the same conventions as the 3D viewport for UV selection (using SelectPick_Params internally). - Use WM_operator_properties_mouse_select for selection properties.
2022-03-09Cleanup: use ELEM macroCampbell Barton
2022-03-08Cleanup: Clang tidyHans Goudey
2022-03-08Cleanup: pass const scene argument to UV selection functionsCampbell Barton
2022-03-08Cleanup: prefer UNUSED_VARS_NDEBUG for debug only variablesCampbell Barton
Otherwise it's possible to accidentally use these variables in debug builds, breaking release builds.
2022-03-07Cleanup: move asssertion-test-only variable into `#ifndef NDEBUG` blockSybren A. Stüvel
Move `ToolSettings *ts` into an `#ifdef NDEBUG` block, as it's only used for a `BLI_assert` call.
2022-03-04Cleanup: Unused variable warningsHans Goudey
2022-03-03UV: Edge selection supportSiddhartha Jejurkar
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
2022-02-16UV: move sticky selection from image space into tool settingsCampbell Barton
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.
2022-02-11File headers: SPDX License migrationCampbell Barton
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
2021-12-08Cleanup: move public doc-strings into headers for 'editors'Campbell Barton
Ref T92709
2021-09-21WM: only return PASS_THROUGH on PRESS for selection operatorsCampbell Barton
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.
2021-09-17UI: enable the depend-on-cursor flag for some operatorsCampbell Barton
- Bend (Transform). - Extrude to Cursor. - Lasso Select (related operators such as node-cut links, mask.. etc). - Rip Mesh / UV's. - Vertex/Edge Slide.
2021-08-05Cleanup: remove redundant parenthesisCampbell Barton
2021-08-03WM: don't store selection properties typically set in the key-mapCampbell Barton
While this was already the case for the most part some selection operators stored common settings for reuse such as "toggle", "extend" & "deselect". Disabling storing these settings for later execution as it means failure to set these options in the key-map re-uses the value of the shortcut that was last called. Skip saving these settings since this is a case where reusing them isn't helpful. Resolves T90275.
2021-07-23Cleanup: code comments punctuation / spacingCampbell 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-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-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-03-24Cleanup: use new BLI_assert_unreachable macroCampbell Barton
2021-03-02Cleanup: spelling, minor correctionsCampbell Barton
Also use doxygen comments for sculpt functions.
2021-02-11Fix T85508: UV select overlap fails on identical facesCampbell Barton
The triangle overlap test failed for exactly overlapping triangles. When none of the segments intersect, testing a if a single corner is inside the other triangle fails when the triangles share UV coordinates. Resolve by comparing the triangle centers.
2021-01-25UV: tweak island select behaviorCampbell Barton
Selecting inside an island no longer de-selects when it's too far from an edge. When edge select fails fall back to inside-face test. This follows 908b383b7d2199c0c614d085ff65a03eb7852274 which made this change for face-select. Apply to island selection since it doesn't make sense for island select to behave differently.