Commit Graph

84668 Commits

Author SHA1 Message Date
Campbell Barton
eef4077f18 Cleanup: remove redundant doxygen \file argument
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
2019-02-06 15:45:22 +11:00
Campbell Barton
1085c2cc44 Doxygen: don't warn on undocumented params
We don't attempt to have docs for all args, so don't warn about this.
2019-02-06 15:02:07 +11:00
Campbell Barton
f339b2fd41 Doxygen: update doxyfile 2019-02-06 15:01:04 +11:00
Campbell Barton
15ad01492e Cleanup: remove deprecated/unused preferences DNA 2019-02-06 14:34:50 +11:00
Campbell Barton
7f6a4bc416 Cleanup: use doxy headers for preference comments 2019-02-06 14:23:08 +11:00
Campbell Barton
cd2bf1fc91 Fix T61191: First undo step missing in text editor 2019-02-06 12:59:38 +11:00
Campbell Barton
e535ff44ff Undo System: remove accumulate/store modes
This complicated handling of undo steps in a generic way
especially switching between undo systems that stored data to ones
that accumulated changes.

Now each undo system must treat it's steps as check-point,
internally it can apply/rewind changes.

This commit also fixes projection paint where the object mode wasn't
following the undo steps.
2019-02-06 11:52:04 +11:00
Campbell Barton
8996e26116 Fix T61196: Mesh select ignores clipping
Select clipping now works when x-ray is disabled.
2019-02-06 10:34:09 +11:00
Campbell Barton
dbd7f36da8 GPU: refactor clipped drawing from DRW into GPU
Needed to fix T61196, supporting clipped back-buffer in the 3D view
which is done outside the draw module.

It was also inconvenient having DRW_shader_* versions of GPU_shader_*
API calls.

- Clipping distances are now supported as a shader configuration
  for builtin shaders.
- Add shader config argument when accessing builtin shaders.
- Move GPU_shader_create_from_arrays() from DRW to GPU.
2019-02-06 09:15:16 +11:00
Campbell Barton
a245d53351 Cleanup: style 2019-02-06 09:14:36 +11:00
Dalai Felinto
897e047374 Outliner visibility unification: Implement 3 levels of viewport visibility
Now collection and objects can be either:
* Disabled for all the view layers.
* Hidden for a view layer but not necessarily for all others.
* Visible for a view layer but not necessarily for all others.

Regarding icons: Whatever we decide to use for the "Hidden for all view
layers" needs to be a toggle-like icon. Because when viewing "Scenes"
instead of "View Layer" in the outliner we should be able to edit the
collection "Hidden for all the view layers" as an on/off option.

The operators are accessible via a Visibility context menu or shortcuts:
* Ctrl + Click: Isolate collection (use shift to extend).
* Alt + Click: Disable collection.
* Shift + Click: Hide/Show collection and its children (objects and collections)

Things yet to be tackled:
* Object outliner context menu can also get a Visibility sub-menu.
* Get better icons for viewport enable/disable.

Note:
* When using emulate 3 button mouse alt+click is used for 2d panning.
  In this case users have to use the operator from the menu.

See T57857 for discussion.

Patch: https://developer.blender.org/D4011
Reviewers: brecht and sergey

Thanks to the reviewers and William Reynish and Julien Kasper in
particular for the feedback.
2019-02-05 19:32:58 -02:00
Dalai Felinto
e3f7f0c3eb Outliner: eyes for collection affect collection visibility
As oppose to affect the collection objects' visibility.
2019-02-05 18:42:02 -02:00
Dalai Felinto
dc7f312326 Outliner: Gray out collections only when they are invisible
Re-factor of 4521d3e7074d.
2019-02-05 18:42:02 -02:00
Sergey Sharybin
7b22c3269b Fix/workaround issues in pose and edit mode
[re-committing]

Edit mode was unable to select, pose mode was unable to move bones.
2019-02-05 18:42:02 -02:00
Dalai Felinto
3d984aa150 Per view-layer collection visibility
[re-committing]

We still control this in the viewport collections visibility menu. But
now we are actually changing the visibility of the collections, not of
the objects.

If a collection is indirectly invisible (because one of its parents are
invisible) we gray it out.

Also if you click directly in the collection names, it "isolates" the
collection by hiding all collections, and showing the direct parents and
all the children of the selected collection.

Development Note:

Right now I'm excluding the hidden collections from the depsgraph.
Thus the need for tagging relations to update.

If this proves to be too slow, we can change.
2019-02-05 18:42:02 -02:00
Dalai Felinto
d1ef6be4a7 Fix T61204: Can't select Camera in stereoscopy mode
This was deliberately disabled since I didn't get the drawing working
originally. It is fully working now.

