blender.git
23 months agoFix T61287: Object restrict viewport ignored in instanced collection
Dalai Felinto [Fri, 8 Feb 2019 15:51:13 +0000 (13:51 -0200)]
Fix T61287: Object restrict viewport ignored in instanced collection

make_duplis_collection() depends on the collection object cache,
which was not freed upon object viewport disable change.

The best way to reproduce the bug was to instance the default
collection, disable the cube, save and re-open the file.
Now even if you set the original cube to be enabled, you wouldn't see
the instanced one until you forced collection cache to be freed (e.g.,
changing a collection disable state.

23 months agoUI: Marker position slightly offset.
Pablo Vazquez [Fri, 8 Feb 2019 15:18:46 +0000 (16:18 +0100)]
UI: Marker position slightly offset.

Tested on various interface sizes and thick lines.

Reported by Blender Studio animators.

23 months agoFix T59339: Particle render without baking issues
Sergey Sharybin [Fri, 8 Feb 2019 14:05:29 +0000 (15:05 +0100)]
Fix T59339: Particle render without baking issues
Fix T61289: Emitting particles from instances not working properly

The first issue has been re-introduced by a code which was dealing
with missing hair after opening the file. That was re-setting all
particle systems all the time because modifier flags were not copied
back to original. This made every modifier run to be seem as an
initial file open.

Now we copy flags back to an original modifier. But also we are
trying to not do any resets unless needed in that case. This way
we can preserve in-memory caches.

Other part of the change is related on re-setting particle system
if number of mesh elements changed. But we only do it if the
modifier has been already evaluated once.

23 months agoBevel, fix crash when adjust offsets with inner arc miter.
Howard Trickey [Fri, 8 Feb 2019 14:24:43 +0000 (09:24 -0500)]
Bevel, fix crash when adjust offsets with inner arc miter.

Previous assumptions about boundary verts always being attached
to edges are now false.

23 months agoBevel: fix regression re even adjustment of offsets.
Howard Trickey [Fri, 8 Feb 2019 14:02:29 +0000 (09:02 -0500)]
Bevel: fix regression re even adjustment of offsets.

Mistakenly had left a debugging assignment that disabled
the offset pass. This commit re-enables it.

23 months agoFix T61309: mesh_utils.triangle_random_points fails with a TypeError
Philipp Oeser [Fri, 8 Feb 2019 12:08:01 +0000 (13:08 +0100)]
Fix T61309: mesh_utils.triangle_random_points fails with a TypeError

Caused by an error in rBe65784a0519e.
And since we are going over loop triangles anyways, we can remove the
part quecking for quads [remainder of tessface era] entirely.

Reviewers: campbellbarton

Maniphest Tasks: T61309

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

23 months agoDRW: support clipping for stick & wire bones
Campbell Barton [Fri, 8 Feb 2019 11:51:37 +0000 (22:51 +1100)]
DRW: support clipping for stick & wire bones

23 months agoTypo
Pablo Vazquez [Fri, 8 Feb 2019 11:55:54 +0000 (12:55 +0100)]
Typo

23 months agoUI: Icons for some Outliner context menu operations
Pablo Vazquez [Fri, 8 Feb 2019 11:52:17 +0000 (12:52 +0100)]
UI: Icons for some Outliner context menu operations

Mainly 'X' icon for Delete, which was already on modifiers and constraints,
but not for objects. Select icon for object selection and refresh for library reload.

23 months agoUI: Move View operations to submenu in Outliner context menu
Pablo Vazquez [Fri, 8 Feb 2019 11:37:45 +0000 (12:37 +0100)]
UI: Move View operations to submenu in Outliner context menu

Show One Level, Hide One Level, Show Active, Show Hierarchy were taking
four items on the context menu when they are not accessed that often
from the context menu (they all have shortcuts).

The "View" name is used to match other editors View menus.

23 months agoUI: Icons for basic operations in Outliner context menu
Pablo Vazquez [Fri, 8 Feb 2019 11:35:36 +0000 (12:35 +0100)]
UI: Icons for basic operations in Outliner context menu

Mainly the first of their category or when they need to be highlighted:
* Delete
* Enable Viewport/Render (match icons to make a visual connection)
* ViewLayers (it's used pretty often so it makes it easier to find)

Also group Show/Show All, Hide/Hide All together.

23 months agoFix T61231: File open and undo looses unkeyed changes
Sergey Sharybin [Fri, 8 Feb 2019 11:13:02 +0000 (12:13 +0100)]
Fix T61231: File open and undo looses unkeyed changes

Only flush copy-on-write to animation when user makes changes.

23 months agoDRW: edit-mesh edge clipping broke in recent update
Campbell Barton [Fri, 8 Feb 2019 11:06:14 +0000 (22:06 +1100)]
DRW: edit-mesh edge clipping broke in recent update

23 months agoFix T61196: Mesh select ignores clipping (part 2)
Campbell Barton [Fri, 8 Feb 2019 10:50:07 +0000 (21:50 +1100)]
Fix T61196: Mesh select ignores clipping (part 2)

Need to use local clipping planes in this case

23 months agoFix T61255: Mesh Data Transfer: Do not abort when destination has not all source...
Bastien Montagne [Fri, 8 Feb 2019 09:12:31 +0000 (10:12 +0100)]
Fix T61255: Mesh Data Transfer: Do not abort when destination has not all source data layers.

Originally, when transferring all source data layers to destination
meshes, code would abort in case destination did not have all needed
layers, and creating them was not allowed.

Now, it will instead transfer data to layers that exists, merely
skipping source ones for which it cannot find a matching destination.

23 months agoFix T58625: Knife project fails w/ curves
Campbell Barton [Fri, 8 Feb 2019 08:18:35 +0000 (19:18 +1100)]
Fix T58625: Knife project fails w/ curves

23 months agoWM: init simulated event from win->eventstate
Campbell Barton [Fri, 8 Feb 2019 08:00:51 +0000 (19:00 +1100)]
WM: init simulated event from win->eventstate

Ghost event handling code works this way.

23 months agoCleanup: rename V3D_MANIP_* -> V3D_ORIENT_*
Campbell Barton [Fri, 8 Feb 2019 04:14:54 +0000 (15:14 +1100)]
Cleanup: rename V3D_MANIP_* -> V3D_ORIENT_*

Wasn't obvious it's related to orientation,
also term manipulator is no longer in use.

23 months agoFix T61291: Transform gizmo doesn't update w/ 3D cursor
Campbell Barton [Fri, 8 Feb 2019 04:11:33 +0000 (15:11 +1100)]
Fix T61291: Transform gizmo doesn't update w/ 3D cursor

23 months agoFix missing NULL check in recent version patch
Campbell Barton [Fri, 8 Feb 2019 01:06:55 +0000 (12:06 +1100)]
Fix missing NULL check in recent version patch

23 months agoUndo System: basic support in background mode
Campbell Barton [Thu, 7 Feb 2019 23:15:11 +0000 (10:15 +1100)]
Undo System: basic support in background mode

Some developers were using undo for their scripts, this allows for undo
pushes in background mode, however - as with 2.7x, undo isn't
initialized at startup in background mode.

See replies to T60934

23 months agoCorrect error in last commit
Campbell Barton [Thu, 7 Feb 2019 22:39:54 +0000 (09:39 +1100)]
Correct error in last commit

23 months agoCleanup: clear deprecated flags
Campbell Barton [Thu, 7 Feb 2019 22:29:08 +0000 (09:29 +1100)]
Cleanup: clear deprecated flags

23 months agoRemove "Keep Session" preference
Campbell Barton [Thu, 7 Feb 2019 21:36:52 +0000 (08:36 +1100)]
Remove "Keep Session" preference

As far as we know this wasn't widely used, and relied no storing data
in the temp dir which may be cleared on reboot.

More generally, alternative behavior for a core area like file IO
is not something to keep if it has unresolved issues.

See D4310 for details.

23 months agoCleanup: sort struct blocks, description
Campbell Barton [Thu, 7 Feb 2019 20:29:21 +0000 (07:29 +1100)]
Cleanup: sort struct blocks, description

23 months agoFix crash drawing loose vertex from recent changes
Campbell Barton [Thu, 7 Feb 2019 20:25:59 +0000 (07:25 +1100)]
Fix crash drawing loose vertex from recent changes

23 months agoCleanup: Use new BKE_main_foreach_id() in a few more places...
Bastien Montagne [Thu, 7 Feb 2019 20:52:54 +0000 (21:52 +0100)]
Cleanup: Use new BKE_main_foreach_id() in a few more places...

23 months agoOutliner: modernize Purge operator.
Bastien Montagne [Thu, 7 Feb 2019 16:17:24 +0000 (17:17 +0100)]
Outliner: modernize Purge operator.

That guy was still from the era where only way to remove an ID was to
save & reload the .blend file. Use modern code instead, should also be
much, much more efficient in big production files.

And that’s another nice occasion to add/test new batch ID deletion code, too. ;)

Related to T61276 Make Single User unlinks original object.

23 months agoBKE_main: add utils to loop over whole IDs of a given Main database.
Bastien Montagne [Thu, 7 Feb 2019 16:16:15 +0000 (17:16 +0100)]
BKE_main: add utils to loop over whole IDs of a given Main database.

We are currently having the same boiler plate code in tens of places
accross our code, we can as well have a utils to do that.

23 months agoEdit Mode: Draw Vertices after edges
Clément Foucault [Thu, 7 Feb 2019 19:40:54 +0000 (20:40 +0100)]
Edit Mode: Draw Vertices after edges

This avoid edges covering a part of vertices.

This comes at a (very minor) perf cost as vertices can cover some edges
pixels and early discard them with the depth test. But this only happens
in artificialy dense mesh and is not a real problem for common cases.

23 months agoEdit Mesh: Only draw vertices once
Clément Foucault [Thu, 7 Feb 2019 19:36:29 +0000 (20:36 +0100)]
Edit Mesh: Only draw vertices once

Only add each vertices to point ibo once. That requires tagging each mvert
in the case of modifier preview.

23 months agoEdit Mode: Reduce number of edges drawn
Clément Foucault [Thu, 7 Feb 2019 18:11:01 +0000 (19:11 +0100)]
Edit Mode: Reduce number of edges drawn

This make sure only one line is drawn per edge.

It makes the function mesh_create_edit_loops_points_lines() non-thread safe
but this is fine as of now because nothing is multithreaded at this point.
Also this is the only function use this flag so it might be OK.

The side effect is that we don't need to use depth test in edit mode
overlay so the masking artifact will not appear.

23 months agoEdit Mode: Fix edge partially displayed as selected with modifier preview
Clément Foucault [Thu, 7 Feb 2019 18:06:34 +0000 (19:06 +0100)]
Edit Mode: Fix edge partially displayed as selected with modifier preview

Force set the flag vertice selected in this case.

23 months agoEdit Mode: Make active face hint part of the face color
Clément Foucault [Thu, 7 Feb 2019 16:47:55 +0000 (17:47 +0100)]
Edit Mode: Make active face hint part of the face color

This remove the hint on the face edges. This is because the hint was
displayed on both sides and was requiring to draw every edges twice.

23 months agoEdit Mesh: Rework new implementation and use geometry shader to draw lines
Clément Foucault [Thu, 7 Feb 2019 15:30:08 +0000 (16:30 +0100)]
Edit Mesh: Rework new implementation and use geometry shader to draw lines

This make it (theoriticaly) compatible with all supported hardware with
consistent results.

Also we now draw the lines with analytic anti-aliasing instead of relying
on MSAA (which offers less benefits in our case).

The remaining aliasing comes from edges cut in half by the mesh which is
not rendered with MSAA. Hopefully this is not too much distracting and only
happen if the face is almost parallel to the view.

23 months agoEdit Mode: Fix geometry shader workaround not respecting aspect ratio
Clément Foucault [Wed, 6 Feb 2019 14:20:27 +0000 (15:20 +0100)]
Edit Mode: Fix geometry shader workaround not respecting aspect ratio

23 months agoBevel: better attachment points for unbeveled edges, arc miter.
Howard Trickey [Thu, 7 Feb 2019 15:42:28 +0000 (10:42 -0500)]
Bevel: better attachment points for unbeveled edges, arc miter.

23 months agoGP: Reduce render noise pixel in blend borders
Antonioya [Thu, 7 Feb 2019 15:30:42 +0000 (16:30 +0100)]
GP: Reduce render noise pixel in blend borders

23 months agoGP: Cleanup blend pixel function
Antonioya [Thu, 7 Feb 2019 15:06:01 +0000 (16:06 +0100)]
GP: Cleanup blend pixel function

Clear the function that blend pixels and change parameter.

23 months agoMerge branch 'blender2.7'
Brecht Van Lommel [Thu, 7 Feb 2019 14:49:41 +0000 (15:49 +0100)]
Merge branch 'blender2.7'

23 months agoWindows: refactor GHOST wintab handling.
Brecht Van Lommel [Mon, 14 Jan 2019 18:12:02 +0000 (19:12 +0100)]
Windows: refactor GHOST wintab handling.

This is backporting a change from 2.8, which may help solve crashes when
activating a window. Previously bringTabletContextToFront() would call
tablet API functions with NULL tablet, which may crash on some drivers.

Ref T60811.

23 months agoFix object.users_collection not including scene collections.
Brecht Van Lommel [Thu, 7 Feb 2019 11:59:40 +0000 (12:59 +0100)]
Fix object.users_collection not including scene collections.

23 months agoShow all useful metadata fields in editors
Sergey Sharybin [Thu, 7 Feb 2019 09:08:01 +0000 (10:08 +0100)]
Show all useful metadata fields in editors

Is available when doing "View -> Show Metadata". Will draw all the
fields which are not part of the stamp at the bottom of the image.

Couple of hand-picked fields are ignored, since those are not very
useful to be seen.

Aimed to ease review of rendered shots.

Reviewers: brecht

Reviewed By: brecht

Subscribers: fsiddi

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

23 months agoFix T59587: Hair dynamics works different when opened in 2.8
Sergey Sharybin [Thu, 7 Feb 2019 10:46:17 +0000 (11:46 +0100)]
Fix T59587: Hair dynamics works different when opened in 2.8

Is a missing do-verisoning code in e3d31b8dfbd.

Unfortunately, at this point it is rather tricky to tell old and new
hair dynamics modifiers apart. Probably easier to accept possible
breackage of the files which were created in 2.7 and saved during
2.8 which had incomplete do-version code.

23 months agoFix T61272: Undo fails to track multi-edit mode enter/exit
Campbell Barton [Thu, 7 Feb 2019 09:27:11 +0000 (20:27 +1100)]
Fix T61272: Undo fails to track multi-edit mode enter/exit

Objects leaving edit-mode weren't restored by edit-mode undo steps.

23 months agoFix sculpt undo steps not enabling dyntopo
Campbell Barton [Thu, 7 Feb 2019 06:54:53 +0000 (17:54 +1100)]
Fix sculpt undo steps not enabling dyntopo

Logic to disable dyntopo when entering sculpt mode was applied on undo.

23 months agoClose metadata panels by default
Sergey Sharybin [Thu, 7 Feb 2019 08:38:49 +0000 (09:38 +0100)]
Close metadata panels by default

They might be rather long, and not that commonly accessed.

23 months agoFix for images without metadata crashing
Sergey Sharybin [Thu, 7 Feb 2019 08:33:43 +0000 (09:33 +0100)]
Fix for images without metadata crashing

23 months agoFix T61049: Undo dynamic topology sculpt asserts
Campbell Barton [Thu, 7 Feb 2019 02:22:31 +0000 (13:22 +1100)]
Fix T61049: Undo dynamic topology sculpt asserts

23 months agoCleanup: remove unnecessary undo function
Campbell Barton [Wed, 6 Feb 2019 23:09:56 +0000 (10:09 +1100)]
Cleanup: remove unnecessary undo function

23 months agoPyAPI: message subscribe option arg now optional
Campbell Barton [Wed, 6 Feb 2019 22:29:01 +0000 (09:29 +1100)]
PyAPI: message subscribe option arg now optional

23 months agoCleanup: doxy header
Campbell Barton [Wed, 6 Feb 2019 22:28:21 +0000 (09:28 +1100)]
Cleanup: doxy header

23 months agoFix T61246: studiolights (un)install problems
Philipp Oeser [Wed, 6 Feb 2019 21:51:29 +0000 (22:51 +0100)]
Fix T61246: studiolights (un)install problems

- studiolights were not installed to their proper subfolder (thus not
recognized on blender restart)
- they were actually loaded with a wrong path which could lead to
deletion of the original source file when uninstalled again

23 months agoDRW: support clipping for octahedral & box bones
Campbell Barton [Wed, 6 Feb 2019 20:44:12 +0000 (07:44 +1100)]
DRW: support clipping for octahedral & box bones

23 months agoFix refresh on resetting header alignment
Campbell Barton [Wed, 6 Feb 2019 20:42:07 +0000 (07:42 +1100)]
Fix refresh on resetting header alignment

23 months agoRemove no-longer needed function
Dalai Felinto [Wed, 6 Feb 2019 20:47:47 +0000 (18:47 -0200)]
Remove no-longer needed function

23 months agoFixup for outliner visibility not changing disable state
Dalai Felinto [Wed, 6 Feb 2019 20:46:48 +0000 (18:46 -0200)]
Fixup for outliner visibility not changing disable state

Show Inside (shift + click) was still forcing objects to be visible.

23 months agoFix (unreported) crash when iterating on depsgraph instances from RNA.
Bastien Montagne [Wed, 6 Feb 2019 19:59:29 +0000 (20:59 +0100)]
Fix (unreported) crash when iterating on depsgraph instances from RNA.

This is a follow-up to rBb44e6f2b3d32, for some reason that issue was
not detected back then: in some cases, DEG_iterator_objects_next() will
free the temp list of dupli objects once it does not need it anymore,
henceforth freeing the dupli_object_current memory of the DEGObjectIterData
that we are storing in the RNA_Depsgraph_Instances_Iterator struct.

And yes, the uglyness of that hack is getting even better now...

Found while trying to export dupliobjects with FBX...

23 months agoOutliner visibility: Respect original viewport enable/disable state
Dalai Felinto [Wed, 6 Feb 2019 16:52:40 +0000 (16:52 +0000)]
Outliner visibility: Respect original viewport enable/disable state

Note: We still change it to the collection we are directly isolating/making
visible and its parents (in the case of isolating). But no longer its children.

Feedback and discussion on D4011. The motivation is that if we don't keep those
locked the disable state becomes useless.

23 months agoOutliner visibility unification: Prevent master collection visibility to change
Dalai Felinto [Wed, 6 Feb 2019 16:12:25 +0000 (16:12 +0000)]
Outliner visibility unification: Prevent master collection visibility to change

Also satinizing the checks for master collection. The outliner tree
iterators already take care of not including the master collection
there.

23 months agoDepsgraph: Fix dependency cycle when rigid body is involved
Sergey Sharybin [Wed, 6 Feb 2019 16:04:29 +0000 (17:04 +0100)]
Depsgraph: Fix dependency cycle when rigid body is involved

Was introduced by point cache reset on manual edits. Needed to
split evaluation and introduce an explicit init key, which allows
to hook up relations which are "monitoring" manual edits to the
channel.

Noticed while looking into T61190.

23 months agoFix T61190: Crash in particles distribution
Sergey Sharybin [Wed, 6 Feb 2019 15:38:03 +0000 (16:38 +0100)]
Fix T61190: Crash in particles distribution

Was visible with certain configuration only, is a numeric
instability caused by degenerate ray direction.

Not sure the distribution is correct, just fixing crash
which was caused by usage of watertight intersection.

23 months agoImprovements and fixes to Cycles metadata
Sergey Sharybin [Wed, 6 Feb 2019 10:49:41 +0000 (11:49 +0100)]
Improvements and fixes to Cycles metadata

This is a request by the studio here to make it possible to see how
many samples were used to render a specific shot or a frame. It is a
bit more tricky than simply stamping number of samples from a scene
since rendering is happening in multiple ranges of samples.

This change makes it so Cycles saves configured number of samples for
the specific view layer, and also stores start sample and number of
samples when rendering only a subrange of all samples.

The format used is "cycles.<view_layer_name>.><field>", which allows
to have information about all layers in a multi-layer EXR file.

Ideally we can store simplified "cycles.<field>" if we know that there
is only one render layer in the file, but detecting this is somewhat
tricky since Cycles operates on an evaluated scene which always have
single view layer.

The metadata is shown in the Metadata panels for clip, image and
sequencer spaces.

Example screenshot which shows the metadata:

{F6527727}

Reviewers: brecht

Reviewed By: brecht

Subscribers: fsiddi

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

23 months agoMerge branch 'blender2.7'
Brecht Van Lommel [Wed, 6 Feb 2019 14:22:53 +0000 (15:22 +0100)]
Merge branch 'blender2.7'

23 months agoCycles: animation denoising support in the kernel.
Lukas Stockner [Wed, 6 Feb 2019 13:19:20 +0000 (14:19 +0100)]
Cycles: animation denoising support in the kernel.

This is the internal implementation, not available from the API or
interface yet. The algorithm takes into account past and future frames,
both to get more coherent animation and reduce noise.

Ref D3889.

23 months agoCycles: tweak outlier detection, preparing for animation denoising.
Lukas Stockner [Wed, 6 Feb 2019 13:42:32 +0000 (14:42 +0100)]
Cycles: tweak outlier detection, preparing for animation denoising.

Ref D3889.

23 months agoCycles: prefilter feature passes separate from denoising.
Lukas Stockner [Wed, 6 Feb 2019 11:42:10 +0000 (12:42 +0100)]
Cycles: prefilter feature passes separate from denoising.

Prefiltering of feature passes will happen during rendering, which can
then be used for denoising immediately or written as a render pass for
later (animation) denoising.

The number of denoising data passes written is reduced because of this,
leaving out the feature variance passes. The passes are now Normal,
Albedo, Depth, Shadowing, Variance and Intensity.

Ref D3889.

23 months agoDRW: Support edit-metaball clipping
Campbell Barton [Wed, 6 Feb 2019 13:07:30 +0000 (00:07 +1100)]
DRW: Support edit-metaball clipping

23 months agoDRW: Support edit-curve clipping
Campbell Barton [Wed, 6 Feb 2019 12:19:39 +0000 (23:19 +1100)]
DRW: Support edit-curve clipping

23 months agoFix T57342: Crash on render with workbench render engine via command line
Clément Foucault [Wed, 6 Feb 2019 11:10:11 +0000 (12:10 +0100)]
Fix T57342: Crash on render with workbench render engine via command line

23 months agoCleanup: Remove deprecated ghosting code
Jacques Lucke [Wed, 6 Feb 2019 11:05:34 +0000 (12:05 +0100)]
Cleanup: Remove deprecated ghosting code

Most of this code is deprecated for many years already and does not
work at all in Blender 2.8.

Reviewers: brecht, aligorith

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

23 months agoFix T60935: More numerically stable distance to ray computation
Jacques Lucke [Wed, 6 Feb 2019 10:47:46 +0000 (11:47 +0100)]
Fix T60935: More numerically stable distance to ray computation

The old function was numerically very unstable for 2 reasons:
computing the square and then subtracting the results.

In the example in T60935 all precision was lost and it returned the distance 0
for all points.

I also removed the `depth` parameter since it wasn't used and computing
it would have made the code more complicated.

Reviewers: brecht, campbellbarton

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

23 months agoUI: tweak header position button
Campbell Barton [Wed, 6 Feb 2019 10:39:06 +0000 (21:39 +1100)]
UI: tweak header position button

Be less prominent.

23 months agoFix T61136: Header alignment preference has no effect
Campbell Barton [Wed, 6 Feb 2019 10:15:39 +0000 (21:15 +1100)]
Fix T61136: Header alignment preference has no effect

Users expect this to apply to existing files,
adjust this to apply on load, defaults to off.

23 months agoClip editor: Fix drawing metadata for RGBA images
Sergey Sharybin [Wed, 6 Feb 2019 09:48:09 +0000 (10:48 +0100)]
Clip editor: Fix drawing metadata for RGBA images

Need to disable blending prior to drawing metadata. Otherwise
text will be drawn on a transparent background.

23 months agoCleanup: Spelling in comment
Sergey Sharybin [Wed, 6 Feb 2019 09:10:59 +0000 (10:10 +0100)]
Cleanup: Spelling in comment

23 months agoFix T61124: Lag on physics simulation
Sergey Sharybin [Wed, 6 Feb 2019 09:09:00 +0000 (10:09 +0100)]
Fix T61124: Lag on physics simulation

Need to synchronize simulated frame back to original object.

Solves the lag during transformation, but amount of floppyness is
lower for some reason. Final animated object behaves the same as
in older Blender though.

23 months agoFix T61051: crash with multi-object mixed mode snapping
Philipp Oeser [Thu, 31 Jan 2019 12:01:52 +0000 (13:01 +0100)]
Fix T61051: crash with multi-object mixed mode snapping

rBec3357e03ab1 introduced multi-object snapping.
Seems like this was done without mixed-mode selections in mind.

So code assumed that all selected objects are actually armatures [which
can fail].
In 2.7 this was not a problem, because code only took active object into
account, 2.8 was iterating over all selected_editable_objects.

Now just iterate over objects in posemode instead

Reviewers: brecht, dfelinto

Maniphest Tasks: T61051

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

23 months agoCleanup: remove unused toolbox delay preferences
Campbell Barton [Wed, 6 Feb 2019 07:18:54 +0000 (18:18 +1100)]
Cleanup: remove unused toolbox delay preferences

23 months agoCleanup: use '_pad' prefix for padding vars
Campbell Barton [Wed, 6 Feb 2019 07:15:58 +0000 (18:15 +1100)]
Cleanup: use '_pad' prefix for padding vars

23 months agoCleanup: manually apply changes missed last commit
Campbell Barton [Wed, 6 Feb 2019 04:52:04 +0000 (15:52 +1100)]
Cleanup: manually apply changes missed last commit

Automatic edits failed for indented comment blocks,
removed indentation & adjusted.

23 months agoCleanup: remove redundant doxygen \file argument
Campbell Barton [Wed, 6 Feb 2019 04:42:22 +0000 (15:42 +1100)]
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.

23 months agoDoxygen: don't warn on undocumented params
Campbell Barton [Wed, 6 Feb 2019 04:02:07 +0000 (15:02 +1100)]
Doxygen: don't warn on undocumented params

We don't attempt to have docs for all args, so don't warn about this.

23 months agoDoxygen: update doxyfile
Campbell Barton [Wed, 6 Feb 2019 04:01:04 +0000 (15:01 +1100)]
Doxygen: update doxyfile

23 months agoCleanup: remove deprecated/unused preferences DNA
Campbell Barton [Wed, 6 Feb 2019 03:34:00 +0000 (14:34 +1100)]
Cleanup: remove deprecated/unused preferences DNA

23 months agoCleanup: use doxy headers for preference comments
Campbell Barton [Wed, 6 Feb 2019 03:23:08 +0000 (14:23 +1100)]
Cleanup: use doxy headers for preference comments

23 months agoFix T61191: First undo step missing in text editor
Campbell Barton [Wed, 6 Feb 2019 01:55:26 +0000 (12:55 +1100)]
Fix T61191: First undo step missing in text editor

23 months agoUndo System: remove accumulate/store modes
Campbell Barton [Tue, 5 Feb 2019 03:24:11 +0000 (14:24 +1100)]
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.

23 months agoFix T61196: Mesh select ignores clipping
Campbell Barton [Tue, 5 Feb 2019 23:33:14 +0000 (10:33 +1100)]
Fix T61196: Mesh select ignores clipping

Select clipping now works when x-ray is disabled.

23 months agoGPU: refactor clipped drawing from DRW into GPU
Campbell Barton [Tue, 5 Feb 2019 22:15:16 +0000 (09:15 +1100)]
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.

23 months agoCleanup: style
Campbell Barton [Tue, 5 Feb 2019 22:14:11 +0000 (09:14 +1100)]
Cleanup: style

23 months agoOutliner visibility unification: Implement 3 levels of viewport visibility
Dalai Felinto [Fri, 30 Nov 2018 04:24:06 +0000 (02:24 -0200)]
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.

23 months agoOutliner: eyes for collection affect collection visibility
Dalai Felinto [Thu, 29 Nov 2018 21:43:52 +0000 (19:43 -0200)]
Outliner: eyes for collection affect collection visibility

As oppose to affect the collection objects' visibility.

23 months agoOutliner: Gray out collections only when they are invisible
Dalai Felinto [Thu, 29 Nov 2018 20:56:10 +0000 (18:56 -0200)]
Outliner: Gray out collections only when they are invisible

Re-factor of 4521d3e7074d.

23 months agoFix/workaround issues in pose and edit mode
Sergey Sharybin [Wed, 28 Nov 2018 09:36:07 +0000 (10:36 +0100)]
Fix/workaround issues in pose and edit mode

[re-committing]

Edit mode was unable to select, pose mode was unable to move bones.

23 months agoPer view-layer collection visibility
Dalai Felinto [Wed, 28 Nov 2018 02:49:36 +0000 (00:49 -0200)]
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.

23 months agoFix T61204: Can't select Camera in stereoscopy mode
Dalai Felinto [Tue, 5 Feb 2019 20:37:42 +0000 (18:37 -0200)]
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.

23 months agoUI: make drag lock work also when buttons have > 2 states or use callbacks.
Brecht Van Lommel [Tue, 5 Feb 2019 19:03:55 +0000 (20:03 +0100)]
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.

23 months agoFix new EEVEE bloom / motion blur defaults not being applied to startup.blend.
Brecht Van Lommel [Tue, 5 Feb 2019 13:01:45 +0000 (14:01 +0100)]
Fix new EEVEE bloom / motion blur defaults not being applied to startup.blend.

23 months agoFix strict compiler warning, breaking MSVC
Sergey Sharybin [Tue, 5 Feb 2019 16:02:01 +0000 (17:02 +0100)]
Fix strict compiler warning, breaking MSVC