Commit Graph

15396 Commits

Author SHA1 Message Date
Campbell Barton
e40870c479 Cleanup: warnings, style 2018-09-26 10:01:32 +10:00
Clément Foucault
a3bb385ca0 Edit Mesh: Move Edit Mesh display settings to overlay's
This makes the Edit Mesh display settings common to all objects. They can
also be set differently per viewport.

Modifying extra data (seams, sharp edges etc...) will no longer set them
automaticaly visible.

Bumping version because we need to force set all extra draw options for
older files.
2018-09-25 22:51:54 +02:00
Sebastian Parborg
d191676400 Modifiers: use Mesh instead of DerivedMesh for explode.
Differential Revision: https://developer.blender.org/D3718
2018-09-25 14:01:23 +02:00
Dalai Felinto
19bdb84466 Fix build on windows after ccg changes 2018-09-25 11:26:31 +00:00
Sergey Sharybin
6ed581c107 Multires: Allow changing sculpt level without loosing data
As the comment states, this is not really great solution, but
is good enough for now. Proper solution needs some more work,
and maybe reconsideration of what is stored where.
2018-09-25 12:37:00 +02:00
Sergey Sharybin
13915c05dd CustomData: Allow copying content of a single layer 2018-09-25 12:27:43 +02:00
Sergey Sharybin
e60bbcafc5 Cleanup: indentation 2018-09-25 11:38:41 +02:00
Sergey Sharybin
53b25e88f4 Multires: Make code more ready for mesh uised by multiple objects
Probably more work is needed, but is good starting point.
2018-09-25 10:44:29 +02:00
Sergey Sharybin
15792eb728 Cleanup: Variable name in mesh runtime
Matches type better, avoiding possible confusion.
2018-09-25 10:32:34 +02:00
Sergey Sharybin
43c4d0bf23 Multires: Pass total level instead of modifier data
This is the only thing which needs to be done to perform propoer
reshape. Makes it easier to re-use code from other places.
2018-09-25 09:58:40 +02:00
Sergey Sharybin
a933293f11 Multires: Pass mesh instead of object
There is nothing we need from object in this case.
2018-09-25 09:38:23 +02:00
Campbell Barton
d915e6dc8d Merge branch 'master' into blender2.8 2018-09-25 11:50:47 +10:00
Campbell Barton
10fbea8845 Cleanup: style 2018-09-25 11:41:29 +10:00
Brecht Van Lommel
342e73f90f Spelling fixes in comments and descriptions (2.8 changes), patch by luzpaz.
Differential Revision: https://developer.blender.org/D3719
2018-09-24 18:48:29 +02:00
Brecht Van Lommel
253dce07d7 Merge branch 'master' into blender2.8 2018-09-24 17:42:52 +02:00
Brecht Van Lommel
0cff044d84 Spelling fixes in comments and descriptions, patch by luzpaz.
Differential Revision: https://developer.blender.org/D3719
2018-09-24 17:28:40 +02:00
Sebastian Parborg
fe52a05e95 Modifiers: use Mesh instead of DerivedMesh for dynamic paint.
Differential Revision: https://developer.blender.org/D3720
2018-09-24 17:14:01 +02:00
Sergey Sharybin
ea61700a2d Tracking: Use pixel aspect from clip
Don't force square pixel, since on a more real pipeline
expected delivery is same anamorphic as an input footage.
2018-09-24 16:26:27 +02:00
Brecht Van Lommel
8dfdd248b5 Fix T56895: crash loading template with Load UI unchecked. 2018-09-24 15:48:50 +02:00
Alexander Gavrilov
969cbed49b Add support for a one-dimensional Force Field source shape.
The fields currently support a Point source and a two-dimensional
Plane source, but there is no way to create a field that pulls
toward or from a line in space other than using the Texture field
type. This adds a new simple shape option to do that.

The line is aligned along the Z axis so that it works meaningfully
with the Tube and Cone falloff modes.

Reviewers: brecht, mont29, LucaRood

Differential Revision: https://developer.blender.org/D3721
2018-09-24 13:57:59 +03:00
Campbell Barton
0e65c4839c Cleanup: style 2018-09-24 08:25:51 +10:00
Sergey Sharybin
8143f27209 Cleanup: Indentation 2018-09-21 17:40:32 +02:00
Sergey Sharybin
fbb403e094 Multires: Remove unused field from reshape context 2018-09-21 17:40:32 +02:00
Sergey Sharybin
6934b246d1 Cleanup: Inetnation 2018-09-21 15:35:34 +02:00
Sergey Sharybin
5ee0200d43 Multires: Support masks propagation to higher levels 2018-09-21 15:31:44 +02:00
Sergey Sharybin
cec4c77719 Multires: Copy mask from sculpt to multires
Allows to paint mask in sculpt mode, then go out of sculpt
mode, come back and see proper mask.
2018-09-21 15:31:43 +02:00
Sergey Sharybin
b32832a7e8 Subdiv: CCG, initialize grid mask from paint mask 2018-09-21 15:31:43 +02:00
Sergey Sharybin
da800621ed Subdiv: CCG, cleanup 2018-09-21 15:31:43 +02:00
Brecht Van Lommel
4494be513a Fix smoke to render in Cycles again.
Viewport caching seems still broken, though baking works.
2018-09-21 14:15:27 +02:00
Brecht Van Lommel
cfb7565cd5 Cleanup: convert smoke modifier from DerivedMesh to Mesh. 2018-09-21 13:56:22 +02:00
Sergey Sharybin
9ecce9b4c4 Subdiv: Fix crash subdividing mesh withotu faces 2018-09-21 12:18:50 +02:00
Sergey Sharybin
12372e8d8b Multires: Support sculpting on a lover levels
Added propagation of displacement to a higher levels.

