Commit Graph

54344 Commits

Author SHA1 Message Date
Dalai Felinto
a8553c9fa2 Silence warning on subsurf modifier 2017-10-20 18:16:34 -02:00
Sergey Sharybin
1beebcb10c Depsgraph: Reduce number of depsgraph_legacy usages outside of depsgraph 2017-10-20 17:01:35 +02:00
Sergey Sharybin
4f3d9a09fe Depsgraph: Make depsgraph a part of evaluation context
This way evaluation routines will know which exact depsgraph evaluation
is happening for.

Mainly needed to get evaluation flags associated with ID nodes.
2017-10-20 16:50:58 +02:00
Sergey Sharybin
cdd1e86499 Fix/workaround wrong dependency graph being constructed after creating a proxy 2017-10-20 16:15:30 +02:00
Sergey Sharybin
0fdc0f8bbd Depsgraph: Introduce hash of dependency graphs in the scene level
The idea is following: we do need to have multiple dependency graphs to denote
different scene layers (depsgraph should only contain objects from a specific
scene layer), and we also want to support same scene layer to be evaluated to
a different state in different windows. In order to achieve that we do need to
have a list or hash (for faster lookup presumably) somewhere. To keep things
easier for now, it will be a scene which owns that hash. This seems to make
sense anyway, since dependency graph only points to data which is owned by
scene.

This commit only introduces some basic API and hash itself stored in DNA, there
is no changes in behavior. See this as a first step towards getting rid of
scene-global dependency graph.
2017-10-20 12:28:25 +02:00
Sergey Sharybin
86d75d5d98 Depsgraph: Remove redundant call of depsgraph free 2017-10-20 12:10:29 +02:00
Sergey Sharybin
e665c3a3f6 Remove unused dependency graph flags from scene 2017-10-20 11:30:39 +02:00
Sergey Sharybin
3beea71b07 Remove some residue of old legacy dependency graph 2017-10-20 11:26:00 +02:00
Campbell Barton
c45b8a65b4 Merge branch 'master' into blender2.8 2017-10-20 14:14:44 +11:00
Campbell Barton
959a58da9e Cleanup: redundant casts 2017-10-20 14:03:22 +11:00
Campbell Barton
aa7e76b2e3 Merge branch 'master' into blender2.8 2017-10-20 09:40:08 +11:00
Campbell Barton
cb957fd8e0 Cleanup: replace gpencil tri vars w/ array 2017-10-20 09:28:12 +11:00
Dalai Felinto
fc10484f7c Fix/properly implement: "make group proxy"
This was never correctly implemented. It now works as expected (ala 2.79 behaviour).
The proxy object is added to all the collections of the original empty.

Before not only this wasn't the case, but it would crash Blender.
2017-10-19 18:04:14 -02:00
Sergey Sharybin
0f8a57de68 Merge branch 'master' into blender2.8 2017-10-19 13:58:01 +02:00
Sergey Sharybin
335e454db6 Depsgraph: Use new ID copy API to copy scenes
Avoids temporary main and datablock memory from being allocated.
2017-10-19 13:57:49 +02:00
Sergey Sharybin
1cddab18de Allow non-initialized memory to be passed to BKE_id_copy_ex
This only applies when LIB_ID_CREATE_NO_ALLOCATE flag is used and guarantees
that non-memset-zero memory can be used (or, that same memory chunk might be
used over and over again without need to clean it from the calleer).
2017-10-19 13:55:08 +02:00
Campbell Barton
8f495326bf Fix operators adding manipulators multiple times
Running spin or bisect twice in a row added widget groups each time.
2017-10-19 22:44:51 +11:00
Bastien Montagne
529d365b4d Add note about handling of root nodetree in ID copydata.
OUr beloved root nodetrees... Had to check again the code to undersand
why we copy them with bmain even though they are not in bmain, so this
is worth a comment. ;)
2017-10-19 12:33:14 +02:00
Campbell Barton
27ab054bad Merge branch 'master' into blender2.8 2017-10-19 16:30:20 +11:00
Campbell Barton
3859f5ec28 Docs: correct descriptions 2017-10-19 11:09:27 +11:00
Sergey Sharybin
32145c4a88 Depsgraph: Use new ID management API to copy ID pointers
This solves issue with user counter on materials, objects and such,
additionally avoids having too much overhead of temporary lock and
datablock allocation.

Still need to do similar thing for scene copy, and look into nested
ID datablocks somehow.
2017-10-18 17:18:12 +02:00
Sergey Sharybin
a2f846aa2d Merge branch 'master' into blender2.8 2017-10-18 17:13:37 +02:00
Bastien Montagne
a2b541bd22 Fix mistake in new ID copy code in 'no allocate' case.
Spotted by @sergey, thanks.
2017-10-18 17:11:29 +02:00
Bastien Montagne
264837cb46 Fix wrong comment (leftover from dev time). 2017-10-18 16:55:33 +02:00
Sergey Sharybin
651f76b384 Depsgrpah: Fix crash when removing object 2017-10-18 16:43:40 +02:00
Sergey Sharybin
47bcd4abad Depsgraph: Make code correct
Was a residue from some debug.
2017-10-18 16:01:08 +02:00
Sergey Sharybin
3e8abc0535 Depsgraph: Make Copy-on-Write a command line option
Before it was a compile time option which was not very easy to use or test. Now
the project is getting more mature, so very soon we will be able to call for a
public tests of limited features.

