Commit Graph

58504 Commits

Author SHA1 Message Date
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
Germano
c2ad5e805a Fix triangles indexbuf of Curve Displists was being discarded incorrectly
They were discarded when shaded surfaces were requested thus bringing glitches to the outline of the selected Displists Objects
2017-12-16 22:22:21 -02:00
Germano
3713de163e Fix triangles of the Displists were being drawn in the opposite direction 2017-12-16 21:58:16 -02:00
Campbell Barton
45434c75a0 Manipulator: change cursor for navigation axis
Wasn't easy to see
2017-12-16 19:28:39 +11:00
Campbell Barton
625d72ed48 Manipulator: draw 2d manipulators over view border
Needed so passepartout doesn't cover 2d manipulators.
2017-12-16 19:05:27 +11:00
Campbell Barton
d855fc4dad App Template: use manipulator flag
So templates can enable manipulators.
Also remove invalid enum set.
2017-12-16 18:36:49 +11:00
Campbell Barton
468ac90317 Manipulator: view3d navigation buttons
Added for Blender101 template.
Disabled by default, enable as a preference.

Exposes rotate, pan, zoom, persp-ortho & camera toggle.
2017-12-16 04:21:30 +11:00
Campbell Barton
c2cc42742d Manipulator: support single press button actions
While not the main purpose of manipulators, it's handy to be able
to use operators without modal callbacks sometimes.
2017-12-16 04:08:37 +11:00
Sergey Sharybin
68ffb2a267 Merge branch 'master' into blender2.8 2017-12-15 17:55:23 +01:00
Sergey Sharybin
50ef25d73f Depsgraph: Cleanup, remove unused function 2017-12-15 17:47:15 +01:00
Sergey Sharybin
da570fcbb4 Depsgraph: Cleanup, make naming more understandable 2017-12-15 17:46:30 +01:00
Sergey Sharybin
3d72b94196 Depsgraph: Use array instead of set for node factory
Avoids extra time spent on hashing and such.

Old comment is kind of weird, because types we can totally make a sequent
integer values.
2017-12-15 17:43:07 +01:00
Sergey Sharybin
4ce38abfcd Depsgraph: Add named constant with number of node types 2017-12-15 17:39:01 +01:00
Sergey Sharybin
68a7f5e594 Depsgraph: Don't use negative enum value
Not sure why it sohuld be negative, we shouldn't be using any explicit value
comparison.
2017-12-15 17:38:12 +01:00
Julian Eisel
5cb70a89e1 Fix failing assert when reading workspace list from workspaces.blend 2017-12-15 17:26:23 +01:00
Sergey Sharybin
114013de0d Merge branch 'master' into blender2.8 2017-12-15 17:24:28 +01:00
Sergey Sharybin
c795309c03 Depsgraph Cleanup, spelling 2017-12-15 17:23:57 +01:00
Sergey Sharybin
6609be0520 Depsgraph: Simplify logic around special case for node tree update 2017-12-15 17:23:57 +01:00
Sergey Sharybin
1797923f32 Depsgraph: Cleanup, extra whitespace 2017-12-15 17:23:57 +01:00