Commit Graph

50578 Commits

Author SHA1 Message Date
Campbell Barton
ec2ca11cba BMesh Path Select: Add checker-select options
Allows to quickly select alternate elems in a path (matching checker-deselect options).

- adds redo support to MESH_OT_shortest_path_pick, allowing for other options.
- de-duplicates code between 2x path select operators.
- expose 'Topology Distance' property for path picking.
- remove unused 'extend' property.
2015-12-27 19:35:33 +11:00
Campbell Barton
d020b4ca91 BMesh: extract int/bmesh element access funcs.
Support getting an vert/edge/face from a single index, useful for operator redo.
2015-12-27 18:05:34 +11:00
Campbell Barton
f820c45534 WM: add checker_interval utility functions 2015-12-27 18:01:11 +11:00
Campbell Barton
b254905c38 Move generic operator props into own file
This is unrelated to core operator internals, so move into own file.
2015-12-27 17:21:00 +11:00
Alexander Romanov
700c40e2f9 OpenGL: stipple support added to basic GLSL shader
The is intended to replace the deprecated glPolygonStipple() calls with a shader
based alternative, once we switch over to GLSL shaders.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D1688
2015-12-26 22:15:23 +01:00
Sergey Sharybin
4415e52009 CMake: Fix errors building by MinGW
Some libraries are nto updated for MinGW hence build system
needs some exceptions for this compiler.
2015-12-26 20:01:17 +05:00
Campbell Barton
0d7d317755 BMesh: add checks for duplicates in a face
These could go un-noticed, causing errors later on.
2015-12-26 15:34:55 +11:00
Campbell Barton
77c3ecf88c BMesh: check at least 2 edges in each loops vert
Also no need to check twice
2015-12-26 15:34:55 +11:00
Campbell Barton
dd070c6c32 Cleanup 2015-12-26 15:34:55 +11:00
Bastien Montagne
66030d8c22 Minor cleanup. 2015-12-25 15:53:18 +01:00
Bastien Montagne
4d5b7fedde MOD_UVWarp: switch from OMP to BLI_task.
Usual 10%-15% speedup. Note that here OMP was rather erratic, with typical
timing about 10% slower than BLI_task, but having some 'burnouts' (~10% of times)
were it would be over ten times slower than usual... BLI_task looks much more stable.
2015-12-25 15:52:14 +01:00
Campbell Barton
5cd1b530c8 Cleanup: use enum for bmesh_elem_check 2015-12-25 02:10:00 +11:00
Campbell Barton
9a1ea681e6 BMesh: remove doubles fix/optimization
Changes to remove doubles face creation,
Recent change to remove doubles broke when the new faces already existed (rare occurrence),
however theres no point to return an existing double face.

Now check if the face exists before creating it.

Other changes:

