Commit Graph

75472 Commits

Author SHA1 Message Date
Bastien Montagne
f7727b5366 Modifier stack: Port Warp to new Mesh-based system. 2018-05-08 18:41:43 +02:00
Bastien Montagne
8f7e4b314b Modifier stack: port Mask to new Mesh-based system. 2018-05-08 18:19:28 +02:00
Campbell Barton
e0a436fcff Cleanup: includes 2018-05-08 18:01:47 +02:00
Campbell Barton
0012082c10 Cleanup: move mesh conversion into own function 2018-05-08 17:54:25 +02:00
Bastien Montagne
5f2a2e048d Modifier stack: Port Caqst to new Mesh-based system. 2018-05-08 17:52:53 +02:00
Brecht Van Lommel
e6d11c6ce6 Collections: remove per collection and view layer engine overrides.
This will be handled by the new view layer override system which will
store data elsewhere, removing the code already for easier refactoring.
2018-05-08 17:46:20 +02:00
Campbell Barton
03dd109a84 Cleanup: consistent BKE_mesh naming 2018-05-08 17:28:43 +02:00
Campbell Barton
00127d03f1 Cleanup: use bool for BKE_mesh_new_from_object 2018-05-08 17:17:40 +02:00
Campbell Barton
7522af49a3 Cleanup: rename variables
DerivedMesh had some odd conventions, remove from BKE_mesh.
2018-05-08 17:15:23 +02:00
Campbell Barton
0e964afaa4 Cleanup: use 'nomain' when not in library data
Rename only.
2018-05-08 17:06:30 +02:00
Campbell Barton
fa69ce9e3a Cleanup: whitespace, duplicate includes 2018-05-08 16:57:07 +02:00
Bastien Montagne
5b3559576d Modifier stack: Port Smooth to new Mesh-based system. 2018-05-08 16:42:01 +02:00
Bastien Montagne
43be434310 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/modifiers/intern/MOD_dynamicpaint.c
	source/blender/modifiers/intern/MOD_uvproject.c
2018-05-08 16:06:32 +02:00
Bastien Montagne
4e4a93bc45 Fix building with latest versions of ffmpeg.
Some years-old deprecated stuff has now been removed.

Correct solution is probably to use valid defines etc. in own code, but
this is more FFMEPG maintainer task (since it also may change how old
FFMPEG we do support...).
2018-05-08 16:00:52 +02:00
Campbell Barton
a48186c5d7 Orientation for 3D cursor
Currently set when setting the cursor location,
optionally used as an orientation type.

Intended for use by tools too.

See: D3208
2018-05-08 15:35:04 +02:00
Bastien Montagne
43e0e8defa Fix (unreported) bloody modifiers messing with ID user count in copy.
User count of IDs is handled by higher-level, generic function,
low-level copydata functions *MUST NOT* touch them anymore, ever!
2018-05-08 15:27:10 +02:00
Bastien Montagne
53a56b7b6c Merge branch 'master' into blender2.8 2018-05-08 15:20:18 +02:00
Bastien Montagne
3740f7593d Cleanup: Nuke empty dummy wrappers around modifier_copyData_generic().
This also changes signature of modifier copy callback, first (source)
parameter is now a const, which is saner anyway!
2018-05-08 15:04:10 +02:00
Clément Foucault
d89f9d70c5 Eevee: Fix bug with transparent object + volume rendering.
This was because the main_fb was not bound back to be updated.
Following draw calls were drawn without depth buffer.
2018-05-08 14:31:17 +02:00
Bastien Montagne
b857b8f4c4 Merge branch 'master' into blender2.8 2018-05-08 14:22:46 +02:00
Bastien Montagne
49fe27ee46 Modifiers: sanitize/cleanup modifiers' copying & freeing code.
Should also fix T55000: Crash with hooks and curves in Cycles render.
2018-05-08 14:22:14 +02:00
Jeroen Bakker
cc8672b95e Fix T54999: error when entering edit mode in texture shading
When entering edit mode the texture coordinates is not calculated by
drawcachemesh. For now fallback to solid mode. This gives wrong
artifacts when disabling overlays when in edit mode. We should make it
possible to calculate the UVLOOP from bmesh. This will be done in a next
patch
2018-05-08 14:02:45 +02:00
Campbell Barton
e04ea9d3c3 Merge branch 'master' into blender2.8 2018-05-08 13:33:48 +02:00
Campbell Barton
5358026511 Cleanup: quiet -Warray-bounds warning 2018-05-08 13:32:52 +02:00
Bastien Montagne
c51b017a1a WeightVG modifiers: Cleanup, add asserts to validate expected data status... 2018-05-08 12:58:48 +02:00
Bastien Montagne
7d9f1a699a Clenup: typos. 2018-05-08 12:58:48 +02:00
Sybren A. Stüvel
002dcd2001 Modifiers: pass the ob->data to the modifier if the mesh param is NULL
This enables the modifiers to access things like vertex groups. Care should
be taken to not modifier the mesh itself in this case.
2018-05-08 12:34:06 +02:00
Clément Foucault
9a79178c2e Armature: Add back Stick bone draw type.
The actual code is a bit convoluted but allows good and "pseudo efficient"
drawing. (pseudo efficient because rendering instances with that amount of
vertices is really inneficient. We should go full procedural but need to
have bufferTexture implemented first) But drawing speed is not a bottleneck
here and it's already a million time less crappy than the old (2.79) immediate
mode method.

