blender.git
3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Fri, 18 May 2018 13:31:53 +0000 (15:31 +0200)]
Merge branch 'master' into blender2.8

3 years agoEevee: Codestyle fix.
Clément Foucault [Fri, 18 May 2018 13:33:04 +0000 (15:33 +0200)]
Eevee: Codestyle fix.

3 years agoEevee: SSS: Fix compilation errors.
Clément Foucault [Fri, 18 May 2018 13:31:07 +0000 (15:31 +0200)]
Eevee: SSS: Fix compilation errors.

Fix T55114

3 years agoCMake: Add WITH_COMPILER_ASAN option
Campbell Barton [Fri, 18 May 2018 13:21:18 +0000 (15:21 +0200)]
CMake: Add WITH_COMPILER_ASAN option

This supports easy toggling of Address Sanitizer.

3 years agoCleanup: remove deprecated definitions
Campbell Barton [Fri, 18 May 2018 12:26:02 +0000 (14:26 +0200)]
Cleanup: remove deprecated definitions

3 years agoMerge branch 'master' into blender2.8
Philipp Oeser [Fri, 18 May 2018 12:59:38 +0000 (14:59 +0200)]
Merge branch 'master' into blender2.8

3 years agoFix T55115: crash when iterating SmokeDomainSettings color_grid property
Philipp Oeser [Fri, 18 May 2018 10:58:46 +0000 (12:58 +0200)]
Fix T55115: crash when iterating SmokeDomainSettings color_grid property
through python

3 years agoFix crash drawing polygon curves
Campbell Barton [Fri, 18 May 2018 12:23:53 +0000 (14:23 +0200)]
Fix crash drawing polygon curves

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Fri, 18 May 2018 11:45:48 +0000 (13:45 +0200)]
Merge branch 'master' into blender2.8

3 years agoAdd missing header
Campbell Barton [Fri, 18 May 2018 11:43:30 +0000 (13:43 +0200)]
Add missing header

3 years agoCollections and groups unification
Brecht Van Lommel [Mon, 30 Apr 2018 13:57:22 +0000 (15:57 +0200)]
Collections and groups unification

OVERVIEW

* In 2.7 terminology, all layers and groups are now collection datablocks.
* These collections are nestable, linkable, instanceable, overrideable, ..
  which opens up new ways to set up scenes and link + override data.
* Viewport/render visibility and selectability are now a part of the collection
  and shared across all view layers and linkable.
* View layers define which subset of the scene collection hierarchy is excluded
  for each. For many workflows one view layer can be used, these are more of an
  advanced feature now.

OUTLINER

* The outliner now has a "View Layer" display mode instead of "Collections",
  which can display the collections and/or objects in the view layer.
* In this display mode, collections can be excluded with the right click menu.
  These will then be greyed out and their objects will be excluded.
* To view collections not linked to any scene, the "Blender File" display mode
  can be used, with the new filtering option to just see Colleciton datablocks.
* The outliner right click menus for collections and objects were reorganized.
* Drag and drop still needs to be improved. Like before, dragging the icon or
  text gives different results, we'll unify this later.

LINKING AND OVERRIDES

* Collections can now be linked into the scene without creating an instance,
  with the link/append operator or from the collections view in the outliner.
* Collections can get static overrides with the right click menu in the outliner,
  but this is rather unreliable and not clearly communicated at the moment.
* We still need to improve the make override operator to turn collection instances
  into collections with overrides directly in the scene.

PERFORMANCE

* We tried to make performance not worse than before and improve it in some
  cases. The main thing that's still a bit slower is multiple scenes, we have to
  change the layer syncing to only updated affected scenes.
* Collections keep a list of their parent collections for faster incremental
  updates in syncing and caching.
* View layer bases are now in a object -> base hash to avoid quadratic time
  lookups internally and in API functions like visible_get().

VERSIONING

