Commit Graph

75472 Commits

Author SHA1 Message Date
Pablo Vazquez
7b03e45202 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.
2019-02-08 12:52:23 +01:00
Sergey Sharybin
bf2c5217b3 Fix T61231: File open and undo looses unkeyed changes
Only flush copy-on-write to animation when user makes changes.
2019-02-08 12:17:00 +01:00
Campbell Barton
e418777109 DRW: edit-mesh edge clipping broke in recent update 2019-02-08 22:06:14 +11:00
Campbell Barton
2855feb2ae Fix T61196: Mesh select ignores clipping (part 2)
Need to use local clipping planes in this case
2019-02-08 21:52:01 +11:00
Bastien Montagne
0e3475b00d 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.
2019-02-08 10:16:00 +01:00
Campbell Barton
351b24ac14 Fix T58625: Knife project fails w/ curves 2019-02-08 19:18:35 +11:00
Campbell Barton
0822af4c48 WM: init simulated event from win->eventstate
Ghost event handling code works this way.
2019-02-08 19:01:30 +11:00
Campbell Barton
46ac288a93 Cleanup: rename V3D_MANIP_* -> V3D_ORIENT_*
Wasn't obvious it's related to orientation,
also term manipulator is no longer in use.
2019-02-08 15:22:15 +11:00
Campbell Barton
d86894b9e4 Fix T61291: Transform gizmo doesn't update w/ 3D cursor 2019-02-08 15:12:04 +11:00
Campbell Barton
a9853a7e6c Fix missing NULL check in recent version patch 2019-02-08 12:10:56 +11:00
Campbell Barton
3d16a268ee 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
2019-02-08 10:15:11 +11:00
Campbell Barton
e1edb51699 Correct error in last commit 2019-02-08 09:41:28 +11:00
Campbell Barton
261d42cd84 Cleanup: clear deprecated flags 2019-02-08 09:31:59 +11:00
Campbell Barton
7fdda18ca1 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.
2019-02-08 08:42:50 +11:00
Campbell Barton
0abf754748 Cleanup: sort struct blocks, description 2019-02-08 07:29:21 +11:00
Campbell Barton
0021273b31 Fix crash drawing loose vertex from recent changes 2019-02-08 07:27:00 +11:00
Bastien Montagne
dd6dcf8247 Cleanup: Use new BKE_main_foreach_id() in a few more places... 2019-02-07 21:52:54 +01:00
Bastien Montagne
949bc7aa2a 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.
2019-02-07 20:46:53 +01:00
Bastien Montagne
599561de84 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.
2019-02-07 20:46:41 +01:00
Clément Foucault
d2afa51ddc 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.
2019-02-07 20:40:54 +01:00
Clément Foucault
a04dd15193 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.
2019-02-07 20:36:29 +01:00
Clément Foucault
ea30767997 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.
2019-02-07 19:11:01 +01:00
Clément Foucault
7584ef85bf Edit Mode: Fix edge partially displayed as selected with modifier preview
Force set the flag vertice selected in this case.
2019-02-07 19:06:54 +01:00
Clément Foucault
aa7b013bd5 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.
2019-02-07 17:47:55 +01:00
Clément Foucault
a710af2b25 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.
2019-02-07 17:30:10 +01:00
Clément Foucault
9b774dfa3b Edit Mode: Fix geometry shader workaround not respecting aspect ratio 2019-02-07 17:30:10 +01:00
Howard Trickey
dec4f6d7ed Bevel: better attachment points for unbeveled edges, arc miter. 2019-02-07 10:42:28 -05:00
Antonioya
4c42e949e9 GP: Reduce render noise pixel in blend borders 2019-02-07 16:31:03 +01:00
Antonioya
8cc5b68eb1 GP: Cleanup blend pixel function
Clear the function that blend pixels and change parameter.
2019-02-07 16:31:03 +01:00
Sergey Sharybin
9c68ac0448 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
2019-02-07 11:55:07 +01:00
Sergey Sharybin
0885484aa6 Fix T59587: Hair dynamics works different when opened in 2.8
Is a missing do-verisoning code in e3d31b8dfb.

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.
2019-02-07 11:48:42 +01:00
Campbell Barton
937731dff1 Fix T61272: Undo fails to track multi-edit mode enter/exit
Objects leaving edit-mode weren't restored by edit-mode undo steps.
2019-02-07 20:28:33 +11:00
Campbell Barton
075a122190 Fix sculpt undo steps not enabling dyntopo
Logic to disable dyntopo when entering sculpt mode was applied on undo.
2019-02-07 20:28:33 +11:00
Sergey Sharybin
83d78eb32c Close metadata panels by default
They might be rather long, and not that commonly accessed.
2019-02-07 09:38:49 +01:00
Sergey Sharybin
9b86c90193 Fix for images without metadata crashing 2019-02-07 09:34:01 +01:00
Campbell Barton
d6c0f3796a Fix T61049: Undo dynamic topology sculpt asserts 2019-02-07 13:29:59 +11:00
Campbell Barton
a5869c367e Cleanup: remove unnecessary undo function 2019-02-07 10:09:56 +11:00
Campbell Barton
9df4602035 PyAPI: message subscribe option arg now optional 2019-02-07 09:36:52 +11:00
Campbell Barton
f11b5549ea Cleanup: doxy header 2019-02-07 09:36:52 +11:00
Campbell Barton
7325035e60 DRW: support clipping for octahedral & box bones 2019-02-07 08:03:56 +11:00
Campbell Barton
6152f5cd67 Fix refresh on resetting header alignment 2019-02-07 07:49:11 +11:00
Dalai Felinto
5ed27372ab Remove no-longer needed function 2019-02-06 18:48:50 -02:00
Dalai Felinto
db231e87fc Fixup for outliner visibility not changing disable state
Show Inside (shift + click) was still forcing objects to be visible.
2019-02-06 18:48:50 -02:00
Bastien Montagne
ac9daf3a27 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...
2019-02-06 21:13:52 +01:00
Dalai Felinto
766741b0aa 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.
2019-02-06 17:06:16 +00:00
Dalai Felinto
e3a3782d7f 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.
2019-02-06 16:13:40 +00:00
Sergey Sharybin
fb15dfbddf 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.
2019-02-06 17:08:24 +01:00
Sergey Sharybin
49e07dfdfb 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.
2019-02-06 16:38:03 +01:00
Sergey Sharybin
8c87af7440 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
2019-02-06 16:11:51 +01:00
Campbell Barton
e8292466bc DRW: Support edit-metaball clipping 2019-02-07 00:07:30 +11:00