Commit Graph

66544 Commits

Author SHA1 Message Date
Clément Foucault
89ef69d23c Wireframe: Optimization: Output degenerate triangles if no edges 2018-12-04 17:52:32 +01:00
Bastien Montagne
6a0c25b447 Fix T58700: Modifier error msgs not showing.
We need to copy those back from evaluated modifierdata to orig one (as
part of `BKE_object_synchronize_to_original()`).
2018-12-04 17:07:47 +01:00
Bastien Montagne
64474fbc22 Cleanup: typo in comments. 2018-12-04 16:56:54 +01:00
Sergey Sharybin
be91d4ef95 Fix T55774: Crash when reloading clip during prefetch
Simply kill prefetch jobs when reloading. Not sure what else
we can do here..
2018-12-04 16:40:04 +01:00
Sergey Sharybin
cf2e35fcfe Fix T58118: Make duplicates real does nothing
The issue was caused by transflag set in geometry evaluation
never copied back top original object.

Now we have a dedicated operation which does all sort copy
back to original object, so we don't have to worry about
atomic assignments or what gets set where.

Still need to move boundbox to the same function, but it
needs some careful doublechecking first.
2018-12-04 16:04:10 +01:00
Sergey Sharybin
e666ee965c Fix T58227: Subdivision Surface Type Simple messes up UVs
This seems to be a bug in OpenSubdiv. For now simply use Catmark
subdivision scheme with infinitely sharp edges.

Later on it's either gets fixed in OpenSubdiv or we do bilinear
subdivision on our side.
2018-12-04 15:18:37 +01:00
Sergey Sharybin
3d013f7b10 Fix for assert failure in material preview
All localized datablocks are not supposed to have animation
data associated with them.

There was an easy way to reproduce assert failure: toggle
animation decorator for Viewport Display -> Color.
2018-12-04 12:31:32 +01:00
Sergey Sharybin
e6141d7b3b Fix T58117: Crash with keyframing, take two
More operators need to become aware of action possibly being gone.
2018-12-04 12:31:32 +01:00
Alexander Gavrilov
b97cd0e690 Depsgraph: execute all COPY_ON_WRITE nodes first as a separate stage.
COW nodes in the graph are mostly connected via a relation type
that doesn't propagate the update flags. Unfortunately, due to
the scheduling implementation that means the relations don't
actually guarantee execution order for indirect dependencies.
Relations also don't guarantee order in case of cycles.

As mentioned in IRC, the simplest way to fix possible problems
is to execute all COW nodes as a separate execution stage. This
seems to fix crashes with Data Transfer modifier in a cycle.

Staging works by simply delaying actual scheduling of tasks for
non-COW nodes until the second run of schedule_graph.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D4027
2018-12-04 14:08:50 +03:00
Alexander Gavrilov
01581d4a1e BLI_task: fix queue in work_and_wait, and support resetting.
To make the pool more usable for running multiple stages of tasks,
fix local queue handling in BLI_task_pool_work_and_wait.

Specifically, after the wait loop the local queue should be empty,
or the wait part of the function contract isn't fulfilled. Instead,
check and run any tasks in queue before the wait loop.

Also, add a new function that resets the suspended state of the pool.
2018-12-04 14:08:50 +03:00
Bastien Montagne
c86e828eee Fix (IRC reported) missing update for RNA Object's matrix_local property.
Reported by @zeffii, thanks!
2018-12-04 12:06:24 +01:00
Sergey Sharybin
df2635099b Merge branch 'master' into blender2.8 2018-12-04 11:45:22 +01:00
Sergey Sharybin
3f31ec8398 Cleanup: Spelling 2018-12-04 11:43:53 +01:00
Sergey Sharybin
c6f47ffa98 Fix T58117: Crash with keyframing 2018-12-04 11:28:54 +01:00
Bastien Montagne
6330b715ef Fix T58220: EdgeSplit at Split Angle: 0 doesn't split flat faces.
Add special handling for both edge cases (:p):
* 180° is same as no splitting by angle;
* 0° is same as split on all edges unconditionnaly.

