blender.git
19 months agoLattice modifier: take comparison out of loop
Sybren A. Stüvel [Wed, 2 May 2018 11:51:31 +0000 (13:51 +0200)]
Lattice modifier: take comparison out of loop

19 months agoModifiers: ported Lattice modifier DerivedMesh → Mesh
Sybren A. Stüvel [Wed, 2 May 2018 11:42:04 +0000 (13:42 +0200)]
Modifiers: ported Lattice modifier DerivedMesh → Mesh

19 months agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 2 May 2018 10:46:14 +0000 (12:46 +0200)]
Merge branch 'master' into blender2.8

19 months agoUI: open toolbar hold buttons on drag
Campbell Barton [Wed, 2 May 2018 10:18:36 +0000 (12:18 +0200)]
UI: open toolbar hold buttons on drag

Allows for faster tool switching, no need to wait for it to open.

19 months agoModifiers: ported Bevel modifier DerivedMesh → Mesh
Sybren A. Stüvel [Wed, 2 May 2018 09:39:23 +0000 (11:39 +0200)]
Modifiers: ported Bevel modifier DerivedMesh → Mesh

This introduces `BKE_mesh_to_bmesh_ex()`, which exposes all of the
`BMeshFromMeshParams` parameters to the caller. This is required to enable
the `calc_face_normal` flag, which is required for the Bevel modifier.

This also introduces `BKE_bmesh_to_mesh()`, which allocates a new `Mesh`,
converts the `BMesh` to it, and returns it. The returned mesh is owned by
the caller.

19 months agoWorkbench: Single Color Modes
Jeroen Bakker [Wed, 2 May 2018 10:05:40 +0000 (12:05 +0200)]
Workbench: Single Color Modes

 - ability to switch between Single Color, Object Color, Material Color
and Random Color
 - fixed Shading and Lighting popover
 - Renamed Solid -> Single Color

19 months agoUI: don't allow disabled popovers to open w/ drag
Campbell Barton [Wed, 2 May 2018 10:02:50 +0000 (12:02 +0200)]
UI: don't allow disabled popovers to open w/ drag

First dragging over active menu items could be used to open a disabled
popover.

19 months agoUI: run redo poll check in operators context
Campbell Barton [Wed, 2 May 2018 09:33:24 +0000 (11:33 +0200)]
UI: run redo poll check in operators context

19 months agoUI: fix operator redo showing empty popovers
Campbell Barton [Wed, 2 May 2018 08:59:20 +0000 (10:59 +0200)]
UI: fix operator redo showing empty popovers

Many operators have no options,
showing a popover button with no content isn't good.

19 months agoUI: disable popovers when panel poll fails
Campbell Barton [Wed, 2 May 2018 08:58:56 +0000 (10:58 +0200)]
UI: disable popovers when panel poll fails

19 months agoWM: utility to check if an operator will draw a UI
Campbell Barton [Wed, 2 May 2018 08:24:14 +0000 (10:24 +0200)]
WM: utility to check if an operator will draw a UI

Checking if a redo operator will show something is needed
to avoid empty redo popover.

19 months agoEdit Mesh: look-cut copy-on-write support
Dalai Felinto [Wed, 2 May 2018 07:58:31 +0000 (09:58 +0200)]
Edit Mesh: look-cut copy-on-write support

Note: As already commented in the code, the ideal solution would
be to pass select mode as parameter to ED_view3D_backbuf_validate.

Without that we have to resort to the hack solution of writing to
evaluation data.

19 months agoUI: move object selector into 3D view
Campbell Barton [Tue, 1 May 2018 18:12:06 +0000 (20:12 +0200)]
UI: move object selector into 3D view

This matches the new convention for left-handed mode selectors,
however we're still undecided on exactly how this should work.

For now test this out as a convention for all space types.

19 months agoEevee: Don't enable temporal AA when using 1 sample only.
Clément Foucault [Tue, 1 May 2018 17:39:04 +0000 (19:39 +0200)]
Eevee: Don't enable temporal AA when using 1 sample only.

This was producing infinite rendering but wasn't noticeable.

19 months agoEevee: Shadows: Only tag as shadow caster if a shadow is cast.
Clément Foucault [Tue, 1 May 2018 17:32:24 +0000 (19:32 +0200)]
Eevee: Shadows: Only tag as shadow caster if a shadow is cast.

