Commit Graph

67548 Commits

Author SHA1 Message Date
Clément Foucault
14b5668c60 DRW: Fix corner indices order in clipping plane setup
Fix T60667: Eevee: reflection plane bug in rendered view.
2019-01-21 15:21:17 +01:00
Campbell Barton
9bc47ed0f6 Fix clipping shaders with some AMD/Intel drivers
Caused:
    error: unsized array index must be constant

Use hard coded number of clipping planes, copying the 4th to 5 & 6
when only 4 are used.
2019-01-21 23:55:53 +11:00
Jacques Lucke
0c829e8240 Fix T60709: Apply Object Transform does nothing by default 2019-01-21 13:43:16 +01:00
Clément Foucault
ba4de7f1a5 GPUShader: Add GPU_VERTEX/FRAGMENT/GEOMETRY_SHADER defines
This makes it possible to have some code specific to each shader inside a
shader library.
2019-01-21 12:54:41 +01:00
Antonioya
f8d040cb70 T60701: GP using cutter tool on stroke with vertex group crashes blender 2019-01-21 11:03:09 +01:00
Bastien Montagne
42ba294235 Fix T55461: [Vertex Group] "Delete all unlocked groups" not working. 2019-01-21 10:36:38 +01:00
Campbell Barton
78d2abd9c1 DRW: Support wire overlay clipping 2019-01-21 19:08:42 +11:00
Campbell Barton
7bc9a563e6 Correct freeing builtin shader from recent commit 2019-01-21 19:07:57 +11:00
Campbell Barton
a06b2b25ad DRW: pass clipping to geom shader via 'gl_in'
Removes need to pass the worldspace location.
2019-01-21 17:50:31 +11:00
Campbell Barton
1ab071bd5c Cleanup: remove '_sh' suffix
Shaders are now stored in their own struct, no need for special names.

Also free as an array.
2019-01-21 17:03:52 +11:00
Campbell Barton
07673a3460 DRW: Support edit-mesh clipping 2019-01-21 16:15:30 +11:00
Campbell Barton
dd3f518626 Cleanup: rename GPU function to set buffer length 2019-01-21 11:28:41 +11:00
Campbell Barton
ff10ba8c26 Cleanup: rename terms count/num to len 2019-01-21 11:24:19 +11:00
Campbell Barton
dbe960fdee Cleanup: replace 'ct' w/ 'len' 2019-01-21 11:22:27 +11:00
Campbell Barton
923b366549 DRW: set 4 clipping planes for box-clip 2019-01-21 11:12:26 +11:00
Campbell Barton
c53ebfa9e9 3D View: add back clipping border operator 2019-01-21 11:05:15 +11:00
Campbell Barton
7467049055 3D View: add back initial clipping support
Use clipping for workbench solid mode drawing.

Other modes & shading support still needs to be added.
2019-01-21 10:43:01 +11:00
Campbell Barton
0d8d26696f Cleanup: trailing space 2019-01-21 10:41:39 +11:00
Campbell Barton
49208a3419 Cleanup: shadow warning, style 2019-01-21 10:05:58 +11:00
Antonioya
eff4b68a6f Fix T60678: GP, smoothing a stroke's weights multiple times will lead to unweightable points 2019-01-20 20:38:00 +01:00
Antonioya
6e443b3210 Fix T60677: GP vertex groups get messed up, when deleting a group 2019-01-20 20:31:11 +01:00
Antonioya
6e57534eaa Fix T60671: GP weight paint crash when smoothing weights 2019-01-20 19:37:13 +01:00
Antonioya
69240a66e0 GP: Fix mirror modifier with parent object
Still problems when local rotation.

Some cleanup done.
2019-01-20 19:20:09 +01:00
Bastien Montagne
482c4d099a Cleanup: remove all BLI_utiledefines' ugly vectorial macros.
Not only were those often making doublons with already existing
BLI_math's stuff, but they were also used to hide implicit type
conversions...

As usual this adds some more exotic inlined vector functions (one of
the rare cases where I really miss C++ and its templates... ;) ).
2019-01-20 16:27:06 +01:00
Howard Trickey
b0dee09a6d Fix bevel modifier spread value bug.
Was using same field as value, by mistake.
2019-01-19 15:58:01 -05: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
Brecht Van Lommel
c9938ebb00 Fix T60615: Cycles baking not working with some modifiers.
Refactors Cycles mesh export a bit to avoid unnecessary copies and to be in
sync with the Blender baker.
2019-01-18 18:39:43 +01:00
Charlie Jolly
985dcbf6db GP: Guides: Fix bug with Mkey and Circular guides
Reported by @pepeland.

