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
2020-10-19Silence an unused variable warning in bmesh_bevel.c.Howard Trickey
2020-10-19Cleanup: clang tidyJacques Lucke
2020-10-18Fix Bevel percent mode, and clamping for it too (T79898).Howard Trickey
The code for Bevel's percent (and absolute) modes were pretty bogus. It assumed, like the rest of the modes, that the offset lines are parallel to the beveled edge. Which is not true for these modes, though it accidentally works sometimes if the legs are equilength. Also the clamping code for those modes was completey wrong. It is too hard to really fix the clamping code for absolute mode, but it is a little better now. Percent mode clamping is fixed.
2020-08-11Cleanup: Reduce indentation levelHans Goudey
Check the simpler case first and return early.
2020-08-11Cleanup: Remove unecessary variablesHans Goudey
2020-08-11Cleanup: Use sizeof first in allocationsHans Goudey
2020-08-11Cleanup: Reduce indentation levelHans Goudey
Exit early if the bevel width is zero instead of putting the main function in an if statement.
2020-08-11Cleanup: Reduce scope of variable declarations in bmesh_bevel.cHans Goudey
This commit generally moves variable declarations to the smallest scope the variables are used in. This makes the code more readable by making it clearer when variables are used and by removing the block of variable declarations at the top of each function.
2020-08-11Cleanup: spellingCampbell Barton
2020-08-08Cleanup: use array syntax for sizeof with fixed valuesCampbell Barton
Also order sizeof(..) first to promote other values to size_t.
2020-08-07Cleanup: pass arrays const where possibleCampbell Barton
2020-08-07Cleanup: declare arrays arrays where possibleCampbell Barton
2020-08-04Cleanup: Bevel: Split two case for loop into separate functionHans Goudey
Previously a for loop with two iterations was used to calculate the 3D segment locations for the input number and the higher power of 2. Splitting off the inside of the for loop to a separate function makes the code more readable. This commit also includes a simple timer for bevel, enabled with a define. Interestingly, the cleanup in this commit happended to give a 3% speedup on a Ryzen 3700x for a bevel calculation with 64 segments.
2020-08-04Merge branch 'blender-v2.90-release'Hans Goudey
2020-08-04Fix (unreported): Bevel tool custom profile uses wrong segments numberHans Goudey
The bevel code initialized the CurveProfile with the "higher power of 2" segments after the normal number of segments, leaving the widget in an incorrect state after the calculation. A simple fix is to re-order the initializations, doing the input number second.
2020-08-04Cleanup: Reduce indentation in functionHans Goudey
2020-08-01Cleanup: use term init instead of initialize/initialiseCampbell Barton
The abbreviation 'init' is brief, unambiguous and already used in thousands of places, also initialize is often accidentally written with British spelling.
2020-07-23Fix T29189 bevel crash.Howard Trickey
New code to calculate UV islands made an incorrect assumption about maximum stack size.
2020-07-23Fix T79189 bevel crash.Howard Trickey
New code to calculate UV islands made an incorrect assumption about the maximum size of a stack.
2020-07-21Bevel: Refactor "Vertex Only" to an enumHans Goudey
This matches the change that was done to the bevel modifier so that the interface for the modifier, the active tool, and the operator are consistent. This commit extends the refactor to the bmesh implementation too, so that the parameters in the implementation don't stray too far from what is exposed. Tests are adjusted and still pass.
2020-07-20Fix T78733 Bevel sometimes produces zero-area UV face with odd segments.Howard Trickey
A bug introduced when I made the choice of interpolation face cleverer.
2020-07-14Cleanup: spellingCampbell Barton
2020-07-03Cleanup: Unused variables in non-debug buildHans Goudey
2020-07-03Cleanup: BMesh, Clang-Tidy else-after-return fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/bmesh` module. No functional changes.
2020-07-02Cleanup: spellingCampbell Barton
2020-07-01Cleanup: spellingCampbell Barton
2020-06-26Cleanup: Fix strict compiler warning about variable shadowingSergey Sharybin
Thanks Howard for double-checking!
2020-06-26Fixed typo in previous commit (UV fix); had nonsensical self-test.Howard Trickey
2020-06-26Fix T76199 Bevel materials "bleed" over faces.Howard Trickey
When there is an odd number of segments, bevel has an ambiguous choice as to which side face to use to copy face attributes from and to use for UV (and other loops that have math function) interpolation. We used to make choice arbitrarily, which led to visually inconsistent results. Now there is tie-breaking code, face with lexicographic lowest value in vector with these elements: (1) connected component (in math-layer space) id (2) selected (0) vs unselected (1) (3) material index (4,5,6): z,x,y components of face center, in that order.
2020-06-23Cleanup: A few small comment & naming changes in bevelHans Goudey
2020-06-23Bevel: Refactor profile type input to use an enumHans Goudey
This will allow the easier addition of a constant radius mode in the future and some changes in the UI to mirror the recent similar change from "Only Vertices" to the "Affect" enum.
2020-06-20Bevel: add new 'Absolute' mode for interpreting 'amount' value.Howard Trickey
This mode is like Percent, but measures absolute distance along adjacent edges instead of a percentage. So, for example, if you use this mode with 2 segments and profile=1, you will see the length that the bevel moves along unbeveled edges between beveled ones will match the value specified. Many users seem to expect this behavior, even though it means the bevel width is uneven, so this option is for them.
2020-06-10Cleanup: improve custom data type namesJacques Lucke
This is related to T76659. This just renames data type names to `CD_PROP_STRING`, `CD_PROP_FLOAT` and `CD_PROP_INT32`. It makes them a bit more specific and removes unnecessary abbreviations. Reviewers: brecht Differential Revision: https://developer.blender.org/D7980
2020-05-19Merge branch 'blender-v2.83-release'Hans Goudey
2020-05-19Fix T75383:Bevel weird behaviour when using bevel weightsHans Goudey
Don't use the cube corner special case when the offsets are different for the three edges involved. The generic VMesh for this situation isn't perfect, but it's much better than a failed cube corner VMesh. Tests pass.
2020-04-17Cleanup: use colon after doxygen parameters, spellingCampbell Barton
2020-03-20Cleanup: clang-format, comment indentationCampbell Barton
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-15Cleanup: add parens for clarityCampbell Barton
2020-03-06Cleanup: use 'BKE_' prefix for BKE_deform API callsCampbell Barton
- Use 'BKE_object_defgroup' prefix for object functions. - Rename 'defvert_verify_index' to 'defvert_ensure_index' since this adds the group if it isn't found.
2020-03-02Bevel: Z-Up Custom Profile OrientationHans Goudey
When beveling architectural objects like baseboards or crown mouldings that may consist of multiple islands, it's useful if the orientation is at least conistent. This changes the arbitrary decision of how the orientation should start at a chain beginning to use the highest side of the profile in the Z direction. Reviewed By: howardt Differential Revision: https://developer.blender.org/D6946
2020-02-28Fix T74256, crash in bmesh.ops.bevel if segments not set.Howard Trickey
Also changed signature of bevel function to take integer for segments instead of float, which is just wrong.
2020-02-07Code Quality Day: Comment formatting in bmesh_bevel.cHans Goudey
2020-01-30Fix T73450, crash when adding segments on bevel.Howard Trickey
Needed to protect against a case where clamp overlap limited the offset to approximately zero, and the snap-to-pipe code would therefore encounter an almost degenerate profile and fail in matrix inversion.
2020-01-25Bevel: Remove Debugging CodeHans Goudey
Remove old / trivial print statements and drawing code. Reviewed By: howardt Differential Revision: https://developer.blender.org/D6661
2020-01-25Bevel: Simplify Profile Calculation StepHans Goudey
Profile calculation now happens in a single pass rather than being spread throughout the process. This means each profile will only be calculated a single time. Reviewed By: howardt Differential Revision: https://developer.blender.org/D6658
2020-01-13Fix T71329: Bevel: Don't drop offsets to 'in plane' facesHans Goudey
offset_meet creates offset lines that can't be directly intersected, so the average of the points on each offset line is 'dropped' onto the faces around the beveled vertex, which can depend on where the loop starts. This fix skips faces with the same normals as the "in plane" faces from build_boundary. Reviewed By: howardt Differential Revision: https://developer.blender.org/D6521
2019-11-24Cleanup: doxygen commentsCampbell Barton
Also correct some outdated symbol references, add missing 'name' commands.
2019-11-24Cleanup: spelling, repeated wordsCampbell Barton
2019-11-22Fixed rest of bevel regression tests.Howard Trickey
The calculation of pro_super_r rounded to a non-exact float, so put in rounding code for the special cases.