Commit Graph

70480 Commits

Author SHA1 Message Date
Campbell Barton ce7c87fbda Add .editorconfig file
This is a fairly well supported file-type configuration
for indentation and trailing space stripping.

See editorconfig.org for details.
2018-06-18 18:09:45 +02:00
Bastien Montagne 579631819f Fix T55503: File browser filter not working correctly.
There were two issues here, introduced by rB66aa4af836:
* Forgot to change length of some filter_glob var deep in filebrowser code.
* Truncating filter_glob in general can be dangerous, generating
unexpected patterns.

Last point was the root of the issue here, truncating to 63 chars string
left last group as 'match everything' `*` pattern.

To fix that to some extent, added a new BLI_path_extension_glob_validate
helper to BLI_path_util, which ensures we do not have last
wildcards-only group in our pattern, when there are more than one group.
2018-06-18 12:26:47 +02:00
Campbell Barton b66ae8259e RNA: disable animation for file output options 2018-06-18 07:31:21 +02:00
Campbell Barton 86e20a2e63 Cleanup: trailing space cmake, make.bat 2018-06-17 20:18:09 +02:00
Campbell Barton e7a68ef843 Cleanup: trailing space in CMake files 2018-06-17 20:15:24 +02:00
Campbell Barton 2ceff8bd63 Python: Allow untrusted py-drivers to run limited expressions
Limit to a restricted set of built-ins, as well as the math module.
Also restrict of op-codes, disallowing imports and attribute access.

This allows most math expressions to run
without any performance cost once the initial check is done.

See: D1862 for details.
2018-06-17 20:01:05 +02:00
Campbell Barton a24b4e6090 Cleanup: trailing space for remaining source/ 2018-06-17 17:06:28 +02:00
Campbell Barton 76c2203f9c Cleanup: trailing space for blenloader 2018-06-17 17:06:07 +02:00
Campbell Barton 6fc8a74886 Cleanup: trailing space for blenkernel 2018-06-17 17:05:51 +02:00
Campbell Barton a262ea8c47 Cleanup: trailing space for compositor 2018-06-17 17:05:29 +02:00
Campbell Barton 410880552b Cleanup: trailing space for freestyle 2018-06-17 17:05:14 +02:00
Campbell Barton e74bd46ede Cleanup: trailing space for imbuf module 2018-06-17 17:04:54 +02:00
Campbell Barton 1eed46c788 Cleanup: trailing space for modifiers 2018-06-17 17:04:27 +02:00
Campbell Barton 78fbd146f3 Cleanup: trailing space for DNA headers 2018-06-17 17:04:09 +02:00
Campbell Barton 4be752a93c Cleanup: trailing space in source/gameengine/ 2018-06-17 17:03:10 +02:00
Campbell Barton 5513da65b2 Cleanup: trailing space for BLI 2018-06-17 16:32:54 +02:00
Campbell Barton f19ecdeec6 Cleanup: remove unused BLI_rebase_path 2018-06-17 16:26:47 +02:00
Campbell Barton a0a1fc8938 Cleanup: BLI path extension API
Use BLI_path_extension_* prefix.
2018-06-17 16:13:24 +02:00
Campbell Barton 6453814ec0 BLI_path: add string size debug define
Off by default, only for debugging.
2018-06-17 15:35:00 +02:00
Campbell Barton 42103a3eb8 CMake: add missing headers 2018-06-17 11:56:20 +02:00
Campbell Barton 2f1e34cfcc Cleanup: use clamp_* from BLI_math (replace macro) 2018-06-17 11:50:56 +02:00
Ray Molenkamp 36e82b7759 make.bat: Fix `make showhashes` not working.
broke in recent refactor.
2018-06-16 12:29:38 -06:00
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 b955747875 Cycles Cleanup: Remove unneccessary color management call 2018-06-16 13:47:49 +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
Brecht Van Lommel 2e25a48b05 Fix more Cycles CUDA errors after recent changes. 2018-06-15 16:28:09 +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
Brecht Van Lommel 8148d549bb Fix Cycles CUDA error after recent changes. 2018-06-15 10:26:28 +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
Lukas Stockner 3ee606621c Cycles: Query XYZ to/from Scene Linear conversion from OCIO instead of assuming sRGB
I've limited it to just the RGB<->XYZ stuff for now, correct image handling is the next step.

Reviewers: brecht, sergey

Differential Revision: https://developer.blender.org/D3478
2018-06-14 22:21:37 +02:00
Lukas Stockner 064e701472 Cycles: Connect value inputs to Strength instead of Color when inserting an Emission node
Same result, but saves an additional ConvertNode.
2018-06-14 22:16:42 +02:00
Lukas Stockner 716e138a1b Cycles: Automatically detect HDRI resolution by default and use non-square sampling map
The automatic mode checks all Enviroment Texture nodes and picks the largest image's resolution.
If there are no Enviroment Textures, it just uses the old default.

Also, the sampling map now isn't limited to square shapes. The automatic detection uses the exact image size,
the manual UI option now halves the value to get the height.

A default aspect ratio of 2:1 makes sense since this is what most HDRIs use.

Reviewers: brecht, sergey

Differential Revision: https://developer.blender.org/D3477
2018-06-14 22:07:07 +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
Brecht Van Lommel 90e6323ed8 Cycles: auto insert emission node when linking color to closure.
This is convenient for previewing the output of a node, and we agreed
to support this behavior in both Eevee and Cycles.
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