* Compatibility with 2.7 files should be improved due to the new visibility
  controls. Of course users may not want to set up their scenes differently
  now to avoid having separate layers and groups.
* Compatibility with 2.8 is mostly there, and was tested on Eevee demo and Hero
  files. There's a few things which are know to be not quite compatible, like
  nested layer collections inside groups.
* The versioning code for 2.8 files is quite complicated, and isolated behind
  #ifdef so it can be removed at the end of the release cycle.

KNOWN ISSUES

* The G-key group operators in the 3D viewport were left mostly as is, they
  need to be modified still to fit better.
* Same for the groups panel in the object properties. This needs to be updated
  still, or perhaps replaced by something better.
* Collections must all have a unique name. Less restrictive namespacing is to
  be done later, we'll have to see how important this is as all objects within
  the collections must also have a unique name anyway.
* Full scene copy and delete scene are exactly doing the right thing yet.

Differential Revision: https://developer.blender.org/D3383

https://code.blender.org/2018/05/collections-and-groups/

3 years agoFix crash running in background mode, after recent changes.
Brecht Van Lommel [Fri, 18 May 2018 11:23:14 +0000 (13:23 +0200)]
Fix crash running in background mode, after recent changes.

3 years agoCleanup: move unneeded struct out of DNA.
Brecht Van Lommel [Thu, 17 May 2018 13:05:17 +0000 (15:05 +0200)]
Cleanup: move unneeded struct out of DNA.

The real reason is that there is a conflict between Carbon header defining
a "Collection" struct, and this works around it.

3 years agoTool System: set cursors for draw & transform
Campbell Barton [Fri, 18 May 2018 09:57:40 +0000 (11:57 +0200)]
Tool System: set cursors for draw & transform

3 years agoTool System: support for tool cursors
Campbell Barton [Fri, 18 May 2018 09:44:28 +0000 (11:44 +0200)]
Tool System: support for tool cursors

3 years agoFix operator execution resetting the cursor
Campbell Barton [Fri, 18 May 2018 09:42:58 +0000 (11:42 +0200)]
Fix operator execution resetting the cursor

Area and region are NULL in the context if the operator finishes.

3 years agoFix manipulator resetting the cursor
Campbell Barton [Fri, 18 May 2018 09:42:37 +0000 (11:42 +0200)]
Fix manipulator resetting the cursor

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Fri, 18 May 2018 09:02:39 +0000 (11:02 +0200)]
Merge branch 'master' into blender2.8

3 years agoLogging: add --show-log-backtrace
Campbell Barton [Fri, 18 May 2018 09:00:47 +0000 (11:00 +0200)]
Logging: add --show-log-backtrace

Useful in debug builds to see a functions callers.

3 years agoTool System: store the active tool in ScrArea
Campbell Barton [Fri, 18 May 2018 07:35:10 +0000 (09:35 +0200)]
Tool System: store the active tool in ScrArea

Without this we need to have the context to get the
(space_type, mode) args for an active tool lookup.

For event handling & poll its more convenient to have direct access.

3 years agoCleanup: unused DNA
Campbell Barton [Fri, 18 May 2018 06:14:36 +0000 (08:14 +0200)]
Cleanup: unused DNA

3 years agoCleanup: use '_Runtime' suffix
Campbell Barton [Fri, 18 May 2018 06:02:32 +0000 (08:02 +0200)]
Cleanup: use '_Runtime' suffix

Allows for more easily finding runtime versions of any struct.

3 years agoTool System: add cursor (currently unused)
Campbell Barton [Fri, 18 May 2018 05:58:37 +0000 (07:58 +0200)]
Tool System: add cursor (currently unused)

3 years agoCleanup: remove tool definition access function
Campbell Barton [Fri, 18 May 2018 05:24:17 +0000 (07:24 +0200)]
Cleanup: remove tool definition access function

No longer needed since names not values are compared
when checking if a tool is active.