In both cases we can also avoid computing poly normals.
2018-12-04 10:51:19 +01:00
Sergey Sharybin
36ca072375 Fix T58481: "Make duplicates real" operator settings crashes 2018-12-04 10:18:21 +01:00
Philipp Oeser
b16f03566b Show tool title for favorites menu 2018-12-04 16:14:21 +11:00
Campbell Barton
61678ca8ae Fix T57076: Remove property from favourites menu fails 2018-12-04 15:11:26 +11:00
Campbell Barton
e7641b6834 Edit last commit
Split out ensure-tool check into its own function.
2018-12-04 14:33:45 +11:00
Campbell Barton
80816fc712 Fix T58256: error message w/ missing Select Box tool
Support space modes not having tools.
2018-12-04 13:55:50 +11:00
Campbell Barton
2ff79613a8 Fix T58670: Spin tool crashes w/o gizmo overlay 2018-12-04 13:00:10 +11:00
Campbell Barton
1b6a394d86 Cleanup: unused args 2018-12-04 10:39:03 +11:00
Campbell Barton
c631782542 Fix T58474: Gizmo Operator template fails on rerun 2018-12-04 10:17:42 +11:00
Charlie Jolly
2c19c9b2f6 GP: Draw Mode: Add Arc Primitive
This adds an elliptical arc primitive.
Press CKEY for toggling closed/open arc.
Press FKEY key for flipping arc.

Additional changes to gpencil primitives.
Increases default edges of circle to 64.
Keymap changes to allow primitives to be drawn with Shift or Alt key.
Allow Plus/Minus key to adjust number of edges.

Missing: Toolbar icon

Differential Revision: https://developer.blender.org/D4024
2018-12-03 22:11:38 +00:00
Brecht Van Lommel
f0432e37ab Fix T58636: repeat image in UV editor not working.
A little too much code got removed in fb24813.
2018-12-03 20:08:20 +01:00
Alexander Gavrilov
9637a17856 Depsgraph: immediately free object's derived caches in the COW step.
After update of the mesh some of that data is so broken that using
it would crash. To reduce the risk of crashes in case of dependency
cycles, clean it up immediately.
2018-12-03 20:48:47 +03:00
Clément Foucault
65779b022d Fix T58280: Blender 2.8 hangs when the LookDev mode is enabled
The hang was due to the nodes being "evaluated" for every incomming link.

Solution: only evaluate once per nodetree.

Also merge the tagging of SSS and SSR into one traversal only.
2018-12-03 17:19:11 +01:00
Clément Foucault
95eca49e54 DRW: Make default debug mode a bit more silent
Use --debug-gpu for debugging non found uniforms
2018-12-03 17:19:11 +01:00
Clément Foucault
0759480529 Workbench: Encode Roughness and metallic into 8bits
This reduces the bandwidth + vram usage of workbench even further.
2018-12-03 17:19:11 +01:00
Clément Foucault
223c1a107a Workbench: Make object ID pass optionnal
We separate the background and foreground shading passes to be able to make
the object id pass optionnal if we don't need it.

This saves a bit more memory. Also not clearing all rendertargets saves
some GPU time too.
2018-12-03 17:19:11 +01:00
Clément Foucault
a022811441 DRW: Make fullscreen quad in the background
This is to be able to only draw the background pixels by using a depth
test EQUAL.
2018-12-03 17:19:11 +01:00
Clément Foucault
d8d52e273e Workbench: Cleanup: Remove Spherical harmonic evaluation
It is not used anymore
2018-12-03 17:19:11 +01:00
Clément Foucault
82f01c666f View3D: Grid: Don't make the Zaxis produce any fragment is not needed
This was a bug that was making the grid drawing even more slower than it
is.
2018-12-03 17:19:11 +01:00
Clément Foucault
24fd03d0c2 Workbench: Reduce VRAM usage depending on mode
We exploit the fact that we are using the metallic workflow for material
and pass the metallic parameter instead of the specular color.

