Commit Graph

1798 Commits

Author SHA1 Message Date
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
Alexander Gavrilov
e5b18390fa Shrinkwrap: implement the use of smooth normals in constraint & modifier.
- Use smooth normals to displace in Above Surface mode.
- Add an option to align an axis to the normal in the constraint.

I've seen people request the alignment feature, and it seems useful.
For the actual aligning I use the damped track logic.

In order to conveniently keep mesh data needed for normal
computation together, a new data structure is introduced.

Reviewers: mont29

Differential Revision: https://developer.blender.org/D3762
2018-10-17 17:55:34 +03:00
Alexander Gavrilov
8fa16411e6 Fix an obvious typo: use CD_MASK_CUSTOMLOOPNORMAL for CustomDataMask. 2018-10-15 12:28:44 +03:00
Campbell Barton
38828309d3 Cleanup: unused code 2018-10-15 18:12:14 +11:00
Alexander Gavrilov
cd48d4576b Depsgraph: Add proper API functions for CustomDataMask dependencies.
There were a few copies of the same few lines in depsgraph build code,
so it seems to be logical to introduce a function for it, and make it
accessible from C code for completeness.

As an example, register the mask needs of the Data Transfer modifier.
2018-10-14 20:48:39 +03:00
Campbell Barton
c61142c0b5 Modifier: use simplified bmesh -> mesh conversion 2018-10-10 13:14:15 +11:00
Campbell Barton
1b910082a0 Edit Mesh: replace DerivedMesh w/ Mesh
DerivedMesh is now removed from edit-mesh modifier evaluation.
2018-10-09 17:48:28 +11:00
Campbell Barton
79ca13a745 Cleanup: naming
Use BKE_mesh_* prefix for mesh module.
2018-10-09 16:09:59 +11:00
Campbell Barton
8ee4fd0bdf Cleanup: style 2018-10-01 09:20:31 +10:00
Sebastian Parborg
a16e5b8efa Cleanup: remove unused DerivedMesh code.
Differential Revision: https://developer.blender.org/D3736
2018-09-27 20:19:28 +02:00
Luca Rood
0666ece2e2 Cloth: Collision improvements
This commit includes several performance, stability, and reliability
improvements to cloth collisions.

Most notably:
* The implementation of a new self-collisions system.
* Multithreading of collision detection.
* Implementation of single sided collisions and normal overrides.
* Replacement of the `plNearestPoints` function from Bullet with a
dedicated solution.

Further, this also includes several bug fixes, and algorithmic
improvements.

Reviewed By: brecht

Differential Revision: http://developer.blender.org/D3712
2018-09-26 17:49:40 +02:00
Sergey Sharybin
280de3df07 Multires: Use proper subdivision level for reshape
Apparently, part of code got lost last minute prior to push.
2018-09-26 15:08:04 +02:00
Brecht Van Lommel
e4284d06ad Fix T56899: mesh deform bind does not work. 2018-09-26 14:51:08 +02:00
Sergey Sharybin
dc316f72b3 Multires: Promote OSD CCG to be officially supported
Only active when WITH_OPENSUBDIV_MODIFIER is set to ON.

There is still some work to be done to make that one enabled by
default.
2018-09-26 14:42:16 +02:00
Sergey Sharybin
6d3e42ccbd Cleanup: Silence strict compiler warning
Was happening when using OSD for modifiers.
2018-09-26 11:54:19 +02:00
Campbell Barton
e40870c479 Cleanup: warnings, style 2018-09-26 10:01:32 +10: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
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
Alexander Gavrilov
17c4e5eb8a Depsgraph: Shrinkwrap modifier needs its own object transform.
It depends on the relative position of its own object and target.
2018-09-22 12:00:12 +03: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
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
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
Bastien Montagne
d053508916 Merge branch 'master' into blender2.8 2018-09-19 11:12:45 +02:00
Bastien Montagne
340527cd37 Fix unused var in case Alembic is not enabled, in own previous commit.
Sorry for the noise...
2018-09-19 11:11:39 +02:00
Bastien Montagne
71d18f59a3 Mesh Sequence Cash: do not *always* report as depending on time! 2018-09-19 11:09:12 +02: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
Sergey Sharybin
8e8952b7e3 Multires: Initial work to get sculpting to work with OpenSubdiv
Allows to go to sculpt mode, do brush strokes, get out of sculpt mode
and have deformation preserved.

