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-03-11Cleanup: use M_PI_2 and M_PI_4 where possibleHallam Roberts
The constant M_PI_4 is added to GLSL to ensure it works there too. Differential Revision: https://developer.blender.org/D14288
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-04Cleanup: spelling in comments, function nameCampbell Barton
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-03-03WM: use pass-through for cursor placement operatorCampbell Barton
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.
2022-02-25Cleanup: use flags for wmEvent modifier keysCampbell Barton
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.
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
2022-01-30Cleanup: Cmake: remove unnecessary definitions for internationalizationAaron Carlisle
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
2022-01-07Cleanup: remove redundant const qualifiers for POD typesCampbell Barton
MSVC used to warn about const mismatch for arguments passed by value. Remove these as newer versions of MSVC no longer show this warning.
2021-12-21Nodes: refactor node tree update handlingJacques Lucke
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
2021-12-14Cleanup: correct unbalanced doxygen groupsCampbell Barton
Also add groups in some files.
2021-12-08Cleanup: move public doc-strings into headers for 'editors'Campbell Barton
Ref T92709
2021-11-09Fix T92318: adding layers (UVs, ...) doesn't notify about limitPhilipp Oeser
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
2021-10-19Fix image cache margin calculationCampbell Barton
This margin was inconsistently calculated: only taking the visible region and interface scale into account in some cases.
2021-10-08Cleanup: remove redundant cursor copy, printCampbell Barton
2021-09-30Cleanup: isolate UDIM parameters into a structCampbell Barton
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.
2021-09-29Cleanup: else-after-returnJacques Lucke
2021-09-29UV: Pack to closest/active UDIMSiddhartha Jejurkar
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
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-06Cleanup: use MEM_SAFE_FREE macroCampbell Barton
2021-08-05Cleanup: remove redundant parenthesisCampbell Barton
2021-08-04Cleanup: spellingCampbell 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-16Fix T89861: Checking face selection breaks UV stitch operatorCampbell Barton
2021-07-16Cleanup: remove redundant parenthesesCampbell Barton
2021-07-13Cleanup: replace BKE_customdata.h in BKE_editmesh.hCampbell Barton
Only DNA_customdata_types.h is needed for BMEditMesh.
2021-07-07Cleanup: spelling in commentsCampbell 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-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-18Performance: Limit recounting during selection mode flushing.Jeroen Bakker
This patch ensures that selection mode flushing updates total selection counts internally. This reduces recounting when we are sure that the input total selection counts were up to date. For example for circle selection the total selection counts were correct. But during flushing the selection could have been changed and therefore the selection was always recounted. This increased the performance on selected system from 6.90 FPS to 8.25 FPS during circle selection operations. Before: {F10179981} After: {F10179982} Reviewed By: mano-wii Differential Revision: https://developer.blender.org/D11647
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-05-27Fix T88625: Multiobject UV hiding/unhiding does not work with UV_SYNC_SELECTIONPhilipp Oeser
Oversight in {rB470f17f21c06}. Hiding was only done for the first mesh, then the operator finished (in case of UV_SYNC_SELECTION). Now just continue to the next. Maniphest Tasks: T88625 Differential Revision: https://developer.blender.org/D11413
2021-03-26UV: warn when unwrapping failsCampbell Barton
Report an error when unwrapping can't solve some UV islands, note that edge-seams may need to be set. Address T86936
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-11Merge branch 'blender-v2.92-release'Campbell Barton
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-02-10Cleanup: update old commentsCampbell Barton
2021-02-09Cleanup: comments, replace German expression with EnglishCampbell Barton