Commit Graph

55923 Commits

Author SHA1 Message Date
Bastien Montagne
ace8ad861d Fix T55427: Removing Vertex Group used by Data Transfer Modifier results in crash.
Only fixing crash, proper handling (a.k.a remapping) of all
possible cases here, for all possible data layers, is rather involved...
2018-06-16 16:22:00 +02:00
Campbell Barton
35c71aed25 UI: refactor drag-toggle for other button types 2018-06-16 16:04:26 +02:00
Campbell Barton
73abca1da0 UI: minor changes from 2.8
- Option to skip multi-data edits.
- Open hold buttons on drag.
- Utility function to set default value.
2018-06-16 15:44:13 +02:00
Lukas Stockner
799779d432 Cycles: change Ambient Occlusion shader to output colors.
This means the shader can now be used for procedural texturing. New
settings on the node are Samples, Inside, Local Only and Distance.

Original patch by Lukas with further changes by Brecht.

Differential Revision: https://developer.blender.org/D3479
2018-06-15 22:16:06 +02:00
Campbell Barton
2b9edbc98b WM: suppress drag events if motion is handled 2018-06-15 19:09:43 +02:00
Bastien Montagne
d645b1a78a Cleanup: some more G.main removal.
We are really starting to scratch the last bits here...
2018-06-15 17:42:17 +02:00
Bastien Montagne
49915e3241 Cleanup: validate G.main's in creator code.
Using G_MAIN here is valid!
2018-06-15 17:36:44 +02:00
Bastien Montagne
da9b1b14ed Cleanup: some more G.main removal/validation... 2018-06-15 17:21:07 +02:00
Howard Trickey
b84fad2ba3 Fix T55490, intersect two triangles fails.
Need to use the 'use_partial_connect' option in island connect,
so changed signatures of various functions to pass that into and
then down from BM_mesh_intersect (making true for intersect, false
for boolean).
Then fix bm_face_split_edgenet_partial_connect to work when
input edges are not necessarily wire, but at least not in the
face they are being connected in. That caused generalization
of core BM_vert_separate_hflag_wire (which is only used in
this one place in all Blender).
2018-06-15 08:48:45 -04:00
Philipp Oeser
284e0ea756 Fix (unreported) Text Editor: scrollbar exiting early
caused by recent clickdrag changes
2018-06-15 10:27:30 +02:00
Campbell Barton
cbc7ee28d7 WM: 2.8 screen compatibility
Without these minor changes loading files from 2.8 will crash.

Manually applied edits from 26786a2b87
2018-06-15 10:24:53 +02:00
Bastien Montagne
fd19069999 Cleanup: remove last G.main's from Collada code. 2018-06-14 15:15:51 +02:00
Bastien Montagne
66407e15cb Cleanup: Remove last G.main's from WM code.
Was mostly validating valid usages of G.main -> G_MAIN actually.
2018-06-14 12:34:13 +02:00
Bastien Montagne
0eb3246713 Fix T55470: Add option to not fix polygons' winding to Edit Normals modifier.
this is actually adding option to add buggy behavior, but.. NPR often
expects buggy behaviors, and its one of the main targets for normal editing.
So think it's reasonable to add that option (disabled by default of
course).