This leads to great improvement if the scene have moving objects without
shadows (shadows disabled in the material panel).

19 months agoUI: move space-mode selectors before menu items
Campbell Barton [Tue, 1 May 2018 16:47:26 +0000 (18:47 +0200)]
UI: move space-mode selectors before menu items

This adds a convention to have a spaces primary mode selector
positioned to at the left of the header.

19 months agoModifiers: Fix crash when entering edit mode on unported modifiers
Sybren A. Stüvel [Tue, 1 May 2018 16:47:20 +0000 (18:47 +0200)]
Modifiers: Fix crash when entering edit mode on unported modifiers

19 months agoFix number sliders for the topbar
Dalai Felinto [Tue, 1 May 2018 16:35:11 +0000 (18:35 +0200)]
Fix number sliders for the topbar

19 months agoExtract common modifier parameters into ModifierEvalContext struct
Sybren A. Stüvel [Tue, 1 May 2018 15:33:04 +0000 (17:33 +0200)]
Extract common modifier parameters into ModifierEvalContext struct

The contents of the ModifierEvalContext struct are constant while iterating
over the modifier stack. The struct thus should be only created once, outside
any loop over the modifiers.

19 months agoFormatting
Sybren A. Stüvel [Tue, 1 May 2018 09:02:58 +0000 (11:02 +0200)]
Formatting

19 months agoModifiers: Array DerivedMesh → Mesh
Sybren A. Stüvel [Wed, 25 Apr 2018 14:47:52 +0000 (16:47 +0200)]
Modifiers: Array DerivedMesh → Mesh

19 months agoIntroduced CDDM_from_mesh_ex() to create a non-referencing CDDM
Sybren A. Stüvel [Wed, 25 Apr 2018 13:38:26 +0000 (15:38 +0200)]
Introduced CDDM_from_mesh_ex() to create a non-referencing CDDM

This allows the mesh to be freed and the CDDM kept.

19 months agoModifiers: Mirror DerivedMesh → Mesh
Sybren A. Stüvel [Wed, 25 Apr 2018 10:21:07 +0000 (12:21 +0200)]
Modifiers: Mirror DerivedMesh → Mesh

19 months agoModifiers: Armature DerivedMesh → Mesh
Sybren A. Stüvel [Wed, 25 Apr 2018 09:04:40 +0000 (11:04 +0200)]
Modifiers: Armature DerivedMesh → Mesh

The mesh parameter of armature_deform_verts() is now const, to indicate
that it's safe to pass ob->data to it directly.

19 months agoModifiers: Simple Deform & Build, DerivedMesh → Mesh
Sybren A. Stüvel [Thu, 19 Apr 2018 09:03:58 +0000 (11:03 +0200)]
Modifiers: Simple Deform & Build, DerivedMesh → Mesh

This commit introduces `EditMeshData`. The fields in this struct are
extracted from `EditDerivedBMesh` into their own struct `EditMeshData`,
which can then also be used by the `Mesh` struct. This allows passing
deformed vertices efficiently to the draw routines.

The modifier code constructs a new Mesh instead of writing to ob->data;
even when ob->data is a CoW copy, it can still be used by different
objects and thus shouldn't be modified by a modifier.

19 months agoModifiers: Add wrapper functions with Mesh / DerivedMesh conversion
Mai Lavelle [Wed, 18 Apr 2018 13:45:54 +0000 (15:45 +0200)]
Modifiers: Add wrapper functions with Mesh / DerivedMesh conversion

Makes the follow changes:

- Add new `deform*` and `apply*` function pointers to `ModifierTypeInfo` that take `Mesh`, and rename the old functions to indicate that they take `DerivedMesh`. These new functions are currently set to `NULL` for all modifiers.
- Add wrapper `modifier_deform*` and `modifier_apply*` functions in two variants: one that works with `Mesh` and the other which works with `DerivedMesh` that is named with `*_DM_depercated`. These functions check which type of data the modifier supports and converts if necessary
- Update the rest of Blender to be aware and make use of these new functions

The goal of these changes is to make it possible to port to using `Mesh` incrementally without ever needing to enter into a state where modifiers don't work. After everything has been ported over the old functions and wrappers could be removed.

