Commit Graph

2363 Commits

Author SHA1 Message Date
Campbell Barton 35b78d9807 Cleanup: indentation, wrapping
Mostly functions wrapping args, not confirming to our style guide.
2019-03-15 09:54:30 +11:00
Campbell Barton 52d31b4894 BMesh: make edge winding from face optional
Broke uv-sphere creation, further it might be a problem
for script authors expecting matching edge order for duplicated content.

Now only apply this when duplicating via the operator.
2019-03-13 19:57:52 +11:00
Campbell Barton 432750f7cf Fix T62487: Flipped normals extruding edge loop 2019-03-13 19:21:10 +11:00
Campbell Barton ef04513925 BMesh: utility function to swap edge verts
Needed so we can control the winding of extruded faces.
2019-03-13 19:12:26 +11:00
Brecht Van Lommel a749d7d8fa Fix T59304: boolean modifier does not preserve UV textures.
In the old derivedmesh function it was merging customdata layers, added
that back for mesh conversion too.
2019-03-08 14:19:45 +01:00
Campbell Barton 8f817de0cb Cleanup: use plural names for Main lists
Convention was not to but after discussion on 918941483f we agree its
best to change the convention.

Names now mostly follow RNA.

Some exceptions:

- Use 'nodetrees' instead of 'nodegroups'
  since the struct is called NodeTree.
- Use 'gpencils' instead of 'grease_pencil'
  since 'gpencil' is a common abbreviation in the C code.

Other exceptions:

- Leave 'wm' as it's a list of one.
- Leave 'ipo' as is for versioning.
2019-03-08 09:50:00 +11:00
Bastien Montagne ab0bc65c24 Refactor CDData masks, to have one mask per mesh elem type.
We already have different storages for cddata of verts, edges etc.,
'simply' do the same for the mask flags we use all around Blender code
to request some data, or limit some operation to some layers, etc.

Reason we need this is that some cddata types (like Normals) are
actually shared between verts/polys/loops, and we don’t want to generate
clnors everytime we request vnors!

As a side note, this also does final fix to T59338, which was the
trigger for this patch (need to request computed loop normals for
another mesh than evaluated one).

Reviewers: brecht, campbellbarton, sergey

Differential Revision: https://developer.blender.org/D4407
2019-03-07 11:29:50 +01:00
Campbell Barton 18e5540a48 Cleanup: remove redundant file argument 2019-03-06 11:18:17 +11:00
Howard Trickey 2b892c6c21 Fix T61988, Bevel miter on small scale.
Take two at fix, hopefully without unintended commits
to submodules this time.
2019-02-27 11:52:30 -05:00
Howard Trickey 4243c29463 Revert "Fix T61988: Bevel mitering on small objects."
This reverts commit 048088e1d2.
Accidentally changed submodules. Will resubmit with only
intended changes later.
2019-02-27 11:42:48 -05:00
Howard Trickey 048088e1d2 Fix T61988: Bevel mitering on small objects.
When edges had small length (less than about .005) the angle
classification didn't work. Needed some normalization of vectors.
2019-02-27 07:51:57 -05:00
Campbell Barton 58a394073f BMesh: utility functions for visible element access
Needed for drawing code which skips hidden elements.
2019-02-26 16:03:21 +11:00
Campbell Barton de13d0a80c doxygen: add newline after \file
While \file doesn't need an argument, it can't have another doxy
command after it.
2019-02-18 08:22:12 +11:00
Campbell Barton 3316853323 Cleanup: conform headers to have license first
Also remove doxy comments for licenses and add missing GPL header.
2019-02-18 08:22:11 +11:00
Howard Trickey dd97b09fa8 Bevel: fix twist on bevel of cylinder with >= 200 sides.
This triggered an "almost parallel" case in setting the
offset meet points, which is OK but code needed improvement
put the meet point in a more accurate place.
This ia fix for part of the report T61214.
2019-02-15 08:32:07 -05:00
Howard Trickey 5c432cd11b Fix T61427: Bevel crash with patch miter.
The adjustment phase had broken assumptions after adding miters,
and sent a null problem to eigen. Fixed code to check assumptions.
2019-02-14 17:21:50 -05:00
Campbell Barton 452df3f392 Cleanup: comments 2019-02-12 01:51:03 +11:00
Campbell Barton ffd0fee97c Cleanup: comment indentation & spelling 2019-02-11 10:51:25 +11:00
Howard Trickey 2f0dbdea4f Bevel, fix crash when adjust offsets with inner arc miter.
Previous assumptions about boundary verts always being attached
to edges are now false.
2019-02-08 09:24:43 -05:00
Howard Trickey 29922b6ff5 Bevel: fix regression re even adjustment of offsets.
Mistakenly had left a debugging assignment that disabled
the offset pass. This commit re-enables it.
2019-02-08 09:02:29 -05:00
Howard Trickey dec4f6d7ed Bevel: better attachment points for unbeveled edges, arc miter. 2019-02-07 10:42:28 -05:00
Campbell Barton eef4077f18 Cleanup: remove redundant doxygen \file argument
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
2019-02-06 15:45:22 +11:00
Campbell Barton af2d2d4dff Fix T58221: Spin tool w/ merge first/last crashes
Spinning geometry that included non boundary/wire edges
crashed when merge first/last enabled.
2019-02-05 13:30:07 +11:00
Campbell Barton ab5e69e660 Cleanup: remove contributors for CMake files
Following removal from C source code.