Note: camera lens widget still needs to be fixed since it still draws it
wrongly.
2019-02-05 18:40:23 -02:00
2778ecb58c UI: make drag lock work also when buttons have > 2 states or use callbacks.
This will help with upcoming outliner visibility icons with 3 states.

It is done by using the icon to identify the state. If that is not unique
there is no visible difference to users anyway.
2019-02-05 20:21:03 +01:00
4c6e7be44b Fix new EEVEE bloom / motion blur defaults not being applied to startup.blend. 2019-02-05 17:19:10 +01:00
Sergey Sharybin
07765499ab Fix strict compiler warning, breaking MSVC 2019-02-05 17:02:01 +01:00
Sergey Sharybin
08ab09cf04 Clip editor: Fixes for prefetch
Seems metadata was never read while prefetching, at least was
never requested to be read.

Also fixed prefetch for multilayer EXR.
2019-02-05 16:52:36 +01:00
Bastien Montagne
3467e40e01 BKE_mesh_new_from_object(): do not generate temp obj/cu in Main.
When generating a mesh from a curve object, do not generate temp objects
and curves in main, but rather as 'localized' copies.

This is cleaner, and might add a marginal speed-up in some cases (like
rendering thousands of curve objects), since we save some processing.
Note that this is the function behind py API's `Object.to_mesh()` too.
2019-02-05 16:42:16 +01:00
Sergey Sharybin
cfc0790a45 Movieclip: Improve support of multilayer EXR files
Use first combined pass if possible. Is not ideal but better than
showing completely empty image.

Also, covers quite a lot of usecases when movie clip editor is
used to review animation render of single-layer renders but with
multiple passes.
2019-02-05 16:26:16 +01:00
Clément Foucault
7a2a08e0cd Edit Mode: Increase depth Bias for vertices 2019-02-05 16:12:50 +01:00
Clément Foucault
a13fb30917 Edit Mode: Fix loose edges edit mode normal display broken 2019-02-05 15:02:15 +01:00
Clément Foucault
5df56668d3 Edit Mode: Fix Xray edit mode broken due to recent refactor 2019-02-05 15:02:15 +01:00
Clément Foucault
773f3428cf Edit Mesh: Add workaround for system that does not support wide lines
This adds a new geometry shader (specific to edit mesh for now) that
reproduces the effect of glLineWidth > 1.0, since this is not supported on
all platform.

This fix could be generalized to other shaders later.
2019-02-05 15:02:15 +01:00
Clément Foucault
a131514d0f Edit Mesh: Fix some problem with new implementation
- Add manual depth offset to vertices and edges.
- Revert to plain edge decoration.
- Fix active edge coloring.
- Remove active face display if not in face selection mode.
- Add wide line support.
2019-02-05 15:02:15 +01:00
Clément Foucault
112cf6eadf Edit Mesh: Remove old unused code and files
Cleanup after recent refactor.
2019-02-05 15:02:15 +01:00
Clément Foucault
86193d25db Edit Mesh: Refactor Edit cage drawing to use old style drawing
This is work in progress. Look is not final.

This align data VBO data structure used for edti cage drawing to the one
use for normal drawing.

We no longer use barycentric coords to draw the lines an just rasterize
line primitives for edge drawing. This is a bit slower than using the
previous fast method but faster than the "correct" (edge artifact free)
method. This also make the code way simpler.

This also makes it possible to reuse possible and normal vbos used for
shading if the edit cage matches the

This also touches the UV batch code to share as much render data as
possible. The code also prepare for edit cage "modified" drawing cage (with
modifier applied) but is not enabled since selection and operators does not
work with modified cage yet.
2019-02-05 15:02:15 +01:00
Clément Foucault
f3f2602c88 UVEdit: Add function variants based on ToolSettings
This is better than passing a scene pointer when we don't have one.
2019-02-05 15:02:15 +01:00
Sergey Sharybin
e1b5fe156d Support showing metadata for multilayer EXR files
Quite straightforward: first, convert metadata from file to
stamp data which is stored in the render result, and then
for every requested layer/pass use that as a metadata.
2019-02-05 14:25:36 +01:00
William Reynish
56f5fd84fc UI: Add collection move & link to menu 2019-02-05 22:36:46 +11:00
Bastien Montagne
1b4230d4b5 Cleanup: Add precision to comment. 2019-02-05 10:53:17 +01:00
Bastien Montagne
41a15b7d6d Fix (unreported) linestyle/greasepencil actions not being duplicated by full scene copy.
Noted those as missing in XXX comments some time ago, running again on
that code I still see no reason for this missing feature, so now when
doing a full scene copy, including duplication of Freestyl's linestyles
and scene's greasepencil data, their potential Actions will also be
properly duplicated (like it was already the case for world, and scene
itself).
2019-02-05 10:53:17 +01:00
Bastien Montagne
cfe8f76616 Cleanup: typo in comment. 2019-02-05 10:53:16 +01:00
Bastien Montagne
8b716655e2 Cleanup: replace BKE_id_copy_ex by BKE_id_copy where possible.
That way it is obvious when we are using default ID copy behaviour, and
when we are using advanced/specialized ones.
2019-02-05 10:53:16 +01:00
Bastien Montagne
846105d254 Cleanup: use LIB_ID_COPY_LOCALIZE in BKE_libblock_copy_for_localize().
This is a slightly more risky commit, as it is very difficult to fathom
all that may happen when localazing IDs. Would not expect any issue
though.