3 years agoColor: Assume Rec 709 in remaining comp nodes
Aaron Carlisle [Thu, 17 May 2018 21:20:32 +0000 (17:20 -0400)]
Color: Assume Rec 709 in remaining comp nodes

Part of T54798

3 years agoTool System: tools now initialize on startup
Campbell Barton [Thu, 17 May 2018 20:01:58 +0000 (22:01 +0200)]
Tool System: tools now initialize on startup

3 years agoRNA: quiet warning
Campbell Barton [Thu, 17 May 2018 18:35:46 +0000 (20:35 +0200)]
RNA: quiet warning

Harmless but annoying.

3 years agoTool System: use context mode
Campbell Barton [Thu, 17 May 2018 18:28:14 +0000 (20:28 +0200)]
Tool System: use context mode

Was using object mode in the workspace API which isn't
useful for accessing tools.

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Thu, 17 May 2018 17:55:27 +0000 (19:55 +0200)]
Merge branch 'master' into blender2.8

3 years agoRNA: move enums to rna_rna.c
Campbell Barton [Thu, 17 May 2018 17:10:45 +0000 (19:10 +0200)]
RNA: move enums to rna_rna.c

Needed for use in rna non runtime code.

3 years agoRNA: move enums to rna_rna.c
Campbell Barton [Thu, 17 May 2018 17:10:45 +0000 (19:10 +0200)]
RNA: move enums to rna_rna.c

Needed for use in rna non runtime code.

3 years agomakesrna: error check from 2.8
Campbell Barton [Thu, 17 May 2018 17:05:46 +0000 (19:05 +0200)]
makesrna: error check from 2.8

3 years agoFix UV shadow drawing
Campbell Barton [Thu, 17 May 2018 16:44:03 +0000 (18:44 +0200)]
Fix UV shadow drawing

3 years agoStatic Override/RNA diffing: Use a nasty macro to factorize a bit the code.
Bastien Montagne [Thu, 17 May 2018 15:06:08 +0000 (17:06 +0200)]
Static Override/RNA diffing: Use a nasty macro to factorize a bit the code.

This piece of code remains annoyingly verbose, but at least now we do
not have anymore twice the same logic duplicated between single array
element handling, and non-array properties.

3 years agoMulti-Object-Mode: EditCuve Select All
Campbell Barton [Thu, 17 May 2018 15:09:02 +0000 (17:09 +0200)]
Multi-Object-Mode: EditCuve Select All

D3381 by @dgriffin91

3 years agoModifiers: ported Surface DerivedMesh → Mesh
Sybren A. Stüvel [Thu, 17 May 2018 14:21:04 +0000 (16:21 +0200)]
Modifiers: ported Surface DerivedMesh → Mesh

3 years agoTool System: per space/mode tool support
Campbell Barton [Wed, 16 May 2018 16:41:11 +0000 (18:41 +0200)]
Tool System: per space/mode tool support

This patch adds support for:

- Per space-type tools (3D view and edit).
- Per mode tools (object, edit, weight-paint .. etc).

The top-bar shows the last activated tools options, this is a design
issue with using a global topbar to show per-space settings.

See D3395

3 years agoCleanup: warning
Campbell Barton [Thu, 17 May 2018 13:51:24 +0000 (15:51 +0200)]
Cleanup: warning

3 years agoTag scene & objects for COW update after physics settings changed via RNA
Sybren A. Stüvel [Thu, 17 May 2018 13:48:23 +0000 (15:48 +0200)]
Tag scene & objects for COW update after physics settings changed via RNA

3 years agoModifiers: ported Collision DerivedMesh → Mesh
Sybren A. Stüvel [Thu, 17 May 2018 13:26:59 +0000 (15:26 +0200)]
Modifiers: ported Collision DerivedMesh → Mesh

3 years agoCollision Modifier: get time from depsgraph instead of scene
Sybren A. Stüvel [Thu, 17 May 2018 13:28:18 +0000 (15:28 +0200)]
Collision Modifier: get time from depsgraph instead of scene

