Commit Graph

75472 Commits

Author SHA1 Message Date
Sergey Sharybin
883e342bdb Tracking: Fix possible numerical overflow 2017-12-19 12:52:20 +01:00
Sergey Sharybin
28970b6ed2 Fix T53523: Keyframes for Marker weight stay, even if the track itself is deleted
Was using wrong prefix for the RNA path fix.
2017-12-19 12:51:45 +01:00
Sergey Sharybin
92197c24f0 Tracking: Use new RNA path utility functions 2017-12-19 12:48:53 +01:00
Sergey Sharybin
cf90b11d68 Tracking: Add utility function to get RNA path for given track 2017-12-19 12:45:23 +01:00
Sergey Sharybin
f62de28972 Depsgraph: Fix nexted node trees being tagged with wrong flag 2017-12-19 12:37:57 +01:00
Sergey Sharybin
43dcf804bd Tracking: Remove duplicated functions 2017-12-19 12:22:34 +01:00
Sergey Sharybin
1818aa3b24 Tracking: Add plane tracks equivalents to previous commit 2017-12-19 12:18:52 +01:00
Sergey Sharybin
e598e55edd Tracking: Add utility function to get tracks list for given track 2017-12-19 12:14:26 +01:00
Sergey Sharybin
adaeb14b3e Tracking: Add utility function to find tracking object from a given track 2017-12-19 12:13:57 +01:00
Sergey Sharybin
71c93624e2 Cleanup: Don't use camel case for variable names 2017-12-19 11:53:11 +01:00
Sergey Sharybin
6cbdde1ba1 Fix T53400: DEG tagging is freeing Irradiance Grid when selecting objects
Ignore selection related recalc in Eevee ID update callback.
2017-12-19 11:46:53 +01:00
Sergey Sharybin
4045a51a11 Depsgraph: Rework tagging and flushing routines
The goal is: have id->recalc flags set to components which got changed.
To make it possible for render engines to check on a more granular basis
what changed in the object. For example, is it a transform which changed
or is it just some ID property changed which has nothing to do with rendering.

The tricky part is: we don't want duplicated logic in tagging and flushing.
In order to avoid this duplication, we store ID recalc flag in the component
node type information. That type information could easily be accessed by both
tagging and flushing routines.

Remaining part of the changes are related on changing the way how tagging
works. The new idea here is to have utility function which maps update tag to
a component. This way we can easily set ID recalc flags right away. Without
any duplication of ID recalc flags set in multiple flag handler functions.

With all this being said, there should be no user measurable difference for
now, it's a gigantic basement for some upcoming work and fixes.
2017-12-19 11:37:22 +01:00
Sergey Sharybin
e4849ad3a6 Depsgraph: Preliminary work to make components to ID recalc flags 2017-12-19 11:37:14 +01:00
Sergey Sharybin
3500274d9c Add more granular ID recalc bits
Only bits for now, unused. Just to keep upcoming patches smaller.
2017-12-19 11:36:58 +01:00
Sergey Sharybin
0ebf69287a Merge branch 'master' into blender2.8 2017-12-19 10:05:04 +01:00
Sergey Sharybin
c34f3c777f Fix T53559: Auto texture space for text and font is wrong in Cycles
The issue actually goes a bit deeper, converting curve to mesh will
change texture space just because font and bezier curves are using CV
to calculate texture space.

So now when those objects are converted to mesh, we disable auto
texture space and copy evaluated space over.
2017-12-19 10:01:00 +01:00
Campbell Barton
9d69b3d48b Merge branch 'master' into blender2.8 2017-12-19 19:42:11 +11:00
Campbell Barton
77c62c7793 UI: split out button checks from tooltip creation
Allows to make tooltips from other kinds of data.
2017-12-19 19:34:16 +11:00
Sergey Sharybin
e288afe110 Merge branch 'master' into blender2.8 2017-12-19 08:57:34 +01:00
Sergey Sharybin
a0fa404deb Fix T53547 for real now
Original fix was assuming that particle init operation is updated on every
frame, which is wrong behavior and that was fixed in previous commit to the
original bugfix.
2017-12-19 08:56:11 +01:00
Campbell Barton
891a3762ce Manipulator: ui-scale support for navigate widget 2017-12-19 17:14:52 +11:00
Campbell Barton
01850f0928 Manipulator: 3D view navigation improvements
- Highlight's were too intense/distracting
  use more subtle alpha (consistent with the rest of our UI).
- Don't fill center cube (only draw edges).
- Draw widget while interacting since this is helpful in some cases.

Thanks to @jbakker for suggestions.

Also change axis hotspots so the nearest is always selected
for quicker axis picking (relies on dragging any axis to orbit).
2017-12-19 15:28:01 +11:00
Campbell Barton
f03660bb84 Correct axis mapping logic 2017-12-19 14:36:22 +11:00
Campbell Barton
cfd1b48492 Merge branch 'master' into blender2.8 2017-12-19 14:15:19 +11:00
Campbell Barton
e418c858ab 3D View: use shortest angle between quaternions
Gave incorrect smoothview speed changing between some axis and
axis locking.
2017-12-19 14:05:54 +11:00
Campbell Barton
7a58ff928c Math Lib: signed versions of quaternion angle
There was no simple way to get the shortest quaternion angle.
2017-12-19 14:03:29 +11:00
Campbell Barton
5df597171b Manipulator: Support click only manipulator's
Makes the 3D view navigation widget easier to use: dragging anywhere
in the rotation region now rotates without having to avoid the XYZ axis
hotspots which only activate on a single click.