The issues currently is that the current implementation of CCG
storage is created from the limit surface, without displacement
taken into account. It is trivial to get displaced coordinates,
but it is more tricky to get displaced normals. This is something
to be solved next.

Another limitation is that this only works for sculpting at a maximal
multires level. There is code to be done to support propagation
of displacement onto a higher levels.
2018-09-14 14:43:56 +02:00
Sergey Sharybin
f827e3c84b Subdiv: Cache Subdiv in CCG surface
Allows to do re-shaping easier, since we will know for sure
what was the limit surface the CCG is created for.
2018-09-14 14:43:56 +02:00
Sergey Sharybin
57b50f75f9 Cleanup: Spelling mistakes
Pointed by John Roper and Ray Molenkamp.
2018-09-12 16:32:18 +02:00
Sergey Sharybin
3fbdcefa17 Subdiv: Initial implementation of CCG
Attempts to substitude CCGDM with an OpenSubdiv based structure
which has less abstraction levels. The missing part in this
substitude is a face pointers which old CCGDM/multires code was
using to stitch faces (averaging boundaries).

Another curial bit missing: "reshaping" of multires CD_MDISPS
to the state of new PBVH grids.

The new code is only available when OpenSubdiv modifier is
enabled (WITH_OPENSUBDIV_MODIFIER=ON) and with debug value of
128. This is so this WIP code is not interfering with current
production machines in the studio.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D3685
2018-09-11 16:37:02 +02:00
Campbell Barton
bb9b0fcdbe Cleanup: remove unused field args 2018-09-10 14:05:33 +10:00
Brecht Van Lommel
32ef77bf0a UI: change default modifier name from Subsurf to Subdivision. 2018-09-06 11:49:26 +02:00
Campbell Barton
1e35f4da72 Merge branch 'master' into blender2.8 2018-09-05 14:34:31 +10:00
Ray Molenkamp
c13b2a2504 Fix T54152: --env-system-scripts fails on win32 2018-09-05 14:32:19 +10:00
Sergey Sharybin
c9707a408f Subdiv: Move mesh creation functionality to own header 2018-09-04 15:34:52 +02:00
Bastien Montagne
a43ebc63fa Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/intern/collision.c
2018-09-03 17:44:36 +02:00
Brecht Van Lommel
4da2acae3a Spelling fixes in comments and descriptions, patch by luzpaz.
Differential Revision: https://developer.blender.org/D3668
2018-09-03 16:55:01 +02:00
Campbell Barton
ae57383648 Cleanup: comment blocks 2018-09-02 18:28:27 +10:00
Antonioya
9a646b6a20 GP: New Armature modifier and tools to handle weights
This commit adds a new armature modifier for grease pencil. The deformations are done reusing the mesh deform routines.

There is also a new operator in weight paint mode to help the artist to generate weights base on armatures. This operator is required because 2D animation workflow is not equal to meshes when parent an object to armatures.

In the drawing engine has been added the option to handle the Fade object parameter used in armatures to see the strokes while move the bones.

When rename bones, all related data of grease pencil is renamed too. This not only affect new armature code, but also layers parented and hook modifiers.

Thanks @aligorith for his review and help.
2018-08-30 12:23:08 +02:00
Campbell Barton
0efecba957 Merge branch 'master' into blender2.8 2018-08-30 01:38:16 +10:00
Brecht Van Lommel
42f7767dab Cleanup: rename files from group to collection to match contents. 2018-08-29 16:25:50 +02:00
Campbell Barton
3ee0ce27fa Cleanup: style 2018-08-26 20:34:33 +10:00
Sergey Sharybin
d162be6246 Multires: Fix wrong apply deform results when multires has sculpt already 2018-08-24 17:00:32 +02:00
Bastien Montagne
4cde92303f Fix T56455: [2.8] Crash when projecting skinwrap curve/path.
Shrinkwrap is not only a Mesh modifier...
2018-08-23 21:49:14 +02:00
Sergey Sharybin
6a681981e4 Multires: Fix reshape when active level is lower than the total one 2018-08-22 16:07:57 +02:00
Howard Trickey
9f6cde53cf Fix bevel crash T56287, when face strength goes to 1. 2018-08-22 07:08:42 -04:00
Sergey Sharybin
9e11b8e249 Multires: implement reshape operation
The one which is used by applying deformation modifiers on the multires.
2018-08-22 10:21:45 +02:00