Commit Graph

59995 Commits

Author SHA1 Message Date
Campbell Barton
3eaf77fdd3 Merge branch 'master' into blender2.8 2018-04-05 16:19:43 +02:00
Clément Foucault
1c1dc39466 UI: Node Editor: Make nodelink arrow size and link width dpi dependant. 2018-04-05 16:08:46 +02:00
Clément Foucault
fb8a1a58d9 UI: Node Editor: Batch nodelinks together.
This will do only one drawcall for every 256 nodelinks.
2018-04-05 16:08:46 +02:00
Clément Foucault
72bfa849ee UI: Node Editor: Port nodelink drawing to shader based drawing.
Use the new GPU_SHADER_2D_NODELINK and GPU_SHADER_2D_NODELINK_INST to
accelerate nodelink drawing.

This commit does not include the batching functionnality. So this should
not make a lot of difference.
2018-04-05 16:08:46 +02:00
Clément Foucault
cadef79a52 GPUBatch: Change preset managment system.
Now use a list of preset batches with a function to add new ones to this
list.

This removes the need of new functions all over the place to reset/exit.
2018-04-05 16:08:46 +02:00
Clément Foucault
d48597eb54 GPUShader: Add 2D Nodelink shader.
Special shader to draw nodelinks for the node editor.

We only pass bezier points to the GPU and vertex position is handled inside
the vertex shader.
The arrow is also part of the batch to avoid separate drawcalls for it.

We still draw 2 pass one for shadow and one for the link color on top.

One variation to draw instances of theses links so that we only do one
drawcall.
2018-04-05 16:08:46 +02:00
Campbell Barton
ad1ea9a427 Undo: split text undo steps out of the data-block
This moves undo storage into a separate struct which is passed
in from the undo system.
2018-04-05 15:22:33 +02:00
Campbell Barton
79c3c56894 Undo System: return undo step from undo push init
Also improve logging
2018-04-05 14:11:51 +02:00
Campbell Barton
1761095abc Logging: use -1 log level to log all levels 2018-04-05 13:55:04 +02:00
Campbell Barton
cd474b913b ED_undo: use logging 2018-04-05 13:41:52 +02:00
Campbell Barton
47b6e23271 Fix crash w/ empty text undo operations 2018-04-05 10:01:12 +02:00
Brecht Van Lommel
5fba4458e9 Fix Cycles motion blur and engine.frame_set() not working. 2018-04-04 17:59:46 +02:00
Sergey Sharybin
db3c3d1338 Depsgraph: Fix/workaround crash with animation and drivers and CoW
The issue was caused by component tag forcing CoW component to be run,
without actually flushing changes down the road from the CoW operation.

In a way, this is what we want: we do want CoW to run on changes, but
we don't want tiny change forcing full datablock update.

This commit makes it so order of updates is all correct, but the bigger
issue is still open: what parts of datablock CoW should be updating?

Now it's possible to open spring file and play around.
2018-04-04 17:49:08 +02:00
Bastien Montagne
160e62b88c Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/BKE_object.h
2018-04-04 15:03:55 +02:00
Bastien Montagne
d59c2d12b1 Fix modifier freeing code re. ID refcounting.
Free code should not handle ID refcounting at all. This has to be done
at higher level, since in some case we want to free (temp) data that
actually did not refcount at all its IDs.

This change seems to be working OK, but as usual in that area, only
lots of testing in real-case situation will say whether there are some
hidden bugs or not.
2018-04-04 14:58:52 +02:00
Brecht Van Lommel
59562e5b25 Fix Cycles particle info node not working. 2018-04-04 13:18:06 +02:00
Sergey Sharybin
7db4b935e1 Depsgraph: Cleanup, reduce indentation level 2018-04-04 13:02:28 +02:00
Sergey Sharybin
ef22b837e8 Merge branch 'master' into blender2.8 2018-04-04 12:57:36 +02:00
Sergey Sharybin
0c7ec58966 Depsgraph: Make sure textures used by modifiers are in the graph 2018-04-04 12:56:04 +02:00
Brecht Van Lommel
3a17dab2b1 Fix Eevee crash with generated coordinates on non-objects. 2018-04-04 12:28:20 +02:00
Brecht Van Lommel
9c7bd1fad9 Cleanup: simplify fix for T53497, this part is not strictly needed. 2018-04-04 12:28:20 +02:00
Bastien Montagne
3a566687e1 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenloader/intern/readfile.c
2018-04-04 12:00:57 +02:00
Bastien Montagne
677d699645 Tweak ID->tag reset on file load (no visible change expected!).
Issue was, *some* IDs (like infamous nodetrees from materials etc.)
would not go through the 'main' read_libblock() func, so their tags were
never reset.

So now, we ensure direct_link_id() always clear the tags, and move
setting them in read_libblock() after the call to direct_link_id().