- avoid 2x hash lookups on all mapped verts.
- fill in the vert array instead of calculating from edges.
- remove inefficient search of entire edge-array before adding to it.
  (flag verts to ensure they're not used multiple times).
- move logic for transfusing edge-flags to edge creation.
2015-12-24 20:30:05 +11:00
Campbell Barton
4a356d767b BMesh: BM_verts_from_edges utility function 2015-12-24 20:30:02 +11:00
Campbell Barton
c8c7d04d69 Add STACK_CLEAR macro 2015-12-24 20:05:45 +11:00
Brecht Van Lommel
1a2b5d9a8b Fix a few warnings with Apple LLVM 7.0.2. 2015-12-23 20:39:03 +01:00
Brecht Van Lommel
93c75bf992 Fix T47051: cycles viewport textured shadeless draw bug. 2015-12-23 20:38:58 +01:00
Campbell Barton
083d6d63c8 Fix weld edges into faces splicing verts that shared a face
This could happen with degenerate faces.
2015-12-24 03:36:06 +11:00
Campbell Barton
6732da8340 Fix weld edges into faces - eternal loop
Would happen with complex edge-nets mixed with faces.
2015-12-24 03:36:00 +11:00
Campbell Barton
b9dea0f941 Remove BLI_buffer calloc option
This wasn't working reliably (after clear for example), and wasn't used anywhere.
2015-12-24 01:52:54 +11:00
Campbell Barton
ac782ba31c Fix BLI_buffer_reinit not clearing static flag 2015-12-24 01:51:45 +11:00
Campbell Barton
9c7d2ff62f Fix error in BLI_buffer_reinit
alloc_size was set incorrectly causing arrays not to be resized correctly.
2015-12-24 01:38:59 +11:00
Campbell Barton
9e6a22c7e0 Fix bevel RNA enum/boolean mixup 2015-12-23 22:37:24 +11:00
Campbell Barton
36f916f200 Math Lib: clamp closest_to_line_segment_v# when segment has no length
For a line this makes sense but segments should clamp,
avoids assert in edge-rip.
2015-12-23 22:08:15 +11:00
Campbell Barton
b06f004d5b Fix issue w/ transform orientation & vert selection
Accessing selected verts as an array failed when only
some of the selected verts were in the selection-history.
2015-12-23 21:31:22 +11:00
Campbell Barton
ee9d60b033 Remove feof check for file reading
This wasnt correct since we're not reading past the stream,
though it worked on Linux and some Windows systems.
2015-12-23 17:45:46 +11:00
Campbell Barton
e74a023309 Disable calculating manipulator while transforming
Gives ~10% speedup
2015-12-23 16:35:13 +11:00
Campbell Barton
44b593ae2d Add BM_vert_edge_pair utility function 2015-12-23 16:08:23 +11:00
Campbell Barton
b51f730b0c Fix error in BM_vert_is_edge_pair
Returned true for verts with a single edge.
2015-12-23 16:08:20 +11:00
Campbell Barton
b3e94791d3 Typo in last commit 2015-12-23 15:11:54 +11:00
Campbell Barton
21b91bc764 Select Linked: only use seam delimit for faces
Delimiting on seams was only ever intended for face selection,
Previously this option didn't work for vertices,
now it's fixed the defaults aren't right for vertex/edge select-linked.

Add a workaround that bypasses operator-defaults - since this is such a rare case.
2015-12-23 15:08:58 +11:00
Brecht Van Lommel
071a69fc95 Fix T47003: OpenGL draw missing selection highlight when using hidden wire. 2015-12-22 20:56:36 +01:00
Bastien Montagne
eabf79e40a Get rid of OMP in MOD_build.
Reasons:
  - Only parallelized piece of code gives little local speedup (code block only about 25% quicker even on 1M polys cube).
  - No gain nor loss using new BLI_task system.
  - At 10% of build, parallelized piece of code is only about 5% of total func runtime (run-time explodes as build proportion increases).

See no point in adding (in utmost best optimistic case, in real use-case, when  depsgraph will likely already fire several evaluations in parallel,
speedup would be even smaller) 1% speedup here at the cost of threading complexity...

Note that since later code uses hashes, I don't think it's easy to thread it, so think we can leave with it for now.
2015-12-22 20:13:50 +01:00
Campbell Barton
b176206b94 View3D: measure smoothview angle comparing quat angles
Rolling the view registered as no angle-difference.
2015-12-23 05:23:04 +11:00
Campbell Barton
3e903794f4 View3D: Rotate around selected support for view-roll 2015-12-23 05:23:04 +11:00
Campbell Barton
642b77ef0e Fix T31605: Nupad ignores Rotate around selection
Add support for smooth-view orbiting a point besides the view center.
2015-12-23 05:04:52 +11:00
Campbell Barton
0241e28049 Fix error orbiting out of camera + orbit-selected
Would use the wrong view center (that wasn't update from the camera).
2015-12-23 04:09:15 +11:00
Campbell Barton
c86395c02d View3D: use c99 compound literals for smoothview params
Smooth-view functions took many arguments which were often NULL,
now take struct instead.
2015-12-23 02:50:50 +11:00
Campbell Barton
ba82981a2f Rename mesh operators
- use 'Intersect' prefix for boolean and regular intersection.
  hints that they use the same basic logic with different modes.
- 'split by edges' while correct - isn't very descriptive.
2015-12-22 17:12:32 +11:00
Campbell Barton
6d10bf7c44 Fix bad selection after symmetrize
Weld verts now keeps original faces so callers don't need to keep track of newly created face data.
2015-12-22 16:41:01 +11:00
Campbell Barton
a9c881f6a3 BMesh: store stackdepth as an index
Avoids -1 all over.
2015-12-22 16:41:01 +11:00
Dalai Felinto
ee2b583a05 Cycles-Bake: Fix Uninitialised value created by a heap allocation
This was causing some random black bakes. It was introduced in of of the commits replacing calloc by malloc. Things should be better now.

This error was only noticeable when baking the selected objects (not when baking from selected to active).
2015-12-21 15:31:48 -02:00
Campbell Barton
39d11352e0 UI: fix minor glitch copying small float value
Would copy 0.0 when button displayed 0.0000001.
2015-12-21 19:26:15 +11:00
Campbell Barton
5fef3c3326 BLI_storage: Split text/binary version of mem-from-file funcs
Fix T47022, caused by own commit de0119d08
2015-12-21 18:16:14 +11:00
Campbell Barton
10cf7499e7 Fix T47023: Boolean w/ empty mesh didn't transform 2015-12-21 14:41:05 +11:00
Campbell Barton
580067769c Cleanup: remove unused file 2015-12-21 13:13:52 +11:00
Campbell Barton
32be51dc66 Cleanup: warnings (msvc)
Part of patch D1670 by @LazyDodo
2015-12-21 13:02:38 +11:00
Bastien Montagne
6f22494140 NewDepsgraph: Fix typo tagging wrong flag.
Tagging NodeTree->flag instead of NodeTree->id.flag, not sure if this fixes something, but...
2015-12-20 23:06:18 +01:00
Campbell Barton
fdcec62dad Cleanup: invalid comment & style 2015-12-21 00:14:41 +11:00
Bastien Montagne
7ac5f2fef6 Fix T47016: curve tilt value in N (redo) panel to much precise with mouse dragging.
Let's just use dafaults of angle props here. :)
2015-12-19 16:58:30 +01:00