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
2021-07-16Cleanup: remove redundant parenthesesCampbell Barton
2021-07-15Cleanup: replace BLI_assert(!"text") with BLI_assert_msg(0, "text")Campbell Barton
This shows the text as part of the assertion message.
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-07-14Transform: Identify more safely when the mesh is deform onlyGermano Cavalcante
Depending on the modifiers, geometry can be destructive which is not safe.
2021-07-13Fix 'Correct Face Attributes' optionGermano Cavalcante
With this option enabled, updating the geometry is no longer deform only.
2021-07-13Cleanup: replace BKE_customdata.h in BKE_editmesh.hCampbell Barton
Only DNA_customdata_types.h is needed for BMEditMesh.
2021-07-13Depsgraph: Implement 'ID_RECALC_GEOMETRY_DEFORM'Germano Cavalcante
During a mesh transformation in edit mode (Move, Rotate...), only part of the batch cache needs to be updated. This commit allows only update only the drawn batches seen in `BKE_object_data_eval_batch_cache_deform_tag` if the new `ID_RECALC_GEOMETRY_DEFORM` flag is used. This new flag is used in the transforms operation for edit-mesh and results in 1.6x overall speedup in heavy subdiv cube. Differential Revision: https://developer.blender.org/D11599
2021-07-12Cleanup: improve naming and comments of scene frame/ctime functionsBrecht Van Lommel
Confusingly, BKE_scene_frame_get did not match the frame number as expected by BKE_scene_frame_set. Instead it return the value after time remapping, which is commonly named "ctime". * Rename BKE_scene_frame_get to BKE_scene_ctime_get * Add a new BKE_scene_frame_get that matches BKE_scene_frame_set * Use int/float depending if fractional frame is expected
2021-07-07Cleanup: spelling in commentsCampbell Barton
2021-07-05Cleanup: spelling, punctuationCampbell 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-07-02Cleanup: Further use of const when accessing evaluated meshHans Goudey
Also resolve a warning from the previous commit. The next blocker to using const is `BKE_mesh_wrapper_ensure_mdata`.
2021-07-02Copy Transforms: implement Remove Target Shear and more Mix options.Alexander Gavrilov
This constraint can be naturally viewed as a prototype for a future 4x4 matrix math node (or subset thereof), since its basic semantics already is matrix assignment. Thus it makes sense to add math options to this constraint to increase flexibility in the meantime. This patch adds support for several operations that would be useful: - An option to remove shear in the incoming target matrix. Shear is known to cause issues for various mathematical operations, so an option to remove it at key points is useful. Constraints based on Euler like Copy Rotation and Limit Rotation already have always enabled shear removal built in, because their math doesn't work correctly with shear. In the future node system shear removal would be a separate node (and currently Limit Rotation can be used as a Remove Shear constraint). However removing shear from the result of the target space conversion before mixing (similar to Copy Rotation) has to be built into Copy Transforms itself as an option. - More ways to combine the target and owner matrices. Similar to multiple Inherit Scale modes for parenting, there are multiple ways one may want to combine matrices based on context. This implements 3 variants for each of the Before/After modes (one of them already existing). - Full implements regular matrix multiplication as the most basic option. The downside is the risk of creating shear. - Aligned emulates the 'anti-shear' Aligned Inherit Scale mode, and basically uses Full for location, and Split for rotation/scale. (This choice already existed.) - Split Channels combines location, rotation and scale separately. Looking at D7547 there is demand for Split Channels in some cases, so I think it makes sense to include it in Copy Transforms too, so that the Mix menu items can be identical for it and the Action constraint. Differential Revision: https://developer.blender.org/D9469
2021-07-01Fix memory leak in VSE transform codeRichard Antalik
SeqCollection wasn't freed. It wasn't easy to find culprit so added argument to SEQ_collection_create() to pass function name. Reviewed By: sergey Differential Revision: https://developer.blender.org/D11746
2021-07-01VSE: Snapping feedbackRichard Antalik
Address initial feedback: - Use checkboxes instead of radio buttons - Hide snapping distance control from UI - Tweak snapping line color - use selected strip color, 50% transparency. Similar to other editors - Draw 2px thick line, since strip outline is also 2px thick Reviewed By: HooglyBoogly Differential Revision: https://developer.blender.org/D11759
2021-07-01Fix edit-mesh partial update regression when snapping to normalsCampbell Barton
Edit-mesh partial update logic assumed translate didn't need normals to be recalculated (for faces with all vertices being transformed). However translate can optionally rotate which requires all transformed normals to be updated. Check for this case and use the previous partial-update method when it modified extra geometry, so the normals are properly reset. Further updates need not recalculate them.
2021-07-01Cleanup: replace booleans with enum for storing translate rotationCampbell Barton
2021-07-01Correction to T89571 fix 4546f176eb0f822048b53766f2e97c5a4cbf53c6Campbell Barton
Supporting both object & edit-mode is more involved. Both cases are now supported with object mode tracking the last-used state for rotation so it's only reset once when rotation is disabled.
2021-07-01Fix T89571: Align Orientation to Target keeps rotation when toggledCampbell Barton
2021-07-01Cleanup: rename playhead to current-frameCampbell Barton
2021-07-01Cleanup: outdated IPO references in commentsCampbell Barton
2021-06-30Cleanup: store the result of isLockConstraint for reuseCampbell Barton
This was being called for every element in some situations.
2021-06-30Cleanup: rename transform mode variablesCampbell Barton
Use the term 'mat_final' for calculated matrices used for transforming. Also rename 'pivot' to 'pivot_local'.
2021-06-30Transform: support multi-threading for bendCampbell Barton
2021-06-30Transform: support multi-threading for most modesCampbell Barton
Multi-threading support for transform modes: bevel-weight, crease, push-pull, rotate, shear, shrink-fatten, skin-resize, to-sphere, trackball & translate. This is done using a parallel loop over transform data. From testing a 1.5million polygon mesh on a 32 core system the overall performance gains were between ~20-28% To ensure the code is thread-safe arguments to shared data are const. Reviewed By: mano-wii
2021-06-30Cleanup: use const arguments for accessor functionsCampbell Barton
2021-06-30Cleanup: rename 'count' to 'len'Campbell Barton
Reserve the term count for values that require calculation (typically linked lists). Without this convention it's difficult to know if using a length accessor function in a loop will be O(N^2) without inspecting the underlying implementation.
2021-06-30Cleanup: unused arg warningsCampbell Barton
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-29Cleanup: Deduplicate codeGermano Cavalcante
2021-06-29Cleanup: split CalcSnapGeometry in smaller functionsGermano Cavalcante
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-06-29Cleanup: use 'const' arguments in transform calculationCampbell Barton
Use const arguments to simplify further optimizations. Transforming elements shouldn't need to change their containers data-structures. ElementResize for grease pencil stroke thickness was modifying TransInfo.num & TransInfo.values_final. Now copies are operated on to preserve const correctness although it's worth investigating if this can be avoided altogether.
2021-06-29Cleanup: translate commentsCampbell Barton
It wasn't so clear why the POINT_INIT check was disabled, move this into the code comment.
2021-06-28Transform: Move "Proportional Size" and "AutoIK-Len" values to the beginning ↵Germano Cavalcante
of the header This prevents the text from shaking while transforming.
2021-06-28Cleanup: repeated terms in code comments & error messagesCampbell Barton
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-26Edit Mesh: optimize common use-cases for partial updatesCampbell Barton
Skip updating normals & tessellation for contiguous geometry regions for operations such as translate & uniform scale. This means when all geometry is selected, no updates are needed as the relative locations of vertices aren't being modified. Performance: As this is skipping a multi-threaded operation, larger improvements are noticeable on systems with fewer cores. - ~1.15x to ~1.3x overall gain for 32 cores. - ~1.7x to ~2.2x overall gain for 1 core (limited using `-t 1` argument). Details: - Rotate & non-uniform scale only skip tessellation. - Proportional editing and axis-mirror have special handling ensure geometry is properly grouped before considering a face part of a single group that can be skipped. - Loose vertices always need their normals to be recalculated since they're calculated based on the location. - Non-affine transform operations such as shrink-fatten & bend, don't take advantage of this optimization. - Snap projection also disables the optimization.
2021-06-26Cleanup: move snap with projection check into a functionCampbell Barton
2021-06-25Fix T87185: value assigned to modal Scale does not work properlyCampbell Barton
`t->values` does not necessarily represent a final value of the transformation, as each mode treats this value differently. So, unfortunately, we cannot have a generic offset solution for modal transform operations. Offset needs to be handled by each mode. Note: Currently only, `Move`, `Rotate` and `Resize` support this.
2021-06-24Cleanup: compiler warnings with clangBrecht Van Lommel
* Mark either all or no class methods with override * Don't use zero sized array since it has a different size in C and C++. Using a little more memory here is not significant. * Don't use deprecated mechanism to mark private GSet members in clang just like we don't for MSVC, it warns even for simple zero initialization.
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-23Cleanup: reformat trailing comments that caused line wrappingCampbell Barton
2021-06-23Cleanup: compiler warning for invalid argument typeCampbell Barton
2021-06-22Transform: display units for proportional edit valueGermano Cavalcante
This fixes T88346. The code is also more readable by making a better distinction between the texts used for Distances, "Proportional Size" and "AutoIK-Len". And the text used to translate the "Proportional Size" is reused.
2021-06-22Cleanup: deduplicate code and rename variablesGermano Cavalcante
This makes it clearer that variables are strings and how they are used in the Move header code.
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-21Fix T89291: Objects with rotation deltas don't rotate in correct axesGermano Cavalcante
Quaternion correction was not implemented and Euler values were being incorrectly combined.
2021-06-20Cleanup: clang-formatCampbell Barton
2021-06-19VSE: Remove seq->tmp usageRichard Antalik
Remove `seq->tmp` usage from transform code. It was used to tag strips that need to be "shuffled". Pass these strips in `SeqCollection` instead. Reviewed By: sergey, mano-wii Differential Revision: https://developer.blender.org/D11631