Logic for drag detection is complicated by manipulators reliance
on keeping the modal operator running.
Currently this is wrapped in an ifdef,
we may want to implement it differently later.
2017-12-19 12:49:02 +11:00
Campbell Barton
12bc63a0fe Manipulaor: de-duplicate finish call 2017-12-19 12:46:36 +11:00
Germano
02abb17ae2 Forgotten on last commit 2017-12-18 23:24:12 -02:00
Germano
24ca903f6d Draw Manager: draw_cache_imp_displist, always return IndexBuf even when there is no index
This prevents possible errors with materials and a crash with low resolution metaball.
Also a small cleanup was done in the code.
2017-12-18 23:17:55 -02:00
Howard Trickey
bb30ce0f0b Fix T53474, bevel glitchy with big objects.
A comparison should have not just have been against an epsilon,
but relative to the edge length involved.
Thanks to mano-wii for patch on which this is based.
2017-12-18 12:24:42 -05:00
Sergey Sharybin
57f2cc918b Depsgraph: Cleanup, line length 2017-12-18 16:55:04 +01:00
Sergey Sharybin
e57fe5cd95 Depsgraph: Use named typedef for tag 2017-12-18 16:53:12 +01:00
Sergey Sharybin
94d34ae205 Depsgraph: Cleanup, typo in comment 2017-12-18 16:52:46 +01:00
Sergey Sharybin
90021402e2 Merge branch 'master' into blender2.8 2017-12-18 16:51:05 +01:00
Sergey Sharybin
443789d7c6 Depsgraph: Add facilities to store what ID recalc flag component corresponds to
The idea is to de-duplicate logic in DEG_id_tag_update() and flushing where we
need to translate depsgraph tag or component type to ID level recalc flag.

Currently unused, but is required for Blender 2.8.
2017-12-18 16:46:32 +01:00
Sergey Sharybin
9e424faec6 Add dedicated named constant for no ID recalc flag 2017-12-18 16:40:18 +01:00
Sergey Sharybin
342226a670 Depsgraph: Synchronize flushing with 2.8 branch
Not only this helps merges form master to the branch, but also:

- Allows us to production-check changes as soon as possible.
- Avoids some unnecessary editors update about ID changes.
- Adds small optimization on queue size by always keeping one of the pointers
  outside of the queue.
2017-12-18 16:33:12 +01:00
Sergey Sharybin
c46a9d8117 Merge branch 'master' into blender2.8 2017-12-18 16:19:12 +01:00
Sergey Sharybin
344eff9c48 Depsgraph: Add query API to traverse all dependent IDs of the given ID 2017-12-18 16:15:47 +01:00
Sergey Sharybin
c5d9eb88e2 Depsgraph: Replace iteration over ghash with iteration over flat array 2017-12-18 16:14:50 +01:00
Sergey Sharybin
8fe556a337 Depsgraph: Introduce flat list of ID nodes
The idea is to allow iterating over ID nodes in exact order of their
construction, and in order which will not change dependent on memory
pointers or anything.
2017-12-18 16:10:22 +01:00
Sergey Sharybin
1fb43dcd5a Fix bad merge happened at some point 2017-12-18 16:04:06 +01:00
Sergey Sharybin
a41fe949d8 Fix T53398: Surface deform modifier says that convex polygons are concave for big faces
Dot-product for angle check need either to be divided by vectors magnitude or be
calculated for normalized vectors.
2017-12-18 15:16:22 +01:00
Bastien Montagne
5566a88873 Static Override: better handling in ID template.
Now we stick to a single button, when data is directly linked, clicking
on it will make a local copy, while shift-clicking on it will make a
static override.

When data is a static override, icon is the DATA_OVERRIDE one, and clicking
on the button will make it a fully borring local data-block.
2017-12-18 12:29:08 +01:00
Bastien Montagne
ec6e490bb8 Add override icon to such data-blocks in OUtliner. 2017-12-18 12:02:23 +01:00
Bastien Montagne
4c9f303eba Add macros to check whether an ID is a static override or has a template for it. 2017-12-18 12:01:50 +01:00
Bastien Montagne
7ab8c90686 Serious cleanup/refactor/fixing of new RNA comparison code.
Code also handling auto-generation of static overrides.

Aside from some naming consistency cleanup, this commit:

* Is the first step addressing the 'operator' issue with static
overrides, by implementing a first version of the 'restore from
reference' behavior.

* Fixes several issues that were discovered on the way in enhanced
RNA comparision code, like the 'zero-length dynamic array' case, or some
infinite looping caused by some non-ID pointers (that for some
mysterious reasons did not show up previously...).

* Factorizes a bit said RNA comparison code (auto-static override
generation and comparison/check were essentially doing the same thing).
2017-12-18 10:13:43 +01:00
Bastien Montagne
994648a674 RNA: add new property falg for pointers (and collection), 'NO_OWNERSHIP'.
This flag means that the pointer does not 'own' the data it references.
This is the case of nearly all ID RNA pointers (NodeTrees will probably
again be some nasty exception here :( ), but also several other cases.

That kind of information is mandatory for complex processing over whole
data-blocks done in RNA, like some static override tasks (advanced
comparison...).
2017-12-18 10:08:22 +01:00
Campbell Barton
076616898b Fix T53577: Rake sculpt/paint wrong on first step 2017-12-18 14:35:15 +11:00