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-08-11Rename variables to hide_polyHans Goudey
2022-08-11Merge branch 'master' into refactor-mesh-hide-genericHans Goudey
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-11Cleanup: refactoring uvislands to prepare for python apiChris Blackbourn
Add #bm_uv_ensure_head_table See also: D15598
2022-08-10Cleanup: refactoring uvislands to prepare for python apiChris Blackbourn
Migrate island calculation to #bm_uv_build_islands. Simplify connectedness calculation. Reduce memory pressure. No functional changes. See also: D15598
2022-08-10Rename `.hide_face` to `.hide_poly`Hans Goudey
2022-08-09Merge branch 'master' into refactor-mesh-hide-genericHans Goudey
2022-08-09Cleanup: use own username in code-comment tagsCampbell Barton
2022-08-09Cleanup: compiler warningsCampbell Barton
2022-08-08Merge branch 'master' into refactor-mesh-hide-genericHans Goudey
2022-08-08Cleanup: refactoring uvislands to prepare for python apiChris Blackbourn
Fix copy+paste bug
2022-08-08Cleanup: refactoring uvislands to prepare for python apiChris Blackbourn
Rename vert -> vertex. Add `BM_uv_element_get_head`. See also: D15598
2022-08-08Cleanup: refactoring uvislands to prepare for python apiChris Blackbourn
Rename buf -> storage. See also: D15598
2022-08-07Cleanup: refactoring uvislands to prepare for python apiChris Blackbourn
See also: D15598
2022-08-03Merge branch 'master' into refactor-mesh-hide-genericHans Goudey
2022-08-02Cleanup: Simplify functions for adding and removing color attributesHans Goudey
The specific functions for vertex colors and and sculpt vertex colors can be replaced by more generic attribute functions internally. Also remove a paramter from one function.
2022-08-02Cleanup: Remove unused sculpt and vertex color operatorsHans Goudey
The "Color Attributes" system from f7bbc7cdbb6cb0d2850 has replaced both "Sculpt Vertex Colors" and "Vertex Colors" in the UI. The Operators for adding and removing them are unused now. This commit does not break backwards compatibility with the Python API, it only removes the operators, which generally aren't used by addons anyway. The mesh RNA properties will be removed in 4.0 (T100153). Differential Revision: https://developer.blender.org/D15077
2022-07-30Cleanup: Clang tidyHans Goudey
2022-07-22Cleanup variables names, add "finish" callsHans Goudey
2022-07-22Merge branch 'master' into refactor-mesh-hide-genericHans Goudey
2022-07-21Cleanup: add ISMOUSE_MOTION macroCampbell Barton
Replace verbose ELEM(..) usage, now each kind of mouse event has it's own macro.
2022-07-20Always save with legacy mesh formatHans Goudey
2022-07-20Merge branch 'master' into refactor-mesh-hide-genericHans Goudey
2022-07-15Fix T79304: improve uv island calculation when in edge selection modeChris Blackbourn
Differential Revision: https://developer.blender.org/D15419
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-09Weight & Vertex Paint: always respect edit mode hiding on faces.Alexander Gavrilov
In some cases it is mandatory to be able to hide parts of the mesh in order to paint certain areas. The Mask modifier doesn't work in weight paint, and edit mode hiding requires using selection, which is not always convenient. This makes the weight and vertex paint modes always respect edit mode hiding like sculpt mode. The change in behavior affects drawing and building paint PBVH. Thus it affects brushes, but not menu operators like Smooth or Normalize. In addition, this makes the Alt-H shortcut available even without any selection enabled, and implements Hide for vertex selection. Differential Revision: https://developer.blender.org/D14163
2022-07-08Fixes, cleanup, renamingHans Goudey
2022-07-08Merge branch 'temp-legacy-mesh-format-option' into refactor-mesh-hide-genericHans Goudey
2022-06-30Transform Snap: nearest face snap mode, snapping options, refactoring.jon denning
This commit adds a new face nearest snapping mode, adds new snapping options, and (lightly) refactors code around snapping. The new face nearest snapping mode will snap transformed geometry to the nearest surface in world space. In contrast, the original face snapping mode uses projection (raycasting) to snap source to target geometry. Face snapping therefore only works with what is visible, while nearest face snapping can snap geometry to occluded parts of the scene. This new mode is critical for retopology work, where some of the target mesh might be occluded (ex: sliding an edge loop that wraps around the backside of target mesh). The nearest face snapping mode has two options: "Snap to Same Target" and "Face Nearest Steps". When the Snap to Same Object option is enabled, the selected source geometry will stay near the target that it is nearest before editing started, which prevents the source geometry from snapping to other targets. The Face Nearest Steps divides the overall transformation for each vertex into n smaller transformations, then applies those n transformations with surface snapping interlacing each step. This steps option handles transformations that cross U-shaped targets better. The new snapping options allow the artist to better control which target objects (objects to which the edited geometry is snapped) are considered when snapping. In particular, the only option for filtering target objects was a "Project onto Self", which allowed the currently edited mesh to be considered as a target. Now, the artist can choose any combination of the following to be considered as a target: the active object, any edited object that isn't active (see note below), any non- edited object. Additionally, the artist has another snapping option to exclude objects that are not selectable as potential targets. The Snapping Options dropdown has been lightly reorganized to allow for the additional options. Included in this patch: - Snap target selection is more controllable for artist with additional snapping options. - Renamed a few of the snap-related functions to better reflect what they actually do now. For example, `applySnapping` implies that this handles the snapping, while `applyProject` implies something entirely different is done there. However, better names would be `applySnappingAsGroup` and `applySnappingIndividual`, respectively, where `applySnappingIndividual` previously only does Face snapping. - Added an initial coordinate parameter to snapping functions so that the nearest target before transforming can be determined(for "Snap to Same Object"), and so the transformation can be broken into smaller steps (for "Face Nearest Steps"). - Separated the BVH Tree getter code from mesh/edit mesh to its own function to reduce code duplication. - Added icon for nearest face snapping. - The original "Project onto Self" was actually not correct! This option should be called "Project onto Active" instead, but that only matters when editing multiple meshes at the same time. This patch makes this change in the UI. Reviewed By: Campbell Barton, Germano Cavalcante Differential Revision: https://developer.blender.org/D14591
2022-06-17Cleanup: spelling in commentsCampbell Barton
2022-06-13Fix T94499: Knife missed clipping checkCian Jinks
The knife BVH raycast functionality was missing a check to discard points which were clipped.
2022-06-07Cleanup: Use const pointers in attribute APIHans Goudey
2022-06-06Refactor: Snap-related. Clarified attribute names and refactored #defines ↵jon denning
into enums The transformation snapping code contains a bunch of `#define`s, some ambiguously or incorrectly named attributes. This patch contains refactored code to improve this. This patch does (should) not change functionality of snapping. Clarified ambiguously / incorrectly named attributes. - "Target" is used to refer to the part of the source that is to be snapped (Active, Median, Center, Closest), but several other areas of Blender use the term "target" to refer to the thing being snapped to and "source" to refer to the thing getting snapped. Moreover, the implications of the previous terms do not match the descriptions. For example: `SCE_SNAP_TARGET_CENTER` does not snap the grabbed geometry to the center of the target, but instead "Snap transforamtion center onto target". - "Select" refers to the condition for an object to be a possible target for snapping. - `SCE_SNAP_MODE_FACE` is renamed to `SCE_SNAP_MODE_FACE_RAYCAST` to better describe its affect and to make way for other face snapping methods (ex: nearest). Refactored related `#define` into `enum`s. In particular, constants relating to... - `ToolSettings.snap_flag` are now in `enum eSnapFlag` - `ToolSettings.snap_mode` are now in `enum eSnapMode` - `ToolSettings.snap_source` (was `snap_target`) are now in `enum eSnapSourceSelect` - `ToolSettings.snap_flag` (`SCE_SNAP_NO_SELF`) and `TransSnap.target_select` are now in `enum eSnapTargetSelect` As the terms became more consistent and the constants were packed together into meaningful enumerations, some of the attribute names seemed ambiguous. For example, it is unclear whether `SnapObjectParams.snap_select` referred to the target or the source. This patch also adds a small amount of clarity. This patch also swaps out generic types (ex: `char`, `short`, `ushort`) and unclear hard coded numbers (ex: `0`) used with snap-related enumerations with the actual `enum`s and values. Note: I did leave myself some comments to follow-up with further refactoring. Specifically, using "target" and "source" consistently will mean the Python API will need to change (ex: `ToolSettings.snap_target` is not `ToolSettings.snap_source`). If the API is going to change, it would be good to make sure that the used terms are descriptive enough. For example, `bpy.ops.transform.translate` uses a `snap` argument to determine if snapping should be enabled while transforming. Perhaps `use_snap` might be an improvement that's more consistent with other conventions. This patch is (mostly) a subset of D14591, as suggested by @mano-wii. Task T69342 proposes to separate the `Absolute Grid Snap` option out from `Increment` snapping method into its own method. Also, there might be reason to create additional snapping methods or options. (Indeed, D14591 heads in this direction). This patch can work along with these suggestions, as this patch is trying to clarify the snapping code and to prompt more work in this area. Reviewed By: mano-wii Differential Revision: https://developer.blender.org/D15037
2022-06-04Fix changes persisting when exiting edit modeHans Goudey
2022-06-04Change hide attribute namesHans Goudey
2022-06-04Merge branch 'master' into refactor-mesh-hide-genericHans Goudey
2022-06-01Fix T92952: Knife inconsistent angle printoutCian Jinks
Knife could display incorrect snapping angle printout in header/footer because it was not always updated after angle snapping calculations.
2022-06-01Cleanup: spelling in comments, use doxy sectionsCampbell Barton
2022-06-01Cleanup: use 'e' prefix for enum typesCampbell Barton
- CustomDataType -> eCustomDataType - CustomDataMask -> eCustomDataMask - AttributeDomain -> eAttrDomain - NamedAttributeUsage -> eNamedAttrUsage
2022-05-30Merge branch 'temp-legacy-mesh-format-option' into refactor-mesh-hide-genericHans Goudey
2022-05-30Fix T98445: Knife Tool always cuts throughPratik Borhade
Minor error in if condition used for early return. Ref D15050
2022-05-28Select Similar: hide 'compare' from UI when not usedPhilipp Oeser
When the 'compare' is not used for the resulting selection, just hide it. This is the case for 'Vertex Groups' atm (where only membership is taken into account). Similar to rB9dc9692b0979. Differential Revision: https://developer.blender.org/D14979
2022-05-26Merge branch 'blender-v3.2-release'Campbell Barton
2022-05-26Fix display error after sorting mesh elementsCampbell Barton
Sorting faces caused the tessellation data to be outdated, making faces show the wrong materials. Re-calculate tessellation when re-ordering faces.
2022-05-25Cleanup: knife toolCampbell Barton
- Use early return and continue to reduce right-shift. - Rename `lv` to `tri_cos` for storing triangle coordinates. - Reduce variable scope.
2022-05-25Merge branch 'blender-v3.2-release'Campbell Barton
2022-05-25Merge branch 'blender-v3.2-release'Campbell Barton
2022-05-25Fix T98349: Knife project resulting selection is wrongCampbell Barton
Regression in [0] which removed the call to BVH-tree recalculation before calculating the selection. Instead of recalculating the BVH-tree, postpone recalculating mesh data until after the selection has been calculated. [0]: 6e77afe6ec7b6a73f218f1fef264758abcbc778a
2022-05-25Cleanup: remove context argument from EDBM_mesh_knifeCampbell Barton
Added in [0] but isn't needed as all needed variables are in the ViewContext. Avoid passing in the context is it makes debugging issues with MESH_OT_knife_project more difficult to investigate since it's possible values written to the ViewContext are ignored. [0]: 6e77afe6ec7b6a73f218f1fef264758abcbc778a
2022-05-25Cleanup: spelling, unbalanced doxy sectionsCampbell Barton