Reviewers: campbellbarton, sergey, mont29

Subscribers: sybren

Tags: #bf_blender_2.8

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

19 months agoTypo fix
Sybren A. Stüvel [Wed, 25 Apr 2018 10:09:12 +0000 (12:09 +0200)]
Typo fix

19 months agoAdded note about potential crash in add_orco_dm()
Sybren A. Stüvel [Wed, 25 Apr 2018 07:53:32 +0000 (09:53 +0200)]
Added note about potential crash in add_orco_dm()

19 months agoEevee: Fix crash when using visibility groups with dupli objects.
Clément Foucault [Tue, 1 May 2018 15:59:33 +0000 (17:59 +0200)]
Eevee: Fix crash when using visibility groups with dupli objects.

19 months agoEevee: Contact Shadows: Add slope based bias & fix brightening.
Clément Foucault [Tue, 1 May 2018 15:31:35 +0000 (17:31 +0200)]
Eevee: Contact Shadows: Add slope based bias & fix brightening.

19 months agoEevee: Fix raytracing.
Clément Foucault [Tue, 1 May 2018 15:27:51 +0000 (17:27 +0200)]
Eevee: Fix raytracing.

- Fix the confusing naming in raycast()
- Fix raytrace acne caused by the rays not being correctly centered on
  the texel.

19 months agoFix: Silence |RNA_boolean_get: WM_OT_save_as_mainfile.exit not found." warning on...
Joshua Leung [Tue, 1 May 2018 15:43:05 +0000 (17:43 +0200)]
Fix: Silence |RNA_boolean_get: WM_OT_save_as_mainfile.exit not found." warning on exit

The operator in question doesn't define this property.
I'm commenting out for now in case another operator actually still uses it.

19 months agoFix previous commit, sorry about that :/
Bastien Montagne [Tue, 1 May 2018 15:03:23 +0000 (17:03 +0200)]
Fix previous commit, sorry about that :/

19 months agoStatic override: rename highly confusing var name in apply code.
Bastien Montagne [Tue, 1 May 2018 14:59:48 +0000 (16:59 +0200)]
Static override: rename highly confusing var name in apply code.

We use 'reference' to designate the linked ID which is being overridden
by the local one, so using 'reference' to designate the stored local ID
in apply RNA code was... not a good idea. ;)

19 months agoIcons: updated icons from @billreynish
Campbell Barton [Tue, 1 May 2018 14:44:44 +0000 (16:44 +0200)]
Icons: updated icons from @billreynish

This adds vertex paint & sculpt icons + other minor changes.

19 months agoMerge branch 'blender2.8' of git.blender.org:blender into blender2.8
Jeroen Bakker [Tue, 1 May 2018 14:28:02 +0000 (16:28 +0200)]
Merge branch 'blender2.8' of git.blender.org:blender into blender2.8

19 months agoOverlay: Enabled wireframe drawing for vertex/weight paint
Jeroen Bakker [Tue, 1 May 2018 14:26:31 +0000 (16:26 +0200)]
Overlay: Enabled wireframe drawing for vertex/weight paint

This is a temp hack, so that billrey can use blender 2.8 for
drawing the icons. Hack will be phased out by T54910

19 months agoFix compiler warning: Uninitialised var
Joshua Leung [Tue, 1 May 2018 14:22:29 +0000 (16:22 +0200)]
Fix compiler warning: Uninitialised var

19 months agoAdd/finish rna read-only access to actual override rules.
Bastien Montagne [Tue, 1 May 2018 13:18:30 +0000 (15:18 +0200)]
Add/finish rna read-only access to actual override rules.

For some reasons did not add operations themselves previously...

19 months agoStatic Override: fix 'search matching override operation' function.
Bastien Montagne [Tue, 1 May 2018 13:08:38 +0000 (15:08 +0200)]
Static Override: fix 'search matching override operation' function.

Previous code was waaaayyyy to flacky, returning matches for things that
did not actually have much in common!

19 months agoDepsgraph: Add missing relations needed for nested datablock relations
Sergey Sharybin [Tue, 1 May 2018 10:41:10 +0000 (12:41 +0200)]
Depsgraph: Add missing relations needed for nested datablock relations