Adding missing events on the first point was breaking the guide behaviour.
Also, updated Ckey so it always defaults to Circular mode when guides are off.
2019-01-18 15:50:16 +00:00
Clément Foucault
b5bc2158a0 View 3D Grid: Improve precision and reduce code complexity
Instead of doing manual ray-plane intersection we use normalized positions
of the grid mesh and apply scaling after interpolation so that we keep
good precision even at really far distances.

Precision is now two order of magnitude better and does not produce the
same kind of artifact at lower clip start values.

This commit also cleanup the implementation.

Fixes T58918 Grid not appearing correctly at low clip start in 2.8
2019-01-18 16:30:05 +01:00
Brecht Van Lommel
bb4c760fdd Preferences: assortment of minor layout tweaks. 2019-01-18 16:11:54 +01:00
Campbell Barton
547cb5e264 Fix/workaround: Undo erase all dyntopo changes
Memfile undo isn't compatible with sculpt or edit-mode.

This didn't work in 2.7x, so best disable memfile undo for now in
situations where it's going to loose data or crash.
2019-01-19 00:53:39 +11:00
Campbell Barton
985712e5ee Fix loading a file saved w/ dyntopo
Ensure ED_editors_init doesn't create any undo steps
before the initial memfile undo is written.
2019-01-19 00:25:55 +11:00
Campbell Barton
c8067a5559 Fix undo push entering sculpt mode 2019-01-18 23:15:00 +11:00
Sergey Sharybin
d3ec4259af Subdiv CCG: Cleanup, comments 2019-01-18 12:29:53 +01:00
Sergey Sharybin
fb053ae2e5 Multires: Correct averaging
Before that only normal component was averaged, which is not
really correct.

Unfortunately, the new code is somewhat slower due to more
involved math to deal properly with non-quad faces, but the
plan is to move averaging from runtime to edit time, This
means, that mdisps will always be continuous around the edges
and no averaging on every frame change of animated character
will be needed.
2019-01-18 12:29:53 +01:00
Sergey Sharybin
cb5302f962 Math: Make it possible to use vector for both input and output
Avoids nasty code all over where such math is required, and
compilers can easily deal with such situation.

Don't prefer questionable micro-optimization which comes with
a cost of nasty actual logic code.
2019-01-18 12:29:53 +01:00
Sergey Sharybin
91697b0fa0 Multires: Ensure continuity when reshaping from object 2019-01-18 12:29:53 +01:00
Sergey Sharybin
45cf6f1cfc Subdiv: Fix wrong corner passed to a callback 2019-01-18 12:29:53 +01:00
Sergey Sharybin
02f86482b4 Multires: Simplify reshaping code
The idea is to run reshaping for every boundary vertex
of a grid rather than trying to copy boundary grid
elements.

While this is somewhat slower, this avoids all this
tangent flipping magic, which tempts to be rather tricky
and fragile.
2019-01-18 12:29:53 +01:00
Sergey Sharybin
076019c5f2 Multires: Correct function name, to match behavior 2019-01-18 12:29:53 +01:00
Sergey Sharybin
3fb6946b76 Multires: Fix spike issues when sculpting on triangles
The boundary copy code was not dealing correct with flipping
tangent vectors, hence causing discontinuity in the final
positions.

Now we only copy boundaries for quads, where we know how to
deal with tangent vectors and where we know that this is
needed.

More clear solution could be to change the code in a way that
handles handles displacement grids of quads in the same way
as it's done for non-quad faces.
2019-01-18 12:29:53 +01:00
Sergey Sharybin
9db73be975 Multires: Cleanup, move utility function to a more public place 2019-01-18 12:29:53 +01:00
Sergey Sharybin
a676b2b4b4 Multires: Cleanup, more clear naming 2019-01-18 12:29:53 +01:00
Antonioya
fc6aac3916 GP: Create materials when separate active layer
The materials were not created when used the active layer option of the separate operator.
2019-01-18 10:53:14 +01:00
Clément Foucault
d5b4d71ee7 DRW: Increase frustum culling precision
Use normal_quad_v3 instead of normal_tri_v3 and compute the mean of all
corner distance during frustum plane extraction.

Fix T58243 Flickering of viewport when rotating and zooming
2019-01-18 10:23:05 +01:00
Clément Foucault
a7b8538f4c DRW: Fix assert when using draw debug API 2019-01-18 09:58:04 +01:00
Campbell Barton
72b9ab5a22 Fix T60608: Popup dialogs Y-axis reset after drag
Caused by fc32bd729c
2019-01-18 16:56:56 +11:00
Campbell Barton
61036ca179 3D View: Disable clipping on load
Having clipping limit selection and tools is confusing when not visible.

Disable on load until it's supported
(doing this via ifdef's isn't practical).

Fixes T59580
2019-01-18 13:32:48 +11:00
Campbell Barton
b9412923a3 Cleanup: use enum for color picker types 2019-01-18 12:34:11 +11:00