Note that am not really happy with UI, but:
* Not sure where to put it, it's kind of own self-contained area option.
* Don't to make it too much visible, using this should be the exception!
2018-06-14 11:41:12 +02:00
Brecht Van Lommel
4d58fac1b4 Fix undo group to use human readable name, since this shows in the UI. 2018-06-13 18:39:30 +02:00
Brecht Van Lommel
3102833962 Fix undo of transform after frame change undoing too much.
For grouped undo we should not skip the undo push, rather replace the
previous undo push. This way undo goes back to the state after the last
operation in the group.
2018-06-13 18:39:30 +02:00
Campbell Barton
57cd52a4ab WM: check release event for particle edit mode
Caused by drag event.
2018-06-13 18:23:09 +02:00
Bastien Montagne
f61c30f804 Cleanup: get rid of last G.main in BMesh code. 2018-06-13 16:29:12 +02:00
Bastien Montagne
5ff1d845ea Cleanup: moar ugly G.main removal...
Note that due to RNA get/setters issue, that one may actually add some
G.main usages to the total... But at least it's not hidden anymore in a
very low-level, dark corner of BKE pointcache code!
2018-06-13 14:28:05 +02:00
Philipp Oeser
2002fe27d9 Fix T55467: nodes cant be resized after recent clickdrag change 2018-06-13 14:03:46 +02:00
Campbell Barton
5788f24337 Cleanup: swapped X/Y UI_UNIT 2018-06-13 11:10:55 +02:00
Bastien Montagne
67e8c1e1c7 Cleanup: remove more G.main from BKE area. 2018-06-13 10:57:10 +02:00
Bastien Montagne
2788202417 Cleanup: moar G.main removal from BKE area. 2018-06-12 17:57:24 +02:00
Bastien Montagne
f27ecd56ef Cleanup: BKE_scene_free should not have to worry about cleaning its usages.
This is supposed to be handled by calling code! Henceforce, no need to
call BKE_sequencer_clear_scene_in_allseqs() here, and... no need for
that ugly G.main case. ;)
2018-06-12 17:46:16 +02:00
Campbell Barton
b00d840359 WM: remove sloppy region type access
Avoid accidentally operating on the wrong region type.
2018-06-12 17:34:44 +02:00
Campbell Barton
760e79d809 WM: rename BKE_regiontype_from_id
This returns the first as a fallback, causing confusing usage.
Renamed and added a version of the function that doesn't.
2018-06-12 17:26:38 +02:00
Bastien Montagne
ec4ce908db Fix T55452: Crash on saving with visible particle system.
Missing Main pointer in recent refactor/cleanup of G.main usages...
2018-06-12 16:17:05 +02:00
Bastien Montagne
a6585fa4b1 Cleanup: moar removal of G.main in BKE area... 2018-06-12 15:16:45 +02:00
Bastien Montagne
d617a6c85b Cleanup/simplify G.main usages.
Using G.main only to get main bled filepath, or built-in fonts, is OK.
So now using the 'valid' G_MAIN macro here instead.
2018-06-12 15:03:51 +02:00
Bastien Montagne
be57cf9b2a Cleanup: remove moar G.main from BKE area. 2018-06-12 12:53:27 +02:00
Bastien Montagne
5508b572ea Cleanup: remove some G.main from ED's animsys.
The easy ones - there some much, much trickier to tackle there...
2018-06-12 12:28:14 +02:00
Bastien Montagne
75bcb70c60 Cleanup: remove some G.main from BKE area. 2018-06-12 11:21:54 +02:00
Bastien Montagne
78a8d3685b Cleanup: remove moar ugly G.main usages...
BKE_image was an ugly nest, could fix all but the ones from compositor,
so moved ugly G.main there, at least we know where the Evil is that way ;)
2018-06-11 15:40:37 +02:00
Bastien Montagne
d0956e9cb3 Cleanup: Moar G.main removal of Hell.
This commit actually adds some G.main... but at much, much higher level
than the ones it removes, so should still be better ;)
2018-06-11 12:15:14 +02:00
Bastien Montagne
8055ed2741 Cleanup: remove some G.main usages... 2018-06-11 12:15:14 +02:00
Sergey Sharybin
13d238729b Fix bad level stubs 2018-06-11 11:36:22 +02:00
Sergey Sharybin
28c34ae7e2 Cleanup: Use BLI_strncpy
It has behavior which we expect, and silences strict compiler warning.
2018-06-11 11:06:15 +02:00
Campbell Barton
9e8bd3a072 path_util: avoid overflow w/ strtoll use
Also style cleanup.
2018-06-11 10:46:02 +02:00
Philipp Oeser
1d8d4e03f5 Fix PyConsole: Drag events finished early in modal text selection 2018-06-11 10:18:51 +02:00
Philipp Oeser
7ac0272b77 Fix T55140: opened image doesn't show up in movie clip editor
atoi usage in BLI_stringdec could overflow, use strtoll instead and
check
valid range with INT_MIN and INT_MAX

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D3452
2018-06-11 09:57:16 +02:00
Philipp Oeser
474a145d78 Fix T55349: crash adding paint slot when object is on hidden layer
use better poll and get ob with 'ED_object_active_context' (instead of
'CTX_data_active_object')

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D3467
2018-06-11 09:12:29 +02:00
Campbell Barton
d0a16772ad WM: add macros to check mouse button/gesture/wheel
Use to check click/drag,
fixes issue with mouse wheel triggering pie menu.
2018-06-10 12:08:09 +02:00
Campbell Barton
2e14b7fb97 RNA: remove Layout.introspect
This was added as an experiment to extract information for docs
but this was never all that useful for its intended purpose.
2018-06-09 18:55:51 +02:00
Campbell Barton
83cb34ccd1 Cleanup: unused functions 2018-06-09 18:47:39 +02:00
Bastien Montagne
638de72277 Cleanup: remove some G.main usages. 2018-06-09 15:17:04 +02:00
Campbell Barton
fb565ddb68 Cleanup: trailing space in RNA 2018-06-09 14:40:09 +02:00
Campbell Barton
56a47e58f4 Cleanup: style 2018-06-09 14:30:32 +02:00
Campbell Barton
5165d62931 WM: correct recent change to click/drag detection
fb1915d870 - caused click/drag events not to be detected.

Now check a key is a mouse or keyboard event.
2018-06-08 22:17:21 +02:00
Campbell Barton
1857823839 WM: fix panel drag event handling 2018-06-08 18:58:41 +02:00
Campbell Barton
2dc7555522 WM: fix node link & background drag 2018-06-08 18:55:47 +02:00