19 months agoUI: expose radial gradient as option
Campbell Barton [Tue, 1 May 2018 10:46:25 +0000 (12:46 +0200)]
UI: expose radial gradient as option

Was a separate tool, use option so we can extend more easily.

19 months agoUI: add weight paint sample tools
Campbell Barton [Tue, 1 May 2018 10:20:53 +0000 (12:20 +0200)]
UI: add weight paint sample tools

Also use unified weight.

19 months agoFix crash opening file saved in weight paint mode
Sergey Sharybin [Tue, 1 May 2018 10:06:59 +0000 (12:06 +0200)]
Fix crash opening file saved in weight paint mode

19 months agoNodes: Remove workaround for action copy
Sergey Sharybin [Tue, 1 May 2018 09:34:00 +0000 (11:34 +0200)]
Nodes: Remove workaround for action copy

Actions shouldn't be copying by new library management code.
Or at least should be possible to make it to not copy actions
or do unneeded user management.

This way we avoid modification of original data which could
and does cause threading conflict with copy-on-write which
could be happening for viewport.

19 months agoTool System: add paint poll which ignores the tool
Campbell Barton [Tue, 1 May 2018 09:42:25 +0000 (11:42 +0200)]
Tool System: add paint poll which ignores the tool

Needed for tools which ensure paint context but aren't brushes
(color sample & gradient).

19 months agoTool System: support non-brush tools w/ paint modes
Campbell Barton [Tue, 1 May 2018 09:22:12 +0000 (11:22 +0200)]
Tool System: support non-brush tools w/ paint modes

Allows select, gradient tools not to conflict with brush keymap.

19 months agoFix missing copy-on-write update when changing edit mode selection mode
Dalai Felinto [Tue, 1 May 2018 09:15:48 +0000 (11:15 +0200)]
Fix missing copy-on-write update when changing edit mode selection mode

19 months agoFix edit mesh selection with copy-on-write enabled
Sergey Sharybin [Tue, 1 May 2018 09:02:29 +0000 (11:02 +0200)]
Fix edit mesh selection with copy-on-write enabled

19 months agoMerge branch 'blender2.8' of git.blender.org:blender into blender2.8
Jeroen Bakker [Tue, 1 May 2018 08:44:31 +0000 (10:44 +0200)]
Merge branch 'blender2.8' of git.blender.org:blender into blender2.8

19 months agoWorkbench: Shading popover
Jeroen Bakker [Tue, 1 May 2018 08:43:27 +0000 (10:43 +0200)]
Workbench: Shading popover

 - Moved random object color and object outline to shading popover as
these are draw options.

19 months agoFix crash opening files saved in sculpt/vertex paint modes
Sergey Sharybin [Tue, 1 May 2018 08:14:20 +0000 (10:14 +0200)]
Fix crash opening files saved in sculpt/vertex paint modes

Skip access to any evaluated data when operator is run on file load,
we don't have depsgraph evaluated yet. In this case we skip part of
sculpt session initialization, since it will be done during depsgraph
evaluation which happens after DEG_on_visible_update().

We can not skip sculpt session initialization since during normal
operation we want all the data to be initialized on mode change,
and not on initial brush stroke.

19 months agoMark localized node trees and materials as such
Sergey Sharybin [Mon, 30 Apr 2018 15:52:45 +0000 (17:52 +0200)]
Mark localized node trees and materials as such

Makes it easier to see where the datablock is coming from.

19 months agoDepsgraph: Extra sanity checks for copy-on-write tagging
Sergey Sharybin [Mon, 30 Apr 2018 15:31:59 +0000 (17:31 +0200)]
Depsgraph: Extra sanity checks for copy-on-write tagging

19 months agoDepsgraph: Put original and evaluated ID node pointers to graphviz
Sergey Sharybin [Mon, 30 Apr 2018 15:31:04 +0000 (17:31 +0200)]
Depsgraph: Put original and evaluated ID node pointers to graphviz

19 months agoDepsgraph: use human readable node type for graphviz debug output
Sergey Sharybin [Mon, 30 Apr 2018 15:27:30 +0000 (17:27 +0200)]
Depsgraph: use human readable node type for graphviz debug output