Instead of drawing actual wires with different width we render a triangle
fan batch (containing 3 fans: bone, head, tail) which is then oriented in
screen space to the bone direction. We then interpolate a float value
accross vertices giving us a nice blend factor to blend the colors and
gives us really smooth interpolation inside the bone.

The outside edge still being geometry will be antialiased by MSAA if enabled.
2018-05-08 12:18:35 +02:00
Bastien Montagne
d8706f5407 Modifier stack: port Displace to new Mesh-based system. 2018-05-08 12:01:06 +02:00
Bastien Montagne
cd5b57b4fc Fix recent Curve porting: mesh pointer may also be NULL in non-EditMode case. 2018-05-08 12:01:06 +02:00
Bastien Montagne
0cd3412d4c Mod_util: Add back vcos parameter to get_texture_coords_mesh().
Now we use vcos when provided, and fall back to mesh vertices' co
otherwise.

Deform modifiers usually do not have up-to-date coordinates in Mesh
itself, only in given vcos array!
2018-05-08 12:01:06 +02:00
Bastien Montagne
029d3fa8b6 Mesh normals: clear runtime dirty normal flag also when computing clnors. 2018-05-08 12:01:06 +02:00
Sergey Sharybin
1d95dfc97b Merge branch 'master' into blender2.8 2018-05-08 11:59:22 +02:00
Sergey Sharybin
59ce30f32b Tracking: Use bmain from context 2018-05-08 11:58:42 +02:00
Sergey Sharybin
9401021f8b Clay: Simplify matcap manipulation
No need to hard-coded handling of every individual matcap.

They are in the continuous index range anyway.
2018-05-08 11:56:58 +02:00
Sergey Sharybin
1fd1d061ac Clay: Don't use hardcoded constant in the string
Stringify the actual constant instead.
2018-05-08 11:56:58 +02:00
Dalai Felinto
847f028b71 Multi-Object-Editing: select random by Jefferson Rausseo with changes
Aside from identation, seed should change for each object. Otherwise to objects
with a copied mesh would get the exactly same "random" selection.

And we do so in a consistent way so it doesn't vary depending on
object order.

Seed bump using hash suggested by Campbell Barton and Sergey Sharybin.

Maniphest Tasks: T54643
Differential Revision: https://developer.blender.org/D3231
2018-05-08 11:51:21 +02:00
Sybren A. Stüvel
1c0be0e90f Ported Mesh Deform modifier
This modifier still has issues that are not related to this port:

- While editing the deformation mesh, the deformed mesh doesn't update.
  This update only happens after exiting edit mode, making editing
  cumbersome.
- Binding doesn't work yet. It works fine when binding in master and
  loading pre-bound in 2.8. This was also an issue before this port, and
  will be investigated separately.
2018-05-08 11:46:28 +02:00
Sybren A. Stüvel
abb58eec53 looptri + bvhtree support for Mesh 2018-05-08 11:36:48 +02:00
Dalai Felinto
d915aa57f8 Multi-Object-Editing: vertices smooth by Jefferson Rausseo
Changes by me:
* Identation (tabs not space)
* Moving RNA_.*_get outside for loop)

Maniphest Tasks: T54643
Differential Revision: https://developer.blender.org/D3230
2018-05-08 11:33:27 +02:00
Dalai Felinto
9a125ca5fe Multi-Object-Editing : Extrude Repeat by Falk David
Maniphest Tasks: T54643
Differential Revision: https://developer.blender.org/D3224
2018-05-08 11:24:41 +02:00
Sybren A. Stüvel
271624b0f6 Prevent segfault when opening file browser while a 2.79 file was loaded.
Loading a file that was written with the master branch into the 2.8 branch,
and then trying to load or save, caused a segfault.
2018-05-08 11:18:45 +02:00
Dalai Felinto
faaffc4011 Edit Mesh: multi-object rotate_uvs support by Pablo Dobarro
Changes by me: Moving RNA_.*get outside for loop and indentation fix.

Maniphest Tasks: T54643
Differential Revision: https://developer.blender.org/D3221
2018-05-08 11:15:00 +02:00
Dalai Felinto
63951bc987 Edit Mesh: multi-object reverse_uvs support by Pablo Dobarro
Maniphest Tasks: T54643
Differential Revision: https://developer.blender.org/D3220
2018-05-08 11:09:35 +02:00
Bastien Montagne
fdc967e616 Modifiers stack: port Curve to new Mesh-based system. 2018-05-08 11:05:49 +02:00
Bastien Montagne
50e31136fd Rename BKE_bmesh_to_mesh to BKE_bmesh_to_mesh_nomain.
Let's be clear about functions generating datablocks outside of Main
database.
2018-05-08 11:04:20 +02:00
Sybren A. Stüvel
cf7c3462ed BKE_mesh_new → BKE_mesh_new_nomain
Including 'nomain' in the name explicitifies that the returned mesh is
NOT stored in any library.
2018-05-08 11:00:34 +02:00
Campbell Barton
86b9311926 Cleanup: quiet warning, whitespace 2018-05-08 10:58:04 +02:00
Campbell Barton
77cc265f18 Fix crash cancelling search, caused by D3207 2018-05-08 10:48:53 +02:00
Sybren A. Stüvel
66b1cd45fb Added BKE_mesh_ensure_normals()
This calls BKE_mesh_calc_normals() only if the mesh vertex normals are
marked as dirty.
2018-05-08 10:47:00 +02:00