Note that a big TODO remain to refactor fully that ID localization
process (for 'shading IDs'), it's still doing pretty much same thing as
regular out-of-main copies, but the infamous ntree topic makes it
delicate to handle...
2019-02-05 10:53:16 +01:00
Bastien Montagne
9469ebe1cc Cleanup: sanitize BKE_libblock_copy_for_localize() copy flags.
Asking to not copy animdata, but copy actions, is pure nonsense (and
make LIB_ID_COPY_ACTIONS flag totally useless/no-op).
2019-02-05 10:53:16 +01:00
Bastien Montagne
5123ee74f8 Cleanup: Remove old deprecated BKE_libblock_copy_nolib() from BKE_library.
Was not used anymore, time to get rid of it.
2019-02-05 10:53:16 +01:00
Bastien Montagne
b6771ccaf6 BKE_library: id_copy: More general usage of LIB_ID_COPY_LOCALIZE.
Turns out most of our 'local working copy' cases can use same set of
flags.

Note that this commit adds LIB_ID_COPY_CACHES to all our local meshes
copying, however this is no-op since that flag is unused during mesh
copying... We may want to add another set of flags without that one at
some point, but for now it would not be useful imho.
2019-02-05 10:53:16 +01:00
Bastien Montagne
72724211df BKE_library: add 'no preview' flag to LIB_ID_COPY_LOCALIZE.
No local work copy is expected to need preview data, at least it should
not. Part of copy flags cleanup, done in separate commit in case
something goes wrong here...
2019-02-05 10:53:11 +01:00
Bastien Montagne
b26c9dfcb2 Cleanup: initial regrouping of ID create/copy flags.
Those two first sets of flags should represent some common use cases.
The goal here is to reduce verbosity of calls to BKE_id_copy_ex, and
help make it more obvious the 'common behaviours' of ID copying across
codebase.
2019-02-05 09:49:50 +01:00
Bastien Montagne
8ebb8add85 Cleanup: comments before items in enums. 2019-02-05 09:49:50 +01:00
Bastien Montagne
6a686b0bfb Cleanup: BKE_library: rename id_copy to BKE_id_copy.
Time to follow conventions for that one as well.
2019-02-05 09:49:50 +01:00
Bastien Montagne
7636e9785d Cleanup: BKE_library: remove 'test' param of id_copy.
This was used in *one* place only... much better to have a dedicated
helper for that kind of things. ;)
2019-02-05 09:49:50 +01:00
Campbell Barton
999f3985c0 Fix T61107: wmGizmo.test_select can't return -1
This is used to skip selection.
2019-02-05 18:39:57 +11:00
Joshua Leung
49618b0e18 Fix: Ensure that KeyingSet.bl_description field is properly escaped when using the Export to File operator
Previously, if double-quotes appeared in the KeyingSet.bl_description field,
these would cause a syntax error in the resulting .py script export of the
KeyingSet. Since single quotes are even more likely to appear
(e.g. as apostrophes), we now use triple quotes here.

Unreported bug, noticed earlier when investigating T61010.
2019-02-05 16:21:35 +13:00
Campbell Barton
af2d2d4dff Fix T58221: Spin tool w/ merge first/last crashes
Spinning geometry that included non boundary/wire edges
crashed when merge first/last enabled.
2019-02-05 13:30:07 +11:00
Campbell Barton
445433a691 Fix empty object front/back display in perspective views 2019-02-05 10:43:16 +11:00
Campbell Barton
2c84c23a07 Fix T61163: Single sided images show when viewed from side 2019-02-05 10:29:19 +11:00