Howard Trickey
365a5b75c1
Partial fix for T57868, crash when using bevel from Python.
...
These changes are necessary. Need to mark vertices of edges passed
in geom; also the normals.out slot has a custom element type, not
ELEM, so need to prevent attempt by python code to convert it to
an elem. But this leaves a memory leak. I will rework code to not
use normals.out slot at all, but that's a bigger fix.
Now there is a crash in a different place (GPU code). Think that if
using Op on its own (instead of from edbm_bevel_calc, there needs to
be a dependency graph update and maybe more?
2018-11-27 09:59:03 -05:00
Campbell Barton
030830be9a
Revert "Fix texture space not updating in edit mode."
...
This reverts commit 3a038db576 .
Caused CoW crash switching from edit to sculpt mode.
2018-11-27 14:18:44 +11:00
Campbell Barton
621405ee0f
Merge branch 'master' into blender2.8
2018-11-27 11:41:33 +11:00
Campbell Barton
9a5df92c1b
Fix T56872: Edge slide gives invalid normals
...
Add the ability to skip overwriting normals.
2018-11-27 11:40:32 +11:00
mano-wii
3a038db576
Fix texture space not updating in edit mode.
2018-11-26 07:32:04 -02:00
Bastien Montagne
23656d01d8
Merge branch 'master' into blender2.8
2018-11-20 18:01:13 +01:00
Bastien Montagne
ec851efda9
Fix T57923: Freeze in mesh vnors computation code with some degenerated geometry.
...
Second part of the fix: do not try at all to compute normals in degenerated
geometry. Just loss of time and potential issues later with weird
invalid computed values.
2018-11-20 17:54:48 +01:00
Bastien Montagne
c9c6433a59
Fix T57923: Freeze in mesh vnors computation code with some degenerated geometry.
...
Fix first part of it, the freeze itself being caused by float NAN values
never comparing equal to anything, not even themselves.
2018-11-20 17:52:21 +01:00
Campbell Barton
720368e2d0
Cleanup: use const mesh arg to BM_mesh_bm_from_me
...
Needed for D3966
2018-11-20 13:30:25 +11:00
Brecht Van Lommel
6f08124fbd
Fix assert in bevel modifier with certain geometry.
...
This happened in in the barbershop_interior.blend benchmark file, seems
duplicate hash entries are ok for this algorithm.
2018-11-14 18:21:28 +01:00
Campbell Barton
55e719ec35
Merge branch 'master' into blender2.8
2018-11-14 17:21:34 +11:00
Campbell Barton
d7f55c4ff5
Cleanup: comment block tabs
2018-11-14 17:10:56 +11:00
Campbell Barton
3756f920f4
BMesh: backport minor changes from 2.8
2018-11-10 19:56:02 +11:00
Campbell Barton
5a59327fb3
Cleanup: includes
2018-11-10 19:02:26 +11:00
Campbell Barton
0feeea1bd5
BMesh: avoid incorrect/invalid matrix calculation
...
- `BKE_object_scale_to_mat3` was used to get the worldspace scale,
without taking constraints, parenting etc into account.
- Don't pass object's into BMesh API, (prefer matrices instead).
- Avoid matrix invert for each edge-angle calculation.
- Avoid 2x matrix multiplies when looping over edge pairs.
2018-11-10 18:55:03 +11:00
Habib Gahbiche
0c1934f3c2
Multi-Objects: MESH_OT_select_similar worldspace completion
...
This makes the operator to work 100% with worldspace similarity:
* SIMFACE_PERIMETER
* SIMFACE_AREA
* SIMEDGE_FACE_ANGLE
Note from revisor (Dalai Felinto):
I'm not sure we want to pass Object * to the bmesh api, though I
personally don't see why not. Either way I group the patches together so
we can more easily roll them back if needs be.
Maniphest Tasks: T56948
Differential Revision: D3908, D3899, D3896
2018-11-09 17:19:04 -02:00
Campbell Barton
900c562b71
Cleanup: rename fast-heap -> heap-simple
...
In general prefer API names don't start with adjectives
since it causes grouping of unrelated API's for completion.
2018-11-06 13:06:49 +11:00
Campbell Barton
d805a4a5ef
Cleanup: move fast heap into own source & header
2018-11-06 12:52:34 +11:00
Alexander Gavrilov
fee6ab18e7
BLI_heap: implement a limited but faster version of heap.
...
If the user only needs insertion and removal from top, there is
no need to allocate and manage separate HeapNode objects: the
data can be stored directly in the main tree array.
This measured a 24% FPS increase on a ~50% heap-heavy workload.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D3898
2018-11-05 20:49:17 +03:00
Alexander Gavrilov
d3c815bd08
BLI_heap: add an API function to directly read the top node value.
...
It is very commonly needed in loop conditions to check if
the items in the heap are good enough to continue.
2018-11-04 13:29:17 +03:00
Campbell Barton
4b2b8a0c3f
Fix T57351: Deform modifiers skipped in editmode
2018-10-24 14:48:17 +11:00
Campbell Barton
860dd31647
Merge branch 'master' into blender2.8
2018-10-24 12:55:44 +11:00
Campbell Barton
db69deea89
BMesh: inline index lookups
...
For release builds this is now the same as indexing the array directly.
2018-10-24 12:54:26 +11:00
Campbell Barton
756ac74f81
Cleanup: rename 'dm' -> 'me' for 'Mesh' types
2018-10-23 15:00:40 +11:00
Campbell Barton
dbdf653f8e
Fix bad origindex layers for editmode modifiers
...
Reverts workaround from last commit.
2018-10-23 13:53:42 +11:00
Campbell Barton
633e2cddd7
BMesh: simple bmesh -> mesh for evaluation
...
Copied from CDDM_from_bmesh, the modifier stack doesn't
need to handle shape keys, vertex parents or selection history
(needed for mode switching).
2018-10-10 13:14:15 +11:00
Campbell Barton
733e6c0b1d
Merge branch 'master' into blender2.8
2018-10-09 08:46:00 +11:00
Campbell Barton
da39f10eb7
Fix T57103: Subdivide smooth results in NAN verts
2018-10-09 07:49:54 +11:00
Dalai Felinto
0f03750f4f
Cleanup: Remove bmo_similar.c and small renaming
2018-09-28 10:32:04 -03:00
Campbell Barton
07747bcd67
Merge branch 'master' into blender2.8
2018-09-26 10:30:34 +10:00
Campbell Barton
34d98cfe61
BMesh: spin option to merge first/last
...
For 360d revolutions this is almost always whats intended,
enable by default.
2018-09-26 09:55:17 +10:00
Campbell Barton
a7bf4966e2
Merge branch 'master' into blender2.8
2018-09-25 13:42:51 +10:00
Campbell Barton
06d4fad313
BMesh: option to flip normals for extrude/spin
2018-09-25 13:31:29 +10:00
Dalai Felinto
502dbcf404
Select Similar: Cleanup - WITH_FREESYTLE
2018-09-21 16:32:24 -03:00
Campbell Barton
bb3ec3ebaf
BLI_utildefines: rename pointer conversion macros
...
Terms get/set don't make much sense when casting values.
Name macros so the conversion is obvious,
use common prefix for easier completion.
- GET_INT_FROM_POINTER -> POINTER_AS_INT
- SET_INT_IN_POINTER -> POINTER_FROM_INT
- GET_UINT_FROM_POINTER -> POINTER_AS_UINT
- SET_UINT_IN_POINTER -> POINTER_FROM_UINT
2018-09-19 12:12:21 +10:00
Campbell Barton
f35e9f047a
Merge branch 'master' into blender2.8
2018-09-19 12:14:36 +10:00
Campbell Barton
0ddf3e110e
Cleanup: comment blocks
2018-09-02 18:51:31 +10:00
Campbell Barton
ae57383648
Cleanup: comment blocks
2018-09-02 18:28:27 +10:00
Campbell Barton
21105e1b1f
Cleanup: use simple early exit for common case
...
Caused MSVC warning, may as well do simple check.
2018-08-30 01:19:44 +10:00
Andrew Hale
1e6a5eb087
Implement BMesh Operator string enumerators and docs generation.
...
Partial implementation of T56496 for review.
Reviewers: campbellbarton
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D3635
2018-08-27 16:15:54 +02:00
Campbell Barton
d2e70455cf
Merge branch 'master' into blender2.8
2018-08-20 17:53:53 +10:00
Andrew Hale
f52e31a46d
Fix BMesh edge_bisect, edge_percent being ignored
...
Also fix float/int/bool access methods
2018-08-20 13:38:10 +10:00
Campbell Barton
d648501e28
BMesh: define suptype for bevel normals.out
...
Not doing this broke doc building.
2018-08-14 22:26:19 +10:00
Howard Trickey
aac5458fa5
Fix bevel problem for vertex-only cube corners.
...
Was introduced by code from gsoc branch that does better job
on cube corners, but shouldn't have applied to vertex-only case.
2018-08-13 09:25:16 -04:00
Campbell Barton
eb7b450c0c
Cleanup: style
2018-08-10 08:14:22 +10:00
Howard Trickey
1ee93dc670
Quiet warnings in bmesh_bevel.c.
2018-08-09 14:43:52 -04:00
Rohan Rathi
2b41b208c7
Merge branch 'soc-2018-bevel' into blender2.8
2018-08-09 19:52:07 +05:30
Campbell Barton
aa41c86636
Cleanup: trailing space
2018-08-08 20:45:43 +10:00
Rohan Rathi
c41ce58fde
Fix indentation, spacing and added comments
2018-08-05 08:39:20 +05:30
Rohan Rathi
e5e9578881
Added comments to functionality in main bevel code
2018-08-04 23:20:53 +05:30