Pack the front facing bit in the color buffer only for matcap display.

Change buffer formats to use less bytes as possible.

Also don't request buffers that we won't use.

Saved 40MB on 2K screen on StudioLight + Shadows + Specular Lighting.

Includes several cleanups.
2018-12-03 17:19:11 +01:00
Sergey Sharybin
17a4323ef5 Subdiv: Set edge render flags according to Optimal Display
This is a part of T58609, but work is still needed to properly
support this flag in the draw manager.
2018-12-03 17:05:28 +01:00
Alexander Gavrilov
bb16167fd8 Depsgraph: completely move customdata_mask to the ID node.
Move all mask-related fields from Object and OperationDepsNode
to Object_Runtime and IDDepsNode. Auto-apply DEG_TAG_GEOMETRY
if the mask changes after DEG rebuild. Update DEG API and all
code that uses it.

This fixes "source mesh data is not ready" errors from Data
Transfer modifier when parameters are changed in the UI after
the recent mesh_get_eval_final fix.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D4025
2018-12-03 18:29:06 +03:00
Antonioya
fadad895b2 T58338 Edit Mode rotation doesn't work if object is far away from world origin
The fix code was done by Brecht Van Lommel, I only tested that the solution works.
2018-12-03 16:26:52 +01:00
Bastien Montagne
3235a3081c Fix T57858: Add validation callback to CustomData layers.
Our mesh validation was only checking cd layout so far, not their actual
data. While this might only be needed for a few types, this is a
required addition for things like imported UVs, else we have no way to
avoid nasty things like NANs & co.

Note that more layer types may need that callback, time will say. For
now added it to some obvious missing cases...
2018-12-03 16:22:27 +01:00
Bastien Montagne
957435785c Cleanup: Use BLI's is_finite_v helpers instead of manualy checking each item. 2018-12-03 16:22:27 +01:00
Sergey Sharybin
f880b60353 Depsgraph: Add missing cache file handling in build_id() 2018-12-03 16:05:17 +01:00
Alexander Gavrilov
95be6826e3 Data Transfer Modifier: fix mesh_get_eval_final usage.
It can't be used during modifier evaluation, and rna
enum code should access the evaluated objects.
2018-12-03 17:01:02 +03:00
Alexander Gavrilov
1983a52e04 Depsgraph: assert that mesh_get_eval_final/deform aren't used in eval.
Using those functions during multithreaded evaluation is a sure
way to have a race condition and crash.
2018-12-03 17:01:02 +03:00
Philipp Oeser
764e937d1a Fix T58258: Select Objects in Collection not working
Maniphest Tasks: T58258

Differential Revision: https://developer.blender.org/D4023
2018-12-03 14:19:52 +01:00
Campbell Barton
40f4343679 3D View: remove non tool-system ruler
There was duplicate code for the ruler being accessed
as a tool and an operator.

Remove the modal operator code in favor of tool access.
2018-12-03 21:21:36 +11:00
Campbell Barton
1ac7a840f6 Fix T58594: Modal circle select can't select & de-select 2018-12-03 19:32:42 +11:00
Campbell Barton
d89faac7d2 Merge branch 'master' into blender2.8 2018-12-03 19:31:54 +11:00
Antonioya
63d0ea8ecf Fix T58535 Crash on Load
The particles was not ready when the drawing cache try to use it.
2018-12-03 09:12:29 +01:00
Campbell Barton
6bb825e083 Fix T54580: Pointer buttons skip undo push 2018-12-03 18:43:33 +11:00
Campbell Barton
599f6c791a Merge branch 'master' into blender2.8 2018-12-03 18:07:50 +11:00
Campbell Barton
be2e549111 Use scene active object for sculptmode enter/exit calls
Match logic in previous commit.
2018-12-03 18:00:20 +11:00