3 years agoEEVEE: Fix Motion Blur for copy-on-write
Dalai Felinto [Thu, 17 May 2018 13:20:41 +0000 (15:20 +0200)]
EEVEE: Fix Motion Blur for copy-on-write

Get current frame from depsgraph, not scene.

3 years agoOutliner: add ID type filter option for Blender File and Orphaned Data.
Brecht Van Lommel [Thu, 17 May 2018 11:40:59 +0000 (13:40 +0200)]
Outliner: add ID type filter option for Blender File and Orphaned Data.

3 years agoOutliner: move filter menu to the left in header.
Brecht Van Lommel [Thu, 17 May 2018 10:27:22 +0000 (12:27 +0200)]
Outliner: move filter menu to the left in header.

3 years agoOutliner: in Blender File, use upper case names and icons.
Brecht Van Lommel [Thu, 17 May 2018 10:20:40 +0000 (12:20 +0200)]
Outliner: in Blender File, use upper case names and icons.

3 years agoOutliner: rename Data-Blocks to Data API, to make clear it's low level stuff.
Brecht Van Lommel [Thu, 17 May 2018 10:20:10 +0000 (12:20 +0200)]
Outliner: rename Data-Blocks to Data API, to make clear it's low level stuff.

3 years agoModifiers: ported Particle Instance DerivedMesh → Mesh
Sybren A. Stüvel [Thu, 17 May 2018 11:45:47 +0000 (13:45 +0200)]
Modifiers: ported Particle Instance DerivedMesh → Mesh

3 years agoParticle System: fixed dupliobject drawing by getting time from depsgraph
Sybren A. Stüvel [Thu, 17 May 2018 09:42:13 +0000 (11:42 +0200)]
Particle System: fixed dupliobject drawing by getting time from depsgraph

3 years agoFix menu navigation and modal tools affecting the active region.
Brecht Van Lommel [Thu, 17 May 2018 08:56:36 +0000 (10:56 +0200)]
Fix menu navigation and modal tools affecting the active region.

We updated the active region during redraw to fix missing updates on
file load, restrict it more now to avoid unwanted updates.

3 years agoArmature: Fix non working Wireframe option on bones.
Clément Foucault [Thu, 17 May 2018 09:11:53 +0000 (11:11 +0200)]
Armature: Fix non working Wireframe option on bones.

3 years agoT55090: Proxy bones were not selectable
Jeroen Bakker [Thu, 17 May 2018 06:54:40 +0000 (08:54 +0200)]
T55090: Proxy bones were not selectable

 - Implemented custom selection in pose mode overriding the rest. This
selection mode is only done for bone selection right now

3 years agoCleanup: Use `ED_view3d_win_to_ray_ex` to get the ray and remove unused parameter.
Germano [Thu, 17 May 2018 02:04:28 +0000 (23:04 -0300)]
Cleanup: Use `ED_view3d_win_to_ray_ex` to get the ray and remove unused parameter.

3 years agoTransform: Use `isect_ray_seg_v3` instead `dist_squared_ray_to_seg_v3` in the functio...
Germano [Thu, 17 May 2018 01:04:41 +0000 (22:04 -0300)]
Transform: Use `isect_ray_seg_v3` instead `dist_squared_ray_to_seg_v3` in the function that tests the snap on edges.

3 years agoBLI_math_geom: Separate the `isect_ray_seg_v3` from `dist_squared_ray_to_seg_v3`.
Germano [Thu, 17 May 2018 00:36:41 +0000 (21:36 -0300)]
BLI_math_geom: Separate the `isect_ray_seg_v3` from `dist_squared_ray_to_seg_v3`.

3 years agoTransform: Fix bugs for the latest changes to the snap system.
Germano [Thu, 17 May 2018 00:32:52 +0000 (21:32 -0300)]
Transform: Fix bugs for the latest changes to the snap system.