19 months agoDepsgraph: Cleanup, simplify operation code stringification
Sergey Sharybin [Mon, 30 Apr 2018 15:20:42 +0000 (17:20 +0200)]
Depsgraph: Cleanup, simplify operation code stringification

19 months agoDepsgraph: Cleanup, remove unused code
Sergey Sharybin [Mon, 30 Apr 2018 14:55:16 +0000 (16:55 +0200)]
Depsgraph: Cleanup, remove unused code

19 months agoAnimation: Don't user-copunter copy-on-written action block
Sergey Sharybin [Mon, 30 Apr 2018 14:27:24 +0000 (16:27 +0200)]
Animation: Don't user-copunter copy-on-written action block

19 months agoIcons: write object children
Campbell Barton [Tue, 1 May 2018 06:40:07 +0000 (08:40 +0200)]
Icons: write object children

Allows for sharing geometry between icons.

19 months agoEdit-Mesh: multi-object mark freestyle face
Dalai Felinto [Mon, 30 Apr 2018 20:34:38 +0000 (22:34 +0200)]
Edit-Mesh: multi-object mark freestyle face

Freestyle face drawing is not working, but I tested it in 2.79, all good.

19 months agoEdit Mesh: multi-object mark freestyle edge
Dalai Felinto [Mon, 30 Apr 2018 20:21:03 +0000 (22:21 +0200)]
Edit Mesh: multi-object mark freestyle edge

Freestyle edge drawing is not working though.

19 months agoEdit Mesh: multi-object mark sharp
Dalai Felinto [Mon, 30 Apr 2018 20:12:56 +0000 (22:12 +0200)]
Edit Mesh: multi-object mark sharp

19 months agoEdit Mesh: multi-object mark seams
Dalai Felinto [Mon, 30 Apr 2018 20:08:05 +0000 (22:08 +0200)]
Edit Mesh: multi-object mark seams

Note that I'm using bm->totedgesel instead of bm->totfacesel to skip objects.

19 months agoAdd missing tools to vertex paint
Campbell Barton [Mon, 30 Apr 2018 19:57:51 +0000 (21:57 +0200)]
Add missing tools to vertex paint

19 months agoCleanup: simplify GLSL logic in outlines drawing.
Germano [Mon, 30 Apr 2018 19:55:16 +0000 (16:55 -0300)]
Cleanup: simplify GLSL logic in outlines drawing.

No functional changes.

19 months agoPopover: tiny cleanup
Dalai Felinto [Sun, 29 Apr 2018 10:22:55 +0000 (12:22 +0200)]
Popover: tiny cleanup

19 months agoFix T54901: Crash renaming UV layer
Campbell Barton [Mon, 30 Apr 2018 19:03:16 +0000 (21:03 +0200)]
Fix T54901: Crash renaming UV layer

19 months agoUI: order edit-mesh tools
Campbell Barton [Mon, 30 Apr 2018 18:40:36 +0000 (20:40 +0200)]
UI: order edit-mesh tools

See T54885

19 months agoFix linking brushes crashing on load
Campbell Barton [Mon, 30 Apr 2018 18:07:32 +0000 (20:07 +0200)]
Fix linking brushes crashing on load

We need to link brushes for all windows that use a workspace.

19 months agoFix T54900: radial control drawing in wrong place after recent WM changes.
Brecht Van Lommel [Mon, 30 Apr 2018 17:47:33 +0000 (19:47 +0200)]
Fix T54900: radial control drawing in wrong place after recent WM changes.

19 months agoCleanup: de-duplicate paint access from object
Campbell Barton [Mon, 30 Apr 2018 17:42:58 +0000 (19:42 +0200)]
Cleanup: de-duplicate paint access from object

19 months agoCleanup: Move FOREACH_PCHAN_*_IN_OBJECT_*() macros to BKE_armature.h
Joshua Leung [Mon, 30 Apr 2018 16:46:52 +0000 (18:46 +0200)]
Cleanup: Move FOREACH_PCHAN_*_IN_OBJECT_*() macros to BKE_armature.h

This reduces the number of headers we need to import (and/or dependencies
on the order of them), as these depend on PBONE_VISIBLE(), which is already
in BKE_armature.h

19 months agoCopy on write support for Bone Group operators
Joshua Leung [Mon, 30 Apr 2018 16:38:56 +0000 (18:38 +0200)]
Copy on write support for Bone Group operators