Has the same limitation as reshape from object, which makes
grids somewhat choppy due to linear interpolation nature.

This is to be addressed next.
2018-09-21 11:43:42 +02:00
Sergey Sharybin
619c55027f Multires: Fix reshaping from object at lower level
This brings basic implementation of displacement propagation
to a higher levels. Currently does linear interpolation between
grid points at which reshape happened. It makes results a bit
choppy, proper solution would be to use some interpolation
weights from the limit patch.
2018-09-21 11:24:33 +02:00
Sebastian Parborg
d0eed5e50a Texture Paint: unify missing data and slots panels, better auto position nodes.
Differential Revision: https://developer.blender.org/D3694
2018-09-20 19:54:33 +02:00
Dalai Felinto
cffae36381 Fix build for MSVC: Remove trailing double semicolon
Not sure why but MSVC is complaining for some of those.

In particular for the struct in BKE_subdiv_ccg.h. Those were the ones
crashing here..
2018-09-20 14:59:55 +00:00
Sergey Sharybin
9a91e67825 Multires: Cleanup, more proper variable name 2018-09-20 16:35:50 +02:00
Sergey Sharybin
00037059e9 Subdiv: CCG, implement averaging along edges and corners
Makes it so smooth brush works properly, without causing grids
to become disconnected from each other.

This need to optimize the code for brush, to only average edges
and vertices which are adjacent to modified faces.
2018-09-20 15:39:41 +02:00
Sergey Sharybin
d3aafbddd9 Subdiv: CCG, store vertex adjacency information
Similar to previous commit, but for vertices.
2018-09-20 15:39:41 +02:00
Sergey Sharybin
d511c72056 Subdiv: CCG, store edge adjacency information
This information is stored for each non-loose edge.

For each of such edge we store:

- List of CCG faces it is adjacent to.

  This way we can easily check whether it is adjacent to
  any face which is tagged for update or so.

- List of boundary elements from adjacent grids.

  This allows to traverse along the edge and average all
  adjacent grids.
2018-09-20 15:39:41 +02:00
Sergey Sharybin
069fa8279d Subdiv: CCG, fix memory leak
Forgot to free memory used by grid to face mapping array.
2018-09-20 15:39:41 +02:00
Sergey Sharybin
13820ec5c1 Subdiv: CCG, fix crash going from sculpt to edit mode
Was happening for "new" objects, which did not have MDisps
allocated yet.
2018-09-20 15:39:41 +02:00
Sergey Sharybin
0a596eda2a Subdiv: CCG, localize Mesh usage even more 2018-09-20 15:39:41 +02:00
Sergey Sharybin
6a7e914476 Subdiv: CCG, go away from Mesh
Use topology refiner where possible, which will make code more
portable and less dependent on all the possibly outdated pointers.
2018-09-20 15:39:41 +02:00
Antonioya
de994d6b7b GP: Fix problem with mode opening 2D Animation template
The grease pencil does not need a toggle of mode.

This fix also the problem when open grease pencil files that did not keep the mode saved.
2018-09-20 13:47:59 +02:00
Antonioya
5bfcd6f303 GP: Fix falloff curve using 2D animation template 2018-09-20 13:10:56 +02:00
Jacques Lucke
b5dbe43d3e Cleanup: move DerivedMesh wrappers for modifiers further down the hierarchy
The main goal of this patch is to cleanup the interface of every modifier. More specifically the interface of modifiers should be DerivedMesh-free.
Internally some modifiers still use DerivedMesh. However I think it is better when the wrappers are in the modifiers so that higher level functions can use the simplified interface.

This patch removes the applyModifier_DM and applyModifierEM_DM functions. In a previous patch (rB3614d9d) the other functions that used DerivedMesh have been removed.

Reviewers: brecht
2018-09-20 12:04:17 +02:00
Alexander Gavrilov
1278890611 Put the Radius property of Curve points under shape key control.
Since shape keys are stored as raw floating point data, this
unfortunately requires changes to all code that works with it.

An additional complication is that bezier and nurbs control
points have different entry size, and can be mixed in the same
object (and hence shape key buffer).

Shape key entries are changed from:

  bezier: float v1[3], v2[3], v3[3], tilt, pad, pad;
  nurbs:  float vec[3], tilt;

To:

  bezier: float v1[3], v2[3], v3[3], tilt, radius, pad;
  nurbs:  float vec[3], tilt, radius, pad;

The official shape key element size is changed to 3 floats,
with 4 elements for  bezier nodes, and 2 for nurbs. This also
means that the element count is not equal to the vertex count
anymore.

While searching for all curve Shape Key code, I also found that
BKE_curve_transform_ex and BKE_curve_translate were broken. This
can be seen by trying to change the Origin of a Curve with keys.

Reviewers: campbellbarton, sergey

Differential Revision: https://developer.blender.org/D3676
2018-09-20 11:52:42 +03:00
Campbell Barton
0acc1b4c6c Cleanup: style 2018-09-20 10:06:59 +10:00
Antonioya
e620380cc2 GP: Rename eraser brushes 2018-09-19 23:24:52 +02:00
Brecht Van Lommel
6b433f4eb3 Merge branch 'master' into blender2.8 2018-09-19 18:20:50 +02:00