Commit Graph

60697 Commits

Author SHA1 Message Date
Campbell Barton
2bc9396b55 UI: disable popovers when panel poll fails 2018-05-02 11:03:03 +02:00
Campbell Barton
9b21055dfb 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.
2018-05-02 11:03:03 +02:00
Dalai Felinto
3def6c7f8e 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.
2018-05-02 10:13:22 +02:00
Campbell Barton
c052346fbf 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.
2018-05-01 22:33:10 +02:00
Clément Foucault
e1bd883df3 Eevee: Don't enable temporal AA when using 1 sample only.
This was producing infinite rendering but wasn't noticeable.
2018-05-01 19:39:18 +02:00
Clément Foucault
20c1edf592 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).
2018-05-01 19:39:18 +02:00
Campbell Barton
52f1510613 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.
2018-05-01 18:56:52 +02:00
Sybren A. Stüvel
0d61cab7ce Modifiers: Fix crash when entering edit mode on unported modifiers 2018-05-01 18:47:26 +02:00
Dalai Felinto
3eca0af19c Fix number sliders for the topbar 2018-05-01 18:35:11 +02:00
Sybren A. Stüvel
334b55fd2e 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.
2018-05-01 18:02:17 +02:00
Sybren A. Stüvel
6b9f1ffe6e Formatting 2018-05-01 18:02:17 +02:00
Sybren A. Stüvel
2d6620a100 Modifiers: Array DerivedMesh → Mesh 2018-05-01 18:02:17 +02:00
Sybren A. Stüvel
1553f6b656 Introduced CDDM_from_mesh_ex() to create a non-referencing CDDM
This allows the mesh to be freed and the CDDM kept.
2018-05-01 18:02:17 +02:00
Sybren A. Stüvel
4211d02ab5 Modifiers: Mirror DerivedMesh → Mesh 2018-05-01 18:02:17 +02:00
Sybren A. Stüvel
eb6fc05f25 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.
2018-05-01 18:02:17 +02:00
Sybren A. Stüvel
7efc75c709 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.
2018-05-01 18:02:17 +02:00
Mai Lavelle
be4df85919 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
2018-05-01 18:02:17 +02:00
Sybren A. Stüvel
9fcb4e6406 Typo fix 2018-05-01 18:02:17 +02:00
Sybren A. Stüvel
b83d48b574 Added note about potential crash in add_orco_dm() 2018-05-01 18:02:17 +02:00
Clément Foucault
01a720fc9f Eevee: Fix crash when using visibility groups with dupli objects. 2018-05-01 17:59:40 +02:00
Clément Foucault
1bef7f9318 Eevee: Contact Shadows: Add slope based bias & fix brightening. 2018-05-01 17:59:40 +02:00
Clément Foucault
8c92a02720 Eevee: Fix raytracing.
- Fix the confusing naming in raycast()
- Fix raytrace acne caused by the rays not being correctly centered on
  the texel.
2018-05-01 17:59:40 +02:00
Joshua Leung
92fd931e53 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.
2018-05-01 17:43:18 +02:00
Bastien Montagne
f6c1762bb3 Fix previous commit, sorry about that :/ 2018-05-01 17:03:23 +02:00
Bastien Montagne
691c532506 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. ;)
2018-05-01 17:02:30 +02:00
Campbell Barton
0636acc59a Icons: updated icons from @billreynish
This adds vertex paint & sculpt icons + other minor changes.
2018-05-01 16:52:12 +02:00
Jeroen Bakker
43452c254e Merge branch 'blender2.8' of git.blender.org:blender into blender2.8 2018-05-01 16:28:02 +02:00
Jeroen Bakker
be88f23b83 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
2018-05-01 16:26:31 +02:00
Joshua Leung
c5c3fa3eac Fix compiler warning: Uninitialised var 2018-05-01 16:22:36 +02:00
Bastien Montagne
30093a6596 Add/finish rna read-only access to actual override rules.
For some reasons did not add operations themselves previously...
2018-05-01 15:18:30 +02:00
Bastien Montagne
3166086c60 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!
2018-05-01 15:08:38 +02:00
Sergey Sharybin
008a5d9106 Depsgraph: Add missing relations needed for nested datablock relations 2018-05-01 13:22:55 +02:00
Sergey Sharybin
314420e193 Fix crash opening file saved in weight paint mode 2018-05-01 12:07:38 +02:00
Sergey Sharybin
f0982220be 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.
2018-05-01 12:07:38 +02:00
Campbell Barton
70d352d994 Tool System: add paint poll which ignores the tool
Needed for tools which ensure paint context but aren't brushes
(color sample & gradient).
2018-05-01 11:42:25 +02:00
Campbell Barton
2c9670b92d Tool System: support non-brush tools w/ paint modes
Allows select, gradient tools not to conflict with brush keymap.
2018-05-01 11:23:46 +02:00
Dalai Felinto
1e8021a58a Fix missing copy-on-write update when changing edit mode selection mode 2018-05-01 11:15:48 +02:00
Sergey Sharybin
0be4b0f7a5 Fix edit mesh selection with copy-on-write enabled 2018-05-01 11:02:55 +02:00
Jeroen Bakker
98c767244d Merge branch 'blender2.8' of git.blender.org:blender into blender2.8 2018-05-01 10:44:31 +02:00
Jeroen Bakker
aad0e52e38 Workbench: Shading popover
- Moved random object color and object outline to shading popover as
these are draw options.
2018-05-01 10:43:27 +02:00
Sergey Sharybin
2ce94cc24b 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.
2018-05-01 10:14:20 +02:00
Sergey Sharybin
af508a1e39 Mark localized node trees and materials as such
Makes it easier to see where the datablock is coming from.
2018-05-01 09:17:17 +02:00
Sergey Sharybin
2bd2a2ac03 Depsgraph: Extra sanity checks for copy-on-write tagging 2018-05-01 09:17:17 +02:00
Sergey Sharybin
8cf9c58906 Depsgraph: Put original and evaluated ID node pointers to graphviz 2018-05-01 09:17:17 +02:00
Sergey Sharybin
04ee606383 Depsgraph: use human readable node type for graphviz debug output 2018-05-01 09:17:17 +02:00
Sergey Sharybin
2daab40717 Depsgraph: Cleanup, simplify operation code stringification 2018-05-01 09:17:17 +02:00
Sergey Sharybin
2a89ef3da7 Depsgraph: Cleanup, remove unused code 2018-05-01 09:17:17 +02:00
Sergey Sharybin
e52dce6408 Animation: Don't user-copunter copy-on-written action block 2018-05-01 09:17:17 +02:00
Dalai Felinto
c21ceb3317 Edit-Mesh: multi-object mark freestyle face
Freestyle face drawing is not working, but I tested it in 2.79, all good.
2018-04-30 22:38:06 +02:00
Dalai Felinto
9ce4a7e824 Edit Mesh: multi-object mark freestyle edge
Freestyle edge drawing is not working though.
2018-04-30 22:38:06 +02:00