19 months agoMulti-Object Pose: POSE_OT_group_assign/unassign
Joshua Leung [Mon, 30 Apr 2018 16:22:23 +0000 (18:22 +0200)]
Multi-Object Pose: POSE_OT_group_assign/unassign

Like the select/deselect operators, we only support doing this for the
active object for now. From the UI panels, it doesn't make sense to be
operating on bone groups which may not appear/line up with those in the panel
that we're currently dealing with.

This can be reviewed later, but for now, it's easier and makes more sense
this way.

19 months agoUI: show topbar brush options w/ texture paint
Campbell Barton [Mon, 30 Apr 2018 15:05:48 +0000 (17:05 +0200)]
UI: show topbar brush options w/ texture paint

19 months agoUI: share common paint panels between all modes
Campbell Barton [Mon, 30 Apr 2018 14:59:16 +0000 (16:59 +0200)]
UI: share common paint panels between all modes

19 months agoUI: add texture paint brushes to toolbar
Campbell Barton [Mon, 30 Apr 2018 14:43:13 +0000 (16:43 +0200)]
UI: add texture paint brushes to toolbar

19 months agoMulti-Object Pose Fixes for POSE_OT_armature_apply()
Joshua Leung [Mon, 30 Apr 2018 14:40:45 +0000 (16:40 +0200)]
Multi-Object Pose Fixes for POSE_OT_armature_apply()

This operator was only partially converted to multi-object editing,
as on one hand, it was using the new "objects in mode" iterator,
while on the other hand, it was also using the context iterator inside
that, making all selected bones across armatures get included.

19 months agoMulti-Object Pose: Fix POSE_OT_group_select and POSE_OT_group_deselect
Joshua Leung [Mon, 30 Apr 2018 14:38:58 +0000 (16:38 +0200)]
Multi-Object Pose: Fix POSE_OT_group_select and POSE_OT_group_deselect

We only want these to operate on the "active" armature only at a time
(where the "active" one is whichever the groups from the UI came from).
The fix therefore is to make it not use the context functions
(which were changed to always take bones from all selected armatures
instead).

19 months agoEevee: Use GPU_RG16 for velocity pass instead of GPU_RG32F.
Clément Foucault [Mon, 30 Apr 2018 14:16:16 +0000 (16:16 +0200)]
Eevee: Use GPU_RG16 for velocity pass instead of GPU_RG32F.

19 months agoGPUTexture: Add support for GPU_RG16.
Clément Foucault [Mon, 30 Apr 2018 14:15:01 +0000 (16:15 +0200)]
GPUTexture: Add support for GPU_RG16.

19 months agoDRW: Remove DRWTextureFormat in favor or GPUTextureFormat.
Clément Foucault [Mon, 30 Apr 2018 14:02:24 +0000 (16:02 +0200)]
DRW: Remove DRWTextureFormat in favor or GPUTextureFormat.

Because:
- Less redundancy.
- Better suffixes.

Also a few modification to GPU_texture_create_* to simplify the API:
- make the format explicit to the texture creation process.
- remove the component count as it's specified in the GPUTextureFormat.

19 months agoEevee: TAA: Use safe color when outputing the final color.
Clément Foucault [Mon, 30 Apr 2018 10:25:15 +0000 (12:25 +0200)]
Eevee: TAA: Use safe color when outputing the final color.

This prevent any NANs pixel to spear accross the history. This does not
mean we should allow NANs at all!

19 months agoOverlay: missed in last commit
Jeroen Bakker [Mon, 30 Apr 2018 14:27:34 +0000 (16:27 +0200)]
Overlay: missed in last commit

19 months agoOverlay: Integration of TexturePaint with Workbench
Jeroen Bakker [Mon, 30 Apr 2018 14:16:07 +0000 (16:16 +0200)]
Overlay: Integration of TexturePaint with Workbench

19 months agoUI: add weight paint brushes to toolbar
Campbell Barton [Mon, 30 Apr 2018 14:06:51 +0000 (16:06 +0200)]
UI: add weight paint brushes to toolbar