See: 8c68ed6df1
2019-02-05 09:10:32 +11:00
Pablo Vazquez 3be845ce20 Cleanup: Typos in comments (to to) 2019-02-04 01:23:48 +01:00
Campbell Barton 744f633986 Cleanup: trailing commas
Needed for clan-format not to wrap onto one line.
2019-02-03 14:59:11 +11:00
Campbell Barton 65ec7ec524 Cleanup: remove redundant, invalid info from headers
BF-admins agree to remove header information that isn't useful,
to reduce noise.

- BEGIN/END license blocks

  Developers should add non license comments as separate comment blocks.
  No need for separator text.

- Contributors

  This is often invalid, outdated or misleading
  especially when splitting files.

  It's more useful to git-blame to find out who has developed the code.

See P901 for script to perform these edits.
2019-02-02 01:36:28 +11:00
Campbell Barton 293f4d88da Cleanup: style, unused variable 2019-01-31 15:54:37 +11:00
Howard Trickey 79f76c8544 Bevel - better corner shapes for inner arc miters.
The subdivision method for getting corner shapes has a fullness
parameter which had been set by eye before. This change uses fullness
as found by offline search process to best match the superellipsoid
octant in the cube corner case (except cube corner case is still handled
by other code). This somewhat improves the look of cube corners with
inner arc miters, however.
2019-01-29 07:21:59 -05:00
Campbell Barton c0f88ed8a8 Cleanup: sort forward declarations of enum & struct
Done using:
  source/tools/utils_maintenance/c_sort_blocks.py
2019-01-28 21:17:58 +11:00
Campbell Barton 1e4aab36c2 Cleanup: remove redundant BKE/BLI/BIF headers 2019-01-26 21:20:25 +11:00
Campbell Barton 2218bf02dd Cleanup: sort cmake file lists 2019-01-25 08:30:33 +11:00
Campbell Barton a93cbb70cd Fix T60643: BMesh operator enum args fail when unset from Python
Error introduced with bmesh operator enum support: 1e6a5eb087
2019-01-22 14:28:17 +11:00
Campbell Barton 49208a3419 Cleanup: shadow warning, style 2019-01-21 10:05:58 +11:00
Campbell Barton 8a61ea7296 Cleanup: add trailing commas
Prevents clang-format merging into a single line.
2019-01-19 13:58:35 +11:00
Howard Trickey b640fd829e Add miter pattern options.
Will document the new options in release notes, then in manual.
Still a bit of work to do on the bulging shape that appears
on cube corners if using arc inner miters, but will do that later.
Also need to do something smarter in clamp overlap.
2019-01-18 12:54:10 -05:00
Campbell Barton 2f372654b6 BMesh: keep selection history when removing doubles
Auto-merge would loose the active vertex.
2019-01-17 12:36:17 +11:00
Campbell Barton 371006ddea BMesh: Remove doubles now merges face-flags 2019-01-17 12:32:12 +11:00
Campbell Barton c5ae1cde5c Cleanup: variable names 2019-01-17 12:29:09 +11:00
Campbell Barton 7c4803367f BMesh: prevent weld-verts bmop creating selected+hidden verts/edges
Related to error exposed by T59640
Would have fixed crash too, but we want to ignore hidden verts.
2019-01-16 15:31:54 +11:00
Campbell Barton beaa66bb13 Fix T59640: Transform w/ auto-merge & hidden verts crashes 2019-01-16 15:03:17 +11:00
Campbell Barton 88a80fcec8 Cleanup: commas at the end of enums
Without this clang-format may wrap them onto a single line.
2019-01-16 00:03:03 +11:00
Campbell Barton f91b21f85b Cleanup: move comments above definitions
For clang-format not to wrap definitions.
2019-01-14 16:30:43 +11:00
Clément Foucault 74260a2b6d BMesh: Add BM_face_calc_area_uv 2019-01-11 16:00:23 +01:00
Campbell Barton 91a155833e Cleanup: comments causing bad clang-format output 2019-01-08 10:37:43 +11:00
Howard Trickey 496f6adce2 Better bevel normal hardening when some faces were smooth.
Harden normals causes normal splitting, which will not give the
appearance expected due to autosmooth unless some edges are sharpened,
so this change fixes that. Also bevel tool will turn on autosmooth
if not already on if hardening normals.
2019-01-06 18:12:00 -05:00
Campbell Barton e305560f13 Cleanup: add trailing commas to structs
Needed for clang formatting to workaround bug/limit, see: T53211
2019-01-07 00:34:48 +11:00
Campbell Barton c3e454b8e0 Fix T60099: Inconsistent normals from spin tool 2019-01-04 16:23:04 +11:00
Campbell Barton a68fef7c35 Fix eternal loop in spin tool merge first/last 2019-01-04 16:14:00 +11:00
Howard Trickey aef01c47e6 Fix T58113 Multiple problems with bevel harden normals.
Move the bevel hardening code all into bmesh_bevel.c.
Based on user feedback, rewrote the bevel hardening algorithm
to be more what users want.
Based on user feedback, changed the UI, removing some
not-useful options. Now hardening normals while beveling
is enabled by a simple checkbox.
Now setting face strength gives options for which faces
get their face strength set.
2019-01-03 13:39:52 -05:00