Needed for depsgraph, but general healthier fix actually.
2018-04-04 11:59:16 +02:00
Sergey Sharybin
948f4e8c94 Depsgraph: Get pchan index from correct pose
This code should be replaced with evaluation-time ID block expansion,
but before that it will be helpful to get old design to work again.
2018-04-04 11:55:06 +02:00
Sergey Sharybin
a6999a869e Merge branch 'master' into blender2.8 2018-04-04 11:49:24 +02:00
Sergey Sharybin
c128738926 Depsgraph: Ensure root pchan is always found 2018-04-04 11:49:01 +02:00
Sergey Sharybin
c9ad9b260a Depsgraph: Pass CoW version of object to armature update done 2018-04-04 11:47:33 +02:00
Brecht Van Lommel
fb5a57ab97 Fix part of T53497: Eevee stuttering on macOS for the first few seconds of usage.
The problem was that textures were assigned to different slots on different draw
calls, which caused shader specialization/patching by the driver. So the shader
would be compiled over and over until all possible assignments were used.
2018-04-04 11:30:55 +02:00
Mai Lavelle
3f4df3f847 Fix missing hair in fishycat and everything else after particle recalc changes
The cache was getting reset always, due to special case of flag being 0.

Bug introduced by: 44cd24a9ce
2018-04-04 05:10:47 -04:00
Sergey Sharybin
e217fb439f Merge branch 'master' into blender2.8 2018-04-04 10:36:39 +02:00
Sergey Sharybin
909efe6be5 Depsgraph: Assert that pchan index is always valid 2018-04-04 10:35:32 +02:00
Sergey Sharybin
d54a058f35 Merge branch 'master' into blender2.8 2018-04-04 10:16:38 +02:00
Sergey Sharybin
f913e69093 Depsgraph: Add missing expansion od custom bone shapes
This was fixed in 2.8 branch but not in master.
2018-04-04 10:15:45 +02:00
Sergey Sharybin
eaf8608ba5 Merge branch 'master' into blender2.8 2018-04-04 09:54:50 +02:00
Sergey Sharybin
4674e02562 Depsgraph: Only bind ID-data and indices to depsgraph callbacks
This is a part of copy-on-write sanitization, to avoid all the checks
which were attempting to keep sub-data pointers intact.

Point is: ID pointers never change for CoW datablocks, but nested
data pointers might change when updating existing copy.

Solution: Only bind ID data pointers and index of sub-data.
This will make CoW datablock 7update function was easier in 2.8.

In master we were only using pose channel pointers in callbacks,
this is exactly what this commit addresses. A linear lookup array
is created on pose evaluation init and is thrown away afterwards.

One thing we might consider doing is to keep indexed array of
poses, similar to chanhash.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Subscribers: dfelinto

Differential Revision: https://developer.blender.org/D3124
2018-04-04 09:48:41 +02:00
Campbell Barton
cd6daea7d3 Missed in last merge 2018-04-03 18:22:52 +02:00
Campbell Barton
48eaddfae0 Missed in last merge 2018-04-03 18:22:05 +02:00
Campbell Barton
e52beb3733 Merge branch 'master' into blender2.8 2018-04-03 18:12:39 +02:00
Campbell Barton
ab695c3297 Undo: make id-map use binary search to keep sorted 2018-04-03 18:07:51 +02:00
Campbell Barton
1f0f234b07 Fix own error w/ undo ID lookup
Was testing with small number of items, so this went unnoticed.
2018-04-03 17:58:37 +02:00
Germano
c713e9c472 Draw Manager: Improve description of draw_frustum_boundbox_calc variables 2018-04-03 12:18:56 -03:00
Campbell Barton
b2c9fdfe87 Cleanup: rename BMesh count_ex -> count_at_most 2018-04-03 17:06:36 +02:00
Campbell Barton
bfdb88f3f4 Cleanup: rename list count_ex -> count_at_most 2018-04-03 17:05:21 +02:00
Campbell Barton
06a62d4e06 Undo: use with_prev verisons of id-map lookups 2018-04-03 17:03:33 +02:00
Campbell Barton
5a7deab65a Undo: use general id-map for image undo lookups.
Was doing own name based lookups to keep compatible w/ global undo.
2018-04-03 17:03:33 +02:00
Campbell Barton
75de21f072 Undo System: id-map avoid duplicate add/lookup
Add versions of add/lookup that check the previous item.
2018-04-03 17:03:33 +02:00
Campbell Barton
53f068454e Fix mistake logging w/ undo 2018-04-03 17:03:33 +02:00
Bastien Montagne
6744c34a26 Merge branch 'master' into blender2.8 2018-04-03 16:13:13 +02:00
Bastien Montagne
601835cd31 Fix (unreported) crash when accessing some bl_rna.properties.
E.g. typing `bpy.data.bl_rna.properties[8].<tab>` in console would hard-crash
trying to dereference NULL pointer. Was a missing check in rna_Property_tags_itemf().
2018-04-03 14:32:23 +02:00
Campbell Barton
7e9a80530f Cleanup: remove unused mtexpoly array
Not needed in 2.8
2018-04-03 14:30:12 +02:00