3 years agoEEVEE Scene: Set all variable as overridable
Dalai Felinto [Wed, 16 May 2018 20:25:13 +0000 (22:25 +0200)]
EEVEE Scene: Set all variable as overridable

3 years agoRemove ViewLayer settings - cleanup 2/2
Dalai Felinto [Wed, 16 May 2018 20:03:25 +0000 (22:03 +0200)]
Remove ViewLayer settings - cleanup 2/2

3 years agoRemove ViewLayer settings - cleanup 1/2
Dalai Felinto [Wed, 16 May 2018 19:40:05 +0000 (21:40 +0200)]
Remove ViewLayer settings - cleanup 1/2

3 years agoMove Clay properties into scene
Dalai Felinto [Wed, 16 May 2018 19:28:05 +0000 (21:28 +0200)]
Move Clay properties into scene

Per collection overrides are gone now.

3 years agoMove EEVEE properties into scene
Dalai Felinto [Wed, 16 May 2018 17:34:24 +0000 (19:34 +0200)]
Move EEVEE properties into scene

We handle doversion for the scene properties, but not for the
view layer overrides.

Overrides will be implemented in a different way via dynamic overrides.
For now this data is completely lost.

3 years agoLayer unittest: Disable the override tests
Dalai Felinto [Wed, 16 May 2018 21:12:59 +0000 (23:12 +0200)]
Layer unittest: Disable the override tests

They are failing for some time now, and they will be obsolete soon anyways.

3 years agoCleanup: BKE_bvhuitls: Use a struct rather than re-create each member of it.
Germano [Wed, 16 May 2018 18:26:33 +0000 (15:26 -0300)]
Cleanup: BKE_bvhuitls: Use a struct rather than re-create each member of it.

3 years agoFix crash when duplicating an object type mesh with raycast operation enabled.
Germano [Wed, 16 May 2018 17:28:28 +0000 (14:28 -0300)]
Fix crash when duplicating an object type mesh with raycast operation enabled.

3 years agoTool System: pass space type when setting tool
Campbell Barton [Wed, 16 May 2018 16:59:43 +0000 (18:59 +0200)]
Tool System: pass space type when setting tool

Internal change only, needed because object mode is now in top-bar.

3 years agoCleanup: unused vars
Campbell Barton [Wed, 16 May 2018 17:04:07 +0000 (19:04 +0200)]
Cleanup: unused vars

3 years agoStatic overrides: reduce the amount of instantiated objects when overriding a group.
Bastien Montagne [Wed, 16 May 2018 16:57:24 +0000 (18:57 +0200)]
Static overrides: reduce the amount of instantiated objects when overriding a group.

For now, do not override/instantiate objects used as boneshapes.

Note that this is a rather poor/dirty hack, it seems Spring char groups
still have a lot of other (unused???) shape objects.

Ideally lib groups should be designed more cleanly for the new Static
Override system, putting only really usable objects into 'main' group,
and placing the others in sub-groups, helpers groups, or so...

3 years agoArmature: Fix T55068: Wireframe bones with custom shapes not working in object mode
Clément Foucault [Wed, 16 May 2018 16:40:25 +0000 (18:40 +0200)]
Armature: Fix T55068: Wireframe bones with custom shapes not working in object mode

3 years agoArmature: Cleanup: Remove unused function and use less silly wire drawing.
Clément Foucault [Wed, 16 May 2018 16:01:32 +0000 (18:01 +0200)]
Armature: Cleanup: Remove unused function and use less silly wire drawing.

3 years agoParticle edit: Use proper modifier to get evaluated derived mesh from
Sergey Sharybin [Wed, 16 May 2018 15:45:21 +0000 (17:45 +0200)]
Particle edit: Use proper modifier to get evaluated derived mesh from

3 years agoParticle edit: Fix disappearing child particles when toggling edit mode
Sergey Sharybin [Wed, 16 May 2018 15:14:53 +0000 (17:14 +0200)]
Particle edit: Fix disappearing child particles when toggling edit mode

Going to object edit mode and back to particle edit mode used to loose all
children from being displayed.

3 years agoFix memleak with meshes having IDProps in modifier stack evaluation.
Bastien Montagne [Wed, 16 May 2018 15:35:54 +0000 (17:35 +0200)]
Fix memleak with meshes having IDProps in modifier stack evaluation.

*Always* use BKE_library API to handle IDs allocation and freeing,
unless you have a very, very, very good reason not to do so - and
perfectly know what you are doing.

3 years agoFix again bloody locked proxy bones...
Bastien Montagne [Wed, 16 May 2018 15:23:52 +0000 (17:23 +0200)]
Fix again bloody locked proxy bones...

No idea why that was working this morning, now we do not get CoW tag
anymore (which kind of makes sense since it's set *after* copying
happens...), so just resorting to using the NO_MAIN flag instead.

3 years agoEevee: Fix missing Ambient Occlusion node in add node menu.
Clément Foucault [Wed, 16 May 2018 13:52:04 +0000 (15:52 +0200)]
Eevee: Fix missing Ambient Occlusion node in add node menu.

3 years agoArmature: Fix T55070: Bones relationship lines are offsetted
Clément Foucault [Wed, 16 May 2018 12:53:41 +0000 (14:53 +0200)]
Armature: Fix T55070: Bones relationship lines are offsetted

Was missing object matrix multiplication.

3 years agoGPUShader/DRW: Add Transform Feedback support.
Clément Foucault [Wed, 16 May 2018 10:47:15 +0000 (12:47 +0200)]
GPUShader/DRW: Add Transform Feedback support.

This is a usefull feature that can be used to do a lot of precomputation on
the GPU instead of the CPU.

Implementation is simple and only covers the most usefull case.

How to use:
- Create shader with transform feedback.
- Create a pass with DRW_STATE_TRANS_FEEDBACK.
- Create a target Gwn_VertBuf (make sure it's big enough).
- Create a shading group with DRW_shgroup_transform_feedback_create().
- Add your draw calls to the shading group.
- Render your pass normaly.

Current limitation:
- Only one output buffer.
- Cannot pause/resume tfb rendering to interleave with normal drawcalls.
- Cannot get the number of verts drawn.

3 years agoEevee: Add support for Ambient Occlusion node.
Clément Foucault [Tue, 15 May 2018 15:30:52 +0000 (17:30 +0200)]
Eevee: Add support for Ambient Occlusion node.

3 years agoEevee: Change normal buffer texture format for more precision.
Clément Foucault [Tue, 15 May 2018 10:44:11 +0000 (12:44 +0200)]
Eevee: Change normal buffer texture format for more precision.

This means more accurate SSR with less faceted artifacts.

3 years agoShader Node Editor: Add Closure to RGB convertion node.
Clément Foucault [Mon, 14 May 2018 11:34:54 +0000 (13:34 +0200)]
Shader Node Editor: Add Closure to RGB convertion node.

Patch D3205 by Kanzaki Wataru

Only implemented in Eevee for now. Collapse a closure to RGBA so we can
do NPR stuff on the resulting color.

Use an emission shader to convert the color back to a closure.

Doing this will break PBR and will kill any SSR and SSS effects the shader
the shader rely on. That said screen space refraction and ambient occlusion
are supported due to the way they are implemented.

3 years agoWorkbench: World based studio lighting
Jeroen Bakker [Wed, 16 May 2018 14:42:30 +0000 (16:42 +0200)]
Workbench: World based studio lighting

Disabled shadows for now as the calculation of the light direction is
still to bogus.

3 years agoParticle System: ported most DerivedMesh → Mesh
Sybren A. Stüvel [Tue, 15 May 2018 11:26:40 +0000 (13:26 +0200)]
Particle System: ported most DerivedMesh → Mesh

There are a few places where DerivedMesh is still used, most notably
when calling the (not yet ported) cloth simulation. There is also still
the use of Object.derivedDeform and Object.derivedFinal. Those places are
marked with a TODO.

Some functions in the editors module were copied to accept Mesh. Those
already had 'mesh' in the name; the copies are suffixed with '__real_mesh'
for easy renaming later when the DM-based functionality is removed.

3 years agoMesh: Set deformed_only=1 when copied mesh is from main library
Sybren A. Stüvel [Wed, 16 May 2018 12:33:14 +0000 (14:33 +0200)]
Mesh: Set deformed_only=1 when copied mesh is from main library

3 years agoParticle System: use DEG to get current time in psys_get_particle_state()
Sybren A. Stüvel [Wed, 16 May 2018 14:09:48 +0000 (16:09 +0200)]
Particle System: use DEG to get current time in psys_get_particle_state()

3 years agoParticle System: Pass correct particle index when drawing
Sybren A. Stüvel [Wed, 16 May 2018 14:09:27 +0000 (16:09 +0200)]
Particle System: Pass correct particle index when drawing

Passing the wrong index caused the particles to stop being shown when the
first particle dies.

3 years agofix build error in last commit.
Germano [Wed, 16 May 2018 14:02:54 +0000 (11:02 -0300)]
fix build error in last commit.

3 years agoFix T55076: Hack around to break correct behavior of 2.8 and get back broken-used...
Bastien Montagne [Wed, 16 May 2018 13:41:53 +0000 (15:41 +0200)]
Fix T55076: Hack around to break correct behavior of 2.8 and get back broken-used-as-feature one from 2.7.

Locked bones of proxies should not be editable, at all. But lack of
update from linked rest pose in 2.7 allows to pose and animate locked
bones (not to pose them without animation though, or you'd lose your
pose on next file save & reload).

this is used by artists to always lock all their bones in a rig, so that
proxies fully update when lib rig is modified...

For now, restore that broken behavior in 2.8 by not updating proxies
against lib armature in CoW context (makes sense anyway, we are
currently doing a lot of useless thing when copying data for depsgraph
evaluation!).

3 years agoSnap system: Adds support to Clip Planes and uses a clip plane to simulate occlusion
Germano [Wed, 16 May 2018 13:31:27 +0000 (10:31 -0300)]
Snap system: Adds support to Clip Planes and uses a clip plane to simulate occlusion

This patch adds support for clip_planes (ie ignore what is behind a face)...

The idea is to first execute a raycast to get the polygon to which the mouse cursor points.
Then a snap test is done on the vertices or edges of the polygon.
Then with the normal and location obtained in raycast a new clip_plane is created and the snap over the whole scene is processed ignoring the elements behind the clip_plane.

Here 2 gif of how the previous patch would work on blender2.79:

{F497176}

{F497177}

Reviewers: mont29, campbellbarton

Reviewed By: campbellbarton

Subscribers: bliblubli

Tags: #bf_blender_2.8

Differential Revision: https://developer.blender.org/D2527

3 years agoFix T55097: Mesh Deformation modifier is ignoring Vgroup option
Sybren A. Stüvel [Wed, 16 May 2018 13:18:49 +0000 (15:18 +0200)]
Fix T55097: Mesh Deformation modifier is ignoring Vgroup option

3 years agoFix T55082: Add Paint Slots for texture painting not working
Dalai Felinto [Wed, 16 May 2018 12:59:16 +0000 (14:59 +0200)]
Fix T55082: Add Paint Slots for texture painting not working

We changed how this work since the BI removal. But since this operator
was moved to the topbar its poll function was returning false.

3 years agoPopover for snapping settings
Pablo Vazquez [Wed, 16 May 2018 12:23:37 +0000 (14:23 +0200)]
Popover for snapping settings

See T55038

3 years agoMulti-Object-Mode: EditMesh Tool Bevel (MESH_OT_bevel)
milios [Wed, 16 May 2018 11:11:50 +0000 (13:11 +0200)]
Multi-Object-Mode: EditMesh Tool Bevel (MESH_OT_bevel)

Maniphest Tasks: T54643
Differential Revision: https://developer.blender.org/D3352

3 years agoReverted copying mesh->runtime.deformed_only in CDDM_from_mesh_ex
Sybren A. Stüvel [Wed, 16 May 2018 11:06:54 +0000 (13:06 +0200)]
Reverted copying mesh->runtime.deformed_only in CDDM_from_mesh_ex

Doing that copy is the right thing, but only if the mesh has its own
deformed_only flag set correctly. This isn't generally the case, so
keeping dm->deformedOnly = 1 is better.

3 years agoMulti-Object-Editing: MESH_OT_faces_select_linked_flat
Luc Revardel [Wed, 16 May 2018 11:02:36 +0000 (13:02 +0200)]
Multi-Object-Editing: MESH_OT_faces_select_linked_flat

Reviewers: dfelinto

Maniphest Tasks: T54643

Differential Revision: https://developer.blender.org/D3372

3 years agoSilence warning about functions having no prototype
Mai Lavelle [Wed, 16 May 2018 10:44:49 +0000 (06:44 -0400)]
Silence warning about functions having no prototype

3 years agoSave 'deform_only' flag in Mesh.runtime
Sybren A. Stüvel [Tue, 15 May 2018 11:26:24 +0000 (13:26 +0200)]
Save 'deform_only' flag in Mesh.runtime

This flag is copied when converting between DM and Mesh.

This flag is set to true in get_mesh(), to mimick the behaviour of
CDDM_from_mesh_ex. This is necessary for the particle system to work
correctly.

3 years agoMulti-Object-Editing: intersect boolean (MESH_OT_intersect_boolean)
milios [Wed, 16 May 2018 10:28:32 +0000 (12:28 +0200)]
Multi-Object-Editing: intersect boolean (MESH_OT_intersect_boolean)

Reviewers: dfelinto (changed test from totvert to totfacesel before committing)

Maniphest Tasks: T54643
Differential Revision: https://developer.blender.org/D3306

3 years agoFix check for MESH_OT_intersect
Dalai Felinto [Wed, 16 May 2018 10:26:26 +0000 (12:26 +0200)]
Fix check for MESH_OT_intersect

3 years agoMulti-Object-Editing: intersect (MESH_OT_intersect)
milios [Wed, 16 May 2018 09:57:36 +0000 (11:57 +0200)]
Multi-Object-Editing: intersect (MESH_OT_intersect)

Reviewers: dfelinto

Maniphest Tasks: T54643
Differential Revision: https://developer.blender.org/D3307

3 years agoModifiers: Port mesh_calc_modifiers from DerivedMesh to Mesh
Mai Lavelle [Fri, 11 May 2018 07:53:52 +0000 (03:53 -0400)]
Modifiers: Port mesh_calc_modifiers from DerivedMesh to Mesh

This ports the main modifier eval loop.

A few things haven't been ported yet: tessface and shapekey related code. As
far as I can tell, shapekey code was never entered into.

https://developer.blender.org/D3342

3 years agoAdd modifier_deformVerts_ensure_normals, modifier_applyModifier_ensure_normals
Mai Lavelle [Tue, 24 Apr 2018 08:08:16 +0000 (04:08 -0400)]
Add modifier_deformVerts_ensure_normals, modifier_applyModifier_ensure_normals

Same as `modwrap_deformVerts` and `modwrap_applyModifier` but for `Mesh`.

3 years agoAdd BKE_mesh_is_valid
Mai Lavelle [Fri, 27 Apr 2018 04:39:53 +0000 (00:39 -0400)]
Add BKE_mesh_is_valid

Non modifying version of `BKE_mesh_validate`, mirrors `DM_is_valid` more
closely. Will be used in port of `mesh_calc_modifiers`
from `DerivedMesh` to `Mesh`.