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-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-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-08-27VSE: Transform overwrite modeRichard Antalik
Add mode to overwrite strips on overlap instead of resolving overlap. When overlap is created, 3 things can happen: - On partial overlap, handles of overlapped strip are moved - On complete overlap with smaller strip, overlapped strip is split - On complete overlap with larger strip, overlapped strip is removed This mode can be enabled in header. Reviewed By: fsiddi, mano-wii Differential Revision: https://developer.blender.org/D11805
2021-07-14Fix T89826: VSE snapping with constrained axisRichard Antalik
Constraining to X axis caused snapping to not work at all. Constraining to Y axis caused snapping indicator to be drawn, when snapping doesn't occur. Reviewed By: mano-wii Differential Revision: https://developer.blender.org/D11898
2021-06-30Cleanup: split uses of _snap_sequencer_apply according to transform modeGermano Cavalcante
The `applySnap` callback of each mode was overwriting the value calculated in `transform_snap_sequencer_apply`.
2021-06-29VSE: Improved SnappingRichard Antalik
Change snapping behavior to snap strip edges when they are close to snap point. Default behavior is, that each transformed strip is snapped to any other strip. Implement snapping controls in sequencer tool settings. These controls include: - Snapping on/off - Ability to snap to playhead and strip hold offset points - Filter snap points by excluding sound or muted strips - Control snapping distance Snapping controls are placed in timeline header similar to 3D viewport Reviewed By: mano-wii Differential Revision: https://developer.blender.org/D11646
2021-05-27Fix incorrect BLI_snprintf usageCampbell Barton
Event though in practice this wasn't causing problems as the fixed size buffers are generally large enough not to truncate text. Using the result from `snprint` or `BLI_snprintf` to step over a fixed size buffer allows for buffer overruns as the returned value is the size needed to copy the entire string, not the number of bytes copied. Building strings using this convention with multiple calls: ofs += BLI_snprintf(str + ofs, str_len_max - ofs); .. caused the size argument to become negative, wrapping it to a large value when cast to the unsigned argument.
2021-02-05Fix T82973: Strips overlap after transformingRichard Antalik
When transforming multiple strips to limits of sequencer timeline they get squashed into one channel. Store selection minimum and maximum channel in TransSeq and limit transformation so no strip can be transformed beyond timeline boundary. Reviewed By: Sergey, mano-wii Differential Revision: https://developer.blender.org/D10013
2021-02-05Cleanup: correct spelling in commentsCampbell Barton
2021-02-04Cleanup: pass keymap items as const where possibleCampbell Barton
2020-12-09Fix T83588: Crash with Shrink/Fatten and Offset EvenGermano Cavalcante
`t->keymap` can be `NULL`. Bug introduced in rBc822f66bb83
2020-12-07Fix T83307: Some modal keys of transform operators don't correspond to the ↵Germano Cavalcante
expected effect The transform modes `shrinkfatten` and `seq_slide` have a special way of handling events. They use modal events in a different way than expected. Therefore, this commit adds special event handles for these modes and removes the keymodal tips from the status bar. These effects are already described in the header anyway.
2020-10-27Cleanup: use over-line for doxy commentsCampbell Barton
Follow our code style for doxygen sections.
2020-10-08Cleanup: Simplify use of 'Snapping Gears'Germano Cavalcante
This commit removes `t->snap[0]` and `t->snap_spatial[0]`. They were not actually being used, and could add overhead for transformation without snap.
2020-09-24Fix T81096, T81127: Errors with the typed value for x-axis constrainGermano Cavalcante
`applyNumInput` does not write all axis values and does not consider the orientation.
2020-09-12Fix T80677: Absolute grid snapping doesn't work with constraintsGermano Cavalcante
Regression introduced in rB546b900194f0
2020-08-31Cleanup/Refactor: Split the snap to increments codeGermano Cavalcante
Now we have a better distinction of what is snap to grid and what is snap to increments. The code also allows the implementation of mixed snap for these modes.
2020-06-01Cleanup: Remove unused flagGermano Cavalcante
2020-05-20Fix T73148: Incorrect Repeat Last for transforms with Individual Origins and ↵Germano Cavalcante
Normal orientation `pvec` was confusing and was adding steps that are apparently unnecessary. So the code has been redone so as not to use this pvec.
2020-04-03Cleanup: Rename ScrArea variables from sa to areaJulian Eisel
Follow up of b2ee1770d4c3 and 10c2254d412d, part of T74432. Now the area and region naming conventions should be less confusing. Mostly a careful batch rename but had to do few smaller fixes. Also ran clang-format on affected files.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-02-14Cleanup: Split transform.c in multiple filesmano-wii
Differential Revision: https://developer.blender.org/D5819