The copy-on-write (which includes animation, modifiers) is enabled using
--enable-copy-on-write command line argument.
2017-10-18 14:35:34 +02:00
Sergey Sharybin
46f0b97d20 Depsgraph: Remove declaration of legace removed functions 2017-10-18 12:49:28 +02:00
Campbell Barton
ecf20e7a56 Fix crash accessing enums without a context 2017-10-18 19:46:39 +11:00
Campbell Barton
ec2bbc90e7 Merge branch 'master' into blender2.8 2017-10-18 17:09:41 +11:00
Campbell Barton
54f9a6e5da Merge branch 'master' into blender2.8 2017-10-18 16:40:31 +11:00
Campbell Barton
ab7ebf2b10 Cleanup: Use const for RNA EnumPropertyItem args
Practically all access to enum data is read-only.
2017-10-18 16:04:07 +11:00
Dalai Felinto
0bcb61b2fe Follow up to engine in workspaces, using clay as default
It would be too slow to use Eevee for files that were not prepared for it.
And at the moment since this is not set, it was falling back to BI.
2017-10-17 20:34:17 -02:00
Dalai Felinto
5aff67fb5e Fix crash when Making Duplicates Real for groups 2017-10-17 20:14:06 -02:00
Dalai Felinto
028a558116 Layers: Fix selected lamp and dupli count for info stats 2017-10-17 19:55:40 -02:00
Alexander Gavrilov
1cb884be35 Make auto handle placement aware of cyclic extrapolation.
Cyclic extrapolation is implemented as an f-curve modifier, so this
technically violates abstraction separation and is something of a hack.
However without such behavior achieving smooth looping with cyclic
extrapolation is extremely cumbersome.

The new behavior is applied when the first modifier is Cyclic
extrapolation in Repeat or Repeat with Offset mode without
using influence, repeat count or range restrictions.

This change in behavior means that curve handles have to be updated
when the modifier is added, removed or its options change. Due to the
way code is structured, it seems it requires a helper link to the
containing curve from the modifier object.

Reviewers: aligorith

Differential Revision: https://developer.blender.org/D2783
2017-10-17 19:39:10 +03:00
Campbell Barton
7d3723a54d Fix T52959: Local view looses clip range on exit 2017-10-18 01:41:19 +11:00
Germano
0a435d49ba Fix T53074: Use the pybuffer->itemsize to get the corresponding GLtype
It seems that `typestr` does not always define the final size of the element. And it varies by operating system.

Then use the `typestr` only to know the itemtype is `float` type or not.
2017-10-17 12:06:52 -02:00
Sergey Sharybin
06ff970f27 Fix T53007: OpenSubdiv + transparency = artefact/crashes 2017-10-17 12:12:15 +02:00
Sergey Sharybin
9598bad59c GPU: Report number of compressed texture formats to help nailing crahs down in the future 2017-10-17 11:53:15 +02:00
Sergey Sharybin
b65fecd9a0 GPU: Fix memory corruption in GPU_debug on GTX1080
Number of texture formats is 51, which is greater than allowed size of 32.
2017-10-17 11:52:31 +02:00
Campbell Barton
bb4c16ef94 Merge branch 'master' into blender2.8 2017-10-17 15:18:12 +11:00
Campbell Barton
a297e1bb93 WM: move gesture operator callbacks into own file
`wm_operators.c` is near 5k LOC with lots of mixed functionality,
extract gesture callbacks since they aren't closely related.
2017-10-17 15:16:02 +11:00
Campbell Barton
0ffa64a45f Merge branch 'master' into blender2.8 2017-10-17 14:06:49 +11:00
Campbell Barton
99520e3f92 Cleanup: use 'e' prefix for enum typedefs
Convention was only followed loosely,
apply to DNA where changes aren't likely to conflict.

(Skipped ModifierType for eg).
2017-10-17 13:49:20 +11:00
Campbell Barton
dd91d7d09d Merge branch 'master' into blender2.8 2017-10-17 12:42:51 +11:00
Campbell Barton
57ec19e0e5 WM: immediate line-gesture activation on tweak
Matches border-gesture behavior,
needed for binding bisect to tweak event.
2017-10-17 12:39:42 +11:00
Clément Foucault
8ffb761387 GPUFramebuffer: Fix recursive downsample exiting early.
I should really proof read my commits a bit more.
2017-10-17 03:06:04 +02:00
Campbell Barton
d0f4d0df2a Knife Tool: add wait_for_event option 2017-10-17 11:50:59 +11:00
Clément Foucault
7d71007cfb GPU Extension: Fix AMD Vega + open source driver detection. 2017-10-17 00:53:14 +02:00