19 months agoWorkbench: Integration VertexPaint and WeightPaint modes
Jeroen Bakker [Mon, 30 Apr 2018 13:50:08 +0000 (15:50 +0200)]
Workbench: Integration VertexPaint and WeightPaint modes

 - Disable VertexPaint and WeightPaint for OB_MATERIAL and OB_RENDER. Users want to see the final result
 - When in OB_SOLID, the active object should be rendered without any color. The lighting information is multiplied with the VertexPaint/WeightPaint color
 - Removed the use_shading flag from VertexPaint and WeightPaint
 - add method to check if render engine should draw without color (DRW_object_in_only_lighting_mode)

Reviewers: fclem

Tags: #code_quest

Maniphest Tasks: T54894

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

19 months agoUI: add vertex paint tools
Campbell Barton [Mon, 30 Apr 2018 13:21:04 +0000 (15:21 +0200)]
UI: add vertex paint tools

Generalize logic to show the paintbrush as a tool so
different paint modes can use it.

19 months agoDepsgraph: Fix missing node tree update when adding keyframes
Sergey Sharybin [Mon, 30 Apr 2018 13:16:11 +0000 (15:16 +0200)]
Depsgraph: Fix missing node tree update when adding keyframes

Need to make sure animation data is copied from original tree to a copy,
it is NOT enough to only copy node socket values.

19 months agoFix: UI layout for "Pause" button on timeline header was broken (leaving a gap)
Joshua Leung [Mon, 30 Apr 2018 13:11:43 +0000 (15:11 +0200)]
Fix: UI layout for "Pause" button on timeline header was broken (leaving a gap)

A recent change in the UI layout code probably broke how the scale_x
for layouts was getting handled. This was leaving a large gap
(and causing layouts to pop) when trying to scrub the timeline.

This commit fixes this with a manually-found value that largely seems
to get rid of the popping problem. There's still a little jumping (1-2 px)
but it's less distracting now.

19 months agoCOW Fix: Material property update callbacks need to tag depsgraph for COW updates
Joshua Leung [Mon, 30 Apr 2018 12:46:30 +0000 (14:46 +0200)]
COW Fix: Material property update callbacks need to tag depsgraph for COW updates

Otherwise, trying to change color/material properties of EEVEE materials
that have been keyframed doesn't work until a new keyframe has been inserted.

NOTE: There's still some wonkiness if you edit more than one keyframed value
before keyframing (i.e. the other unkeyed value temporarily gets reset). But
that's more of a general COW+animation issue.

19 months agoANIM_apply_keyingset() - Tag modified datablocks for copy on write update for good...
Joshua Leung [Mon, 30 Apr 2018 12:41:56 +0000 (14:41 +0200)]
ANIM_apply_keyingset() - Tag modified datablocks for copy on write update for good measure

19 months agoFix some popup menus that don't support it refreshing and crashing.
Brecht Van Lommel [Mon, 30 Apr 2018 08:27:28 +0000 (10:27 +0200)]
Fix some popup menus that don't support it refreshing and crashing.

19 months agoUI: use "none" icon if loading fails
Campbell Barton [Mon, 30 Apr 2018 11:55:15 +0000 (13:55 +0200)]
UI: use "none" icon if loading fails

Workaround for issues w/ two column layout when icons are missing.

Also fix reloading icons when some values aren't valid.

19 months agoFix Eevee shadows not working in certain cases, after recent WM changes.
Brecht Van Lommel [Mon, 30 Apr 2018 11:49:07 +0000 (13:49 +0200)]
Fix Eevee shadows not working in certain cases, after recent WM changes.

19 months agoFix sculpt ToolDef generation
Campbell Barton [Mon, 30 Apr 2018 11:46:01 +0000 (13:46 +0200)]
Fix sculpt ToolDef generation

With non-default sculpt brushes, tool generation could fail.

19 months agoCorrect error in toolbar update
Campbell Barton [Mon, 30 Apr 2018 10:46:23 +0000 (12:46 +0200)]
Correct error in toolbar update

19 months ago3D View: refresh on Overlay & Shading changes
Campbell Barton [Mon, 30 Apr 2018 10:33:46 +0000 (12:33 +0200)]
3D View: refresh on Overlay & Shading changes

19 months agoRemove unused function
Sergey Sharybin [Mon, 30 Apr 2018 10:27:18 +0000 (12:27 +0200)]
Remove unused function

Is not needed